Create lib/ip-reputation.js

This commit is contained in:
Namhyeon Go 2025-01-10 13:28:46 +09:00
parent 9262d83fd5
commit 1c6d306760
2 changed files with 32 additions and 1 deletions

View File

@ -4,5 +4,6 @@
"groq": "file:data/groq_apikey.txt",
"scrapeops": "file:data/scrapeops_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
View 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;