|
|
@ -23,10 +23,13 @@ require_once 'inc/mod/auth.php'; |
|
|
|
require_once 'inc/lock.php'; |
|
|
|
require_once 'inc/queue.php'; |
|
|
|
require_once 'inc/polyfill.php'; |
|
|
|
require_once 'inc/lib/IP/Lifo/IP/IP.php'; |
|
|
|
@include_once 'inc/lib/parsedown/Parsedown.php'; // fail silently, this isn't a critical piece of code |
|
|
|
|
|
|
|
require_once 'inc/anti-bot.php'; // DELETE ME THIS IS FOR print_err function only! |
|
|
|
|
|
|
|
use Lifo\IP\IP; // for expanding IPv6 address in DNSBL() |
|
|
|
|
|
|
|
if (!extension_loaded('gettext')) { |
|
|
|
require_once 'inc/lib/gettext/gettext.inc'; |
|
|
|
} |
|
|
@ -1807,23 +1810,7 @@ function ReverseIPv4Octets($ip) { |
|
|
|
} |
|
|
|
|
|
|
|
function ReverseIPv6Octets($ip) { |
|
|
|
return strrev(implode(".", str_split(str_replace(':', '', inet_expand($ip))))); |
|
|
|
} |
|
|
|
|
|
|
|
// copypastad from lib/IP/Lifo/IP.php, TODO replace this with a proper include |
|
|
|
function inet_expand($ip) |
|
|
|
{ |
|
|
|
// strip possible cidr notation off |
|
|
|
if (($pos = strpos($ip, '/')) !== false) { |
|
|
|
$ip = substr($ip, 0, $pos); |
|
|
|
} |
|
|
|
$bytes = unpack('n*', inet_pton($ip)); |
|
|
|
if (count($bytes) > 2) { |
|
|
|
return implode(':', array_map(function ($b) { |
|
|
|
return sprintf("%04x", $b); |
|
|
|
}, $bytes)); |
|
|
|
} |
|
|
|
return $ip; |
|
|
|
return strrev(implode(".", str_split(str_replace(':', '', IP::inet_expand($ip))))); |
|
|
|
} |
|
|
|
|
|
|
|
function wordfilters(&$body) { |
|
|
|