Skip to content

Instantly share code, notes, and snippets.

@FiXato
Created December 5, 2010 19:31
Show Gist options
  • Save FiXato/729380 to your computer and use it in GitHub Desktop.
Save FiXato/729380 to your computer and use it in GitHub Desktop.
A very simple PoC parser for Chat4All to verify IPs against the stopforumspam database.
<?php
$input_file = "listed_ip_180.txt";
$ips = explode("\n",file_get_contents($input_file));
foreach(array("127.0.0.1","127.0.0.2") as $ip) {
echo "Checking if IP $ip occurs in file $input_file" . PHP_EOL;
if(in_array($ip,$ips)) {
echo "$ip occurs" . PHP_EOL;
} else {
echo "$ip not present" . PHP_EOL;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment