Browse Source

DNSBL improvements

pull/40/head
Savetheinternet 13 years ago
parent
commit
c060673bd1
  1. 1
      inc/config.php
  2. 6
      inc/functions.php

1
inc/config.php

@ -190,6 +190,7 @@
// DNS blacklists (DNSBL) http://www.dnsbl.info/dnsbl-list.php
$config['dnsbl'][] = 'tor.dnsbl.sectoor.de'; // Tor exit nodes
//$config['dnsbl'][] = 'dnsbl.sorbs.net';
// Typically spambots try to post a lot of links. Refuse a post with X standalone links?
$config['max_links'] = 20;

6
inc/functions.php

@ -1005,9 +1005,11 @@
foreach($config['dnsbl'] as &$blacklist) {
$lookup = $ip . '.' . $blacklist;
if(gethostbyname($lookup) != $lookup) {
$host = gethostbyname($lookup);
if($host != $looku) {
// On NXDOMAIN (meaning it's not in the blacklist), gethostbyname() returns the host unchanged.
error(sprintf($config['error']['dnsbl'], $blacklist));
if(preg_match('/^127\.0\.0\./', $host) && $host != '127.0.0.10')
error(sprintf($config['error']['dnsbl'], $blacklist));
}
}
}

Loading…
Cancel
Save