Menu

#17 Add IP block list

Next_Release
open
Keilaron
7
2005-03-19
2003-12-12
Jan Houtsma
No

Near line 121 in shoutbox.php (added some context):

if (isFlooding() >= 3) {
$error .= _PROCESS_FLOODING;
}

// ADDED BY Jan Houtsma --JHH-- FROM HERE
if ($REMOTE_ADDR == "xxx.xx.xx.xx" ||
$REMOTE_ADDR == "81.205.5.69"
) {
$f = "/var/www/html/shout/blocked.log";
$fd = fopen($f,"a");

fwrite($fd,$nick."|".$shout."|".time()."|".$url."|".$REMOTE_ADDR."\n");

fclose($fd);

$error .= _BLOCKED_IP;
}
// ADDED BY Jan Houtsma --JHH-- UNTIL HERE

if (!isset($error)) { // check for null or default
posts
//$nick = htmlspecialchars($nick,ENT_QUOTES);
//$shout = htmlspecialchars($shout,ENT_QUOTES);

Then also add BLOCKED_IP in your language packs for
example shoutbox_langpack_dutch.php:
========================================================================================

// ADDED BY Jan Houtsma --JHH-- FROM HERE
define("_BLOCKED_IP","Je adres is geblokkeerd! Mocht je
weer toegang willen stuur dan een email n
aar webmaster@augustinusschool.nl");
// ADDED BY Jan Houtsma --JHH-- UNTIL HERE

It would be even better to use a seperate file with IP
addresses to be blocked.

The uploaded shoutbox.php contains this change among
others you might ignore.

Discussion

  • Jan Houtsma

    Jan Houtsma - 2003-12-12

    Search for JHH

     
  • Keilaron

    Keilaron - 2005-03-19
    • priority: 5 --> 7
    • assigned_to: nobody --> keilaron
     
  • Keilaron

    Keilaron - 2005-03-19

    Logged In: YES
    user_id=1049905

    IP banning already going to be implemented, but thanks :)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.