Created
January 28, 2012 21:24
-
-
Save blHdIjbJ/1695802 to your computer and use it in GitHub Desktop.
simple mass RBL check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function rblcheck($host) { // Note: I have no idea how well suited CBL is for this purpose. If it gets annoying we can remove it ~ Aurora | |
$rbls = array('sbl-xbl.spamhaus.org', 'rbl.efnet.org', 'cbl.abuseat.org', 'dnsbl.dronebl.org'); | |
foreach($rbls as $rbl) { | |
$lookup = implode('.', array_reverse(explode('.', $host))) . '.' . $rbl; | |
if (strstr(gethostbyname($lookup), "127.0.0")) { | |
return $rbl; | |
} | |
} | |
return 0; | |
} | |
if(isset($_FILES['proxyfile']['tmp_name'])) { | |
$proxies = file_get_contents($_FILES['proxyfile']['tmp_name']); | |
$proxylist = explode("\n", $proxies); | |
foreach($proxylist as $proxy) { | |
$proxy = str_replace("\r","",$proxy); | |
$withoutport = explode(":",$proxy); | |
$withoutport = $withoutport[0]; | |
if($check = rblcheck($withoutport)) { | |
print(""); | |
} | |
else { print("$proxy<br>"); } | |
} | |
} | |
?> | |
<form action="rbl.php" method="post" enctype="multipart/form-data"> | |
<input type="file" name="proxyfile" /> | |
<input type="submit" value="Upload proxy list" /> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment