This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

wideban in sentinel

Old posts that have not been replied to for several years.
Locked
E
EEggy
Op
Posts: 122
Joined: Thu Sep 26, 2002 11:46 pm

wideban in sentinel

Post by EEggy »

Hi,

I like this "sl_wideban" feature in sentinel, but how do i ignore the undernet host "users.undernet.org" in the codes?? i mean which procedure in the sentinel?? i am new and don't want to mess the codes. Thanks
EEggy
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

Find the proc sl_dcheck and replace it with the following. It is based on the sentinel.tcl included with netbots.tcl v4.09, and all that's been added is an extra check in an if statement and a comment about it.

Code: Select all

proc sl_dcheck {bhosts} {
  set blist ""
  foreach bhost $bhosts {
    set baddr [lindex [split [maskhost $bhost] "@"] 1]
    set bident [string trimleft [lindex [split $bhost "@"] 0] "~"]
    if {![info exists baddrs($baddr)]} {
      set baddrs($baddr) 1
    } else {
      incr baddrs($baddr)
    }
    if {![info exists bidents($bident)]} {
      set bidents($bident) 1
    } else {
      incr bidents($bident)
    }
  }
  foreach baddr [array names baddrs] {
    # don't ban *.undernet.org as it's used as a hidden host for authenticated users on Undernet
    if {![string match -nocase "*.undernet.org" $baddrs($baddr)] && $baddrs($baddr) >= 2} {
      lappend blist *!*@$baddr
    }
  }
  foreach bident [array names bidents] {
    if {$bidents($bident) >= 2} {
      lappend blist *!*$bident@*
    }
  }
  return $blist
}
This quick and untested fix is probably not suitable for general use as it opens a hole on other networks (could allow flooders with *.undernet.org hosts to subvert wideban, as unlikely as that may be).
E
EEggy
Op
Posts: 122
Joined: Thu Sep 26, 2002 11:46 pm

Post by EEggy »

Thanks a lot.
EEggy
Locked