1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-01 18:47:20 +01:00

DNSBL improvements

This commit is contained in:
Savetheinternet 2011-05-19 18:04:47 +10:00
parent ac300e4ef2
commit e1e4808d3c
2 changed files with 5 additions and 2 deletions

View File

@ -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;

View File

@ -1005,8 +1005,10 @@
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.
if(preg_match('/^127\.0\.0\./', $host) && $host != '127.0.0.10')
error(sprintf($config['error']['dnsbl'], $blacklist));
}
}