View Single Post
  #35  
Old 06-06-2008, 08:21 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: [PATCH] Blocking those pesky hackers

Hi Scotty, .htaccess is not modified by the StopList module

Additionally, the StopList module is originally intended to block people from the cart, not from the website. My code just hijacked the module a bit to ban hackers from the site more easily.

Regarding the H vs M, in auth.php, change the SQL statement to the following:
PHP Code:
if($stop_list func_query("SELECT * FROM $sql_tbl[stop_list] WHERE ip LIKE '$REMOTE_ADDR' AND (reason = 'H' OR reason = 'M') ")) { 

Also, revert the part that bans them, back to how it was:
PHP Code:
func_add_ip_to_slist($REMOTE_ADDR'H'); 

And change the strpos bit, to this (to only match http, and ftp, at the beginning of the string):
PHP Code:
if(substr($v04)=='http' || substr($v03)=='ftp') { 
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote