Welcome to Geeklog, Anonymous Tuesday, April 16 2024 @ 10:51 pm EDT

Geeklog Forums

Modified Spam-X script to thwart dictionary word attacker


Status: offline

nad

Forum User
Newbie
Registered: 04/12/07
Posts: 1
Hi All, I modified the BlackList.Examine.class script to be able to search for _missing_ required characters.
Text Formatted Code

35,37c35,36
<  *
<  * @author Tom Willett tomw AT pigstye DOT net
<  * contributor Dan Nalven dmn AT nalven DOT org
---
>  *
>  * @author Tom Willett tomw AT pigstye DOT net
70,85c69,76
<         if (! preg_match ( '/your_regex_here/', $comment)) {
<             $ans = 1;
<             SPAMX_log ($LANG_SX00['foundspam'] . 'nomoresecrets' .
<                 $LANG_SX00['foundspam2'] . $uid .
<                 $LANG_SX00['foundspam3'] . $_SERVER['REMOTE_ADDR']);
<                 return $ans;
<         } else {
<             for ($i = 1; $i <= $nrows; $i++) {
<                 list ($val) = DB_fetchArray ($result);
<                 if (preg_match ("#$val#i", $comment)) {
<                     $ans = 1; // quit on first positive match
<                     SPAMX_log ($LANG_SX00['foundspam'] . $val .
<                                $LANG_SX00['foundspam2'] . $uid .
<                                $LANG_SX00['foundspam3'] . $_SERVER['REMOTE_ADDR']);
<                     break;
<                 }
---
>         for ($i = 1; $i <= $nrows; $i++) {
>             list ($val) = DB_fetchArray ($result);
>             if (preg_match ("#$val#i", $comment)) {
>                 $ans = 1; // quit on first positive match
>                 SPAMX_log ($LANG_SX00['foundspam'] . $val .
>                            $LANG_SX00['foundspam2'] . $uid .
>                            $LANG_SX00['foundspam3'] . $_SERVER['REMOTE_ADDR']);
>                 break;
 
If you think that this would be useful, I would be happy to go through the rest of the Spam-X scripts to make this available through the Admin scripts and forward my changes. My strength is perl but I think that I can get the hang of php. Dan
 Quote

All times are EDT. The time is now 10:51 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content