-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.live.php
94 lines (76 loc) · 2.86 KB
/
check.live.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
require '/usr/local/cpanel/php/cpanel.php';
$cpanel = new CPANEL();
print $cpanel->header( "Blacklist Checker" );
?>
<link rel="stylesheet" type="text/css" href="assets/css/main.css" media="screen" />
<div class="container" style="width: auto">
<div v-model=""></div>
<div class="content">
<nav class="navbar navbar-default">
<div class="container-fluid">
<ul class="nav navbar-nav">
<li><a href="?ip=<?php echo $_SERVER['REMOTE_ADDR'];?>">Your current IP address is: <b><?php echo $_SERVER['REMOTE_ADDR'];?></b></a></li>
<li><a href="?ip=<?php echo $_SERVER['SERVER_ADDR'];?>">Server IP address is: <b><?php echo $_SERVER['SERVER_ADDR'];?></b></a></li>
</ul>
</div>
</nav>
<p>The blacklist check will test an IP address against over 100 DNS based email blacklists. (Commonly called Realtime blacklist, DNSBL or RBL).</p>
<p>Email blacklists are used by email providers to reduce spam. If your mail server has been blacklisted, some email you send may not be delivered. <a href="#" target="_blank">Learn more</a></p>
<hr>
<form action="" method="get">
<p>Enter an IP address or a hostname to start the check:
<input type="text" value="" name="ip" placeholder="Insert Your IP ..." />
<input type="submit" value="LOOKUP" /></p>
</form>
<?php
function dnsbllookup($ip){
$dnsbl_lookup=array(
"bl.spamcop.net",
"cbl.abuseat.org",
"dnsbl.justspam.org",
"dnsbl.sorbs.net",
"relays.mail-abuse.org",
"spam.dnsbl.sorbs.net",
"spamguard.leadmon.net",
"zen.spamhaus.org"); // Add your preferred list of DNSBL's
if($ip){
$reverse_ip=implode(".",array_reverse(explode(".",$ip)));
foreach($dnsbl_lookup as $host){
if(checkdnsrr($reverse_ip.".".$host.".","A")){
$listed.='<font color="red">🔴 </font>'.$reverse_ip.'.'.$host.' <font color="red">Listed</font><br />';
}
}
}
if($listed){
echo $listed;
}else{
echo "IP $ip <font color='green'>not listed</font> in SPAM list";
}
}
$ip=$_GET['ip'];
if(isset($_GET['ip']) && $_GET['ip']!=null){
if(filter_var($ip,FILTER_VALIDATE_IP)){
echo dnsbllookup($ip);
}else{
echo "Please enter a valid IP";
}
}
?>
<br>
<hr>
<br>
<p>You can use this check to see whether your IP address is listed within the following RBLs:</p>
<table border="0">
<tr><td>bl.spamcop.net</td></tr>
<tr><td>cbl.abuseat.org</td></tr>
<tr><td>dnsbl.justspam.org</td></tr>
<tr><td>dnsbl.sorbs.net</td></tr>
<tr><td>relays.mail-abuse.org</td></tr>
<tr><td>spam.dnsbl.sorbs.net</td></tr>
<tr><td>spamguard.leadmon.net</td></tr>
<tr><td>zen.spamhaus.org</td></tr>
</table>
<?php
echo $cpanel->footer();
$cpanel->end();