mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-11 09:24:58 +00:00
Create lib/ip-reputation.js
This commit is contained in:
parent
9262d83fd5
commit
1c6d306760
|
@ -4,5 +4,6 @@
|
||||||
"groq": "file:data/groq_apikey.txt",
|
"groq": "file:data/groq_apikey.txt",
|
||||||
"scrapeops": "file:data/scrapeops_apikey.txt",
|
"scrapeops": "file:data/scrapeops_apikey.txt",
|
||||||
"searchapi": "file:data/searchapi_apikey.txt",
|
"searchapi": "file:data/searchapi_apikey.txt",
|
||||||
"aviationstack": "file:data/aviationstack_apikey.txt"
|
"aviationstack": "file:data/aviationstack_apikey.txt",
|
||||||
|
"abuseipdb": "file:data/abuseipdb_apikey.txt"
|
||||||
}
|
}
|
||||||
|
|
30
lib/ip-reputation.js
Normal file
30
lib/ip-reputation.js
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
// ip-reputation.js
|
||||||
|
// Namhyeon Go <abuse@catswords.net>
|
||||||
|
// https://github.com/gnh1201/welsonjs
|
||||||
|
//
|
||||||
|
// ***SECURITY NOTICE***
|
||||||
|
// IP Reputation Checker requires an internet connection, and data may be transmitted externally. Users must adhere to the terms of use and privacy policy.
|
||||||
|
// - AbuseIPDB website: https://www.abuseipdb.com/
|
||||||
|
//
|
||||||
|
var HTTP = require("lib/http");
|
||||||
|
var APIKEY = require("lib/apikey");
|
||||||
|
|
||||||
|
function check(ip_address) {
|
||||||
|
var apikey = APIKEY.getApiKey("abuseipdb");
|
||||||
|
|
||||||
|
var response = HTTP.create()
|
||||||
|
.setHeaders({
|
||||||
|
"Key": apikey,
|
||||||
|
"Accept": "application/json"
|
||||||
|
})
|
||||||
|
.setParameters({
|
||||||
|
"ipAddress": ip_address
|
||||||
|
});
|
||||||
|
|
||||||
|
return response.responseBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.VERSIONINFO = "IP Reputation Checker (ip-reputation.js) version 0.1";
|
||||||
|
exports.AUTHOR = "abuse@catswords.net";
|
||||||
|
exports.global = global;
|
||||||
|
exports.require = global.require;
|
Loading…
Reference in New Issue
Block a user