############################################################## ## MOD Title: Block DNSBL Blacklisted Posting - Black ## MOD Author: Mittineague < N/A > ( N/A ) http://www.mittineague.com/dev ## MOD Description: Prevents those whose IP address is listed on DNSBLs from posting ## and inflicts a time cost. ## MOD Version: 1.0.1 ## ## Installation Level: Easy ## Installation Time: 1 Minute ## ## Files To Edit: 2 posting.php ## language/lang_english/lang_main.php ## ############################################################## ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## ## This MOD is based heavily (almost entirely) on the ## DNSBL Blacklisted Registrants MOD by TerraFrost ## TerraFrost < N/A > (Jim Wigginton) http://www.frostjedi.com/phpbb ## ## The author found that although DNSBL and Open Proxy registrations ## were successfully being blocked by using TerraFrost's MODs, SPAM ## posts were still being made by "members" that had registered using ## "good" IP addresses. ## ## ***** This version of the Block DNSBL Blacklisted Posting MOD ## is indentical to the original version - EXCEPT ## it inflicts a time cost. Like all things with evil intentions ## it does not come at a cost to only the inflicted. ## It is a "2 edged sword" in that not only the offending IP must ## suffer, but the forum server must also "drink from the same cup". ## Keep this in mind if you choose to use higher "nap" values. ***** ## ############################################################## ## MOD History: ## ## 2007-01-22 - Version 1.0.0 initial release ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------ # posting.php # #-----[ FIND ]------------------------------------------ # $refresh = $preview || $poll_add || $poll_edit || $poll_delete; # #-----[ BEFORE, ADD ]------------------------------------ # DIY - $nap_time is randomly set between 3 seconds and 11 seconds # if not appropriate for you, change to suit your level of evilness # *see Author Notes above # if ( (isset($mode)) && ($mode != '') ) { include_once $phpbb_root_path . 'language/lang_english/lang_main.php'; $address = $HTTP_SERVER_VARS['REMOTE_ADDR']; $rev = implode('.',array_reverse(explode('.', $address))); $nap_time = mt_rand(3000000, 11000000); $lookup = "$rev.l1.spews.dnsbl.sorbs.net"; if ($lookup != gethostbyname($lookup)) { usleep($nap_time); message_die(GENERAL_MESSAGE, strtr($lang['dsbl_p'],array('%url%' => "http://www.spews.org/ask.cgi?x=$address"))); } $lookup = "$rev.sbl-xbl.spamhaus.org"; if ($lookup != gethostbyname($lookup)) { usleep($nap_time); message_die(GENERAL_MESSAGE, strtr($lang['dsbl_p'],array('%url%' => "http://www.spamhaus.org/query/bl?ip=$address"))); } $lookup = "$rev.list.dsbl.org"; if ($lookup != gethostbyname($lookup)) { usleep($nap_time); message_die(GENERAL_MESSAGE, strtr($lang['dsbl_p'],array('%url%' => "http://dsbl.org/listing?$address"))); } } # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_main.php # #-----[ FIND ]------------------------------------------ # $lang['A_critical_error'] = 'A Critical Error Occurred'; # #-----[ AFTER, ADD ]------------------------------------ # $lang['dsbl_p'] = '
Your IP address is on a DNS-based Blackhole List.
Posting attempt blocked.
'; # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM