Cloudflare-WAF-To-AbuseIPDB

This commit is contained in:
Sefinek 2024-11-10 01:09:40 +01:00
parent f843d73604
commit ea8e6a3b28
6 changed files with 16 additions and 15 deletions

View file

@ -14,7 +14,7 @@ Also, take a look at [sefinek/UFW-AbuseIPDB-Reporter](https://github.com/sefinek
## 📃 Information ## 📃 Information
If you want to make changes to the script from this repository, please kindly [fork](https://github.com/sefinek/Node-Cloudflare-WAF-AbuseIPDB/fork) it first. If you want to make changes to the script from this repository, please kindly [fork](https://github.com/sefinek/Cloudflare-WAF-To-AbuseIPDB/fork) it first.
## 🌌 Example Report ## 🌌 Example Report
@ -31,7 +31,7 @@ Ray ID: 8c53354d5c885c4d
Rule ID: badscore Rule ID: badscore
UA: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36 UA: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36
Report generated by Node-Cloudflare-WAF-AbuseIPDB https://github.com/sefinek/Node-Cloudflare-WAF-AbuseIPDB Report generated by Cloudflare-WAF-To-AbuseIPDB https://github.com/sefinek/Cloudflare-WAF-To-AbuseIPDB
``` ```
<div align="center"> <div align="center">
@ -42,7 +42,7 @@ Report generated by Node-Cloudflare-WAF-AbuseIPDB https://github.com/sefinek/Nod
## 📥 Installation ## 📥 Installation
1. Clone the repository. 1. Clone the repository.
```bash ```bash
git clone https://github.com/sefinek/Node-Cloudflare-WAF-AbuseIPDB.git git clone https://github.com/sefinek/Cloudflare-WAF-To-AbuseIPDB.git
``` ```
2. Install dependencies. 2. Install dependencies.
```bash ```bash
@ -92,7 +92,7 @@ Visit [www.abuseipdb.com/account/api](https://www.abuseipdb.com/account/api).
## 😉 Issues and Pull requests ## 😉 Issues and Pull requests
If you need help or have any questions, feel free to create a new [Issue](https://github.com/sefinek/Node-Cloudflare-WAF-AbuseIPDB/issues). If you'd like to contribute to the project, go ahead and open a [Pull request](https://github.com/sefinek/Node-Cloudflare-WAF-AbuseIPDB/pulls). Thank you! If you need help or have any questions, feel free to create a new [Issue](https://github.com/sefinek/Cloudflare-WAF-To-AbuseIPDB/issues). If you'd like to contribute to the project, go ahead and open a [Pull request](https://github.com/sefinek/Cloudflare-WAF-To-AbuseIPDB/pulls). Thank you!
## 💕 Credits ## 💕 Credits

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "waf-to-abuseipdb", "name": "waf-to-abuseipdb",
"version": "1.1.8", "version": "1.1.9",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "waf-to-abuseipdb", "name": "waf-to-abuseipdb",
"version": "1.1.8", "version": "1.1.9",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"axios": "^1.7.7", "axios": "^1.7.7",

View file

@ -1,7 +1,7 @@
{ {
"name": "waf-to-abuseipdb", "name": "waf-to-abuseipdb",
"version": "1.1.8", "version": "1.1.9",
"description": "A Node.js project that enables automatic reporting of incidents detected by Cloudflare WAF to the AbuseIPDB database.", "description": "A Node.js project that automates the reporting of incidents detected by Cloudflare WAF to the AbuseIPDB database.",
"keywords": [ "keywords": [
"abuseipdb", "abuseipdb",
"cloudflare", "cloudflare",
@ -11,13 +11,13 @@
"abuseipdb-reporting", "abuseipdb-reporting",
"node-abuseipdb" "node-abuseipdb"
], ],
"homepage": "https://github.com/sefinek/Node-Cloudflare-WAF-AbuseIPDB#readme", "homepage": "https://github.com/sefinek/Cloudflare-WAF-To-AbuseIPDB",
"bugs": { "bugs": {
"url": "https://github.com/sefinek/Node-Cloudflare-WAF-AbuseIPDB/issues" "url": "https://github.com/sefinek/Cloudflare-WAF-To-AbuseIPDB/issues"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/sefinek/Node-Cloudflare-WAF-AbuseIPDB.git" "url": "git+https://github.com/sefinek/Cloudflare-WAF-To-AbuseIPDB.git"
}, },
"license": "MIT", "license": "MIT",
"author": "Sefinek <contact@sefinek.net> (https://sefinek.net)", "author": "Sefinek <contact@sefinek.net> (https://sefinek.net)",

View file

@ -19,5 +19,5 @@ module.exports = it => {
return `Triggered Cloudflare WAF (${it.source}) from ${it.clientCountryName}. return `Triggered Cloudflare WAF (${it.source}) from ${it.clientCountryName}.
${reportLines.join('\n')} ${reportLines.join('\n')}
Report generated by Node-Cloudflare-WAF-AbuseIPDB https://github.com/sefinek/Node-Cloudflare-WAF-AbuseIPDB`; Report generated by Cloudflare-WAF-To-AbuseIPDB https://github.com/sefinek/Cloudflare-WAF-To-AbuseIPDB`;
}; };

View file

@ -14,4 +14,4 @@ const ABUSEIPDB = {
'Key': process.env.ABUSEIPDB_API_KEY, 'Key': process.env.ABUSEIPDB_API_KEY,
}; };
module.exports = { CLOUDFLARE, ABUSEIPDB }; module.exports = { UserAgent, CLOUDFLARE, ABUSEIPDB };

View file

@ -1,7 +1,8 @@
const axios = require('axios'); const axios = require('axios');
const { UserAgent } = require('../scripts/headers.js');
const { version } = require('../package.json'); const { version } = require('../package.json');
axios.defaults.headers.common['User-Agent'] = `Mozilla/5.0 (compatible; WAF-To-AbuseIPDB/${version}; +https://github.com/sefinek/Node-Cloudflare-WAF-AbuseIPDB)`; axios.defaults.headers.common['User-Agent'] = UserAgent;
axios.defaults.timeout = 12000; axios.defaults.timeout = 9000;
module.exports = { axios, moduleVersion: version }; module.exports = { axios, moduleVersion: version };