Joined: Aug 30, 2005 Posts: 3186 Location: near Albany NY
Posted:
Fri Jul 13, 2007 7:15 am
LOL, this is getting a big response. I'm going to try out the following code on my test system but I'll probably need to move it to a real system to get real results, fortunately hackers can't get into my local host. Anyway, right after the NS code I quoted, in the for loop that processes the get variables I'm going to try:
Code:
if (eregi("Forums", $secvalue)) {
if(eregi("username", $sec_key)) {
$sqluser = 'SELECT username FROM '.$prefix_users.' WHERE username = \''.$sec+value.'\'';
$result = $db->sql_query($sqluser);
$numusers = $db->sql_numrows($result2);
if ($numusers == 0) {
block_ip($blocker_row);
}
}
If anyone sees anything obviously wrong or "dangerous" with this, let me know. I'll post back when I get some results. The more I look at IP tracking results, the more of these spam things I see and I want them banned automatically.
It's hard to test this on a localhost, you need to get rid of the admin cookie to even get into this loop. So I'll try it on hackers from Turkey, Russia etc. and see if it gets them.
Joined: Aug 30, 2005 Posts: 3186 Location: near Albany NY
Posted:
Mon Jul 16, 2007 7:58 am
There is an additional error in my code posted above. I put the tic mark around $prefix in the wrong place. I will post the corrected code below. I can make the ban work after I delete my admin cookie and clear any protected ranges AND copy the get string in from NS's tracked IP's database. However, it does not appear to be banning these GETS "in the wild". I'm puzzled. I'm going to post some of my log stuff "internally" to try to get feedback from the experts and I'll post any resolutions back here. If anyone sees anything obvious feel free to post here.
You'll note that I put a diagnostic variable in which I echoed back out in footer.php in my localhost system to make sure I was getting the correct set of get variables. This is commented out in the code above. Obviously I wouldn't want this in a production system.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum