Can you help me modify this code to detect if the IP address (as a string) stored in the variable const ip_address
is present in the output retrieved from the URL specified in const request
?
function getBlocklist() {
const baseurl = "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/bi_sip_0_1d.ipset"
const request = require('request');
request(baseurl, function (error, response, body){
if (!error && response.statusCode == 200) {
console.log(body)
}
})
}
getBlocklist()