mIRC Home    About    Download    Register    News    Help

Print Thread
#112228 22/02/05 06:24 AM
A
asib
asib
A
I need Flood Protection , 1st i have a Small Chat Server, and im Geting Attacks alot, Please help me.. ok here what i want..
-
*Flood Loads More Then 100's BOTs On the Server ! and i want to Ban that BOTs, 5 BOTS join in 4 sec and i want to Ban them ALL Tougher and Plus Set the Room Modes ! Can you Please help me Making this Code ? Please
thank you !
Ex:
* ]XXX[124393 (~XXX@7119E937.EA5293F5.D8CDE87.IP) has joined #Mirc
* ]XXX[867236 (~XXX@C04778D3.C30729C4.559E8F0B.IP) has joined #Mirc
* [1XXX[331965 (~XXX@F65C355C.4595C5E2.A7244040.IP) has joined #Mirc
* ]XXX[284320 (XXX@6E8A57BA.702E3580.F4A96B29.IP) has joined #Mirc
* ]XXX[021308 (~XXX@BEA08345.CC72575C.F4A96B29.IP) has joined #Mirc
* ]XXX[444240 (~XXX@727DA85D.6046D588.3C848823.IP) has joined #Mirc

*See All this With Diff IP joined Toghter !! Please help me makeing this Code

*Notice i did Post this be4 no one Replayed me ! so Please this time let me know ! please

#112229 22/02/05 02:20 PM
Joined: Dec 2002
Posts: 1,536
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,536
you could try something like banning (when you get opped in the channel - after filtering out before the [ you'll notice that there's the same number of characters in the nickname)):

//mode # +b *[??????!*@*

or (which might be more effective):

//mode # +b *!*XXX@*

or (if you can afford to do this):

//mode # +b *!*@*.ip

That should help for starters. Maybe you'd need to talk to somebody on your network about being join-flooded *shrug*


Those who fail history are doomed to repeat it
#112230 22/02/05 04:51 PM
Joined: Dec 2002
Posts: 143
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 143
If joining is all what they do, it's a piece of cake.

Simply identify a pattern in their fulladdress and set a ban according to it.

In your example, you have 2 choices.

/ban *xxx*!*@*
/ban *!*xxx@*

This will freeze all bots in your channel and no other will be able to join.

And then, kick them at will.

But they do more, aren't they?

#112231 22/02/05 05:10 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
You could try:
Code:
on @*:Join:#: {
  if ($ial == $false) { 
    .ial on 
  } 
  if ($chan($chan).ial == $false) { 
    who $chan 
  } 
  var %x = $ialchan($wildsite,$chan,0)
  if ($ialchan($wildsite,$chan,0) >= 1) {
    while (%x) {
      ban -k $chan $ialchan($wildsite,$chan,%x).nick You appear to be a clone.
      dec %x
    }
  }
}


That should kick ban anyone who comes in providing they have a clone in there.
Hope that helps.

#112232 23/02/05 09:03 AM
A
asib
asib
A
Its Not a Clone ! you Can Call its a Proxy ! spybot , rxbot thats what they flood with... sometime they come with RanDom nick ! so by just baning there nick its wont work.. i want it like this in 30 Sec 5 user can join on Channel ! if its join more then that then bot will auto ban there ip !

#112233 23/02/05 09:59 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Ok, well proxy then, that would ban the nickname of the second person on that address. This should ban the host:

Code:
on @*:Join:#: {
  if ($ial == $false) { 
    .ial on 
  } 
  if ($chan($chan).ial == $false) { 
    who $chan 
  } 
  var %x = $ialchan($wildsite,$chan,0)
  if ($ialchan($wildsite,$chan,0) >= 1) {
    while (%x) {
      ban $chan $address($ialchan($wildsite,$chan,%x).nick,2)
      kick $chan $ialchan($wildsite,$chan,%x).nick You appear to be a clone.
      dec %x
    }
  }
}

#112234 23/02/05 11:04 AM
C
captain_comic
captain_comic
C
Quote:
I need Flood Protection

I use a very nice routine I got once from Dalnet. You can use this to detect all kinds of floods, including the kind of joinflood you describe.

alias isflood {
;Call this identifier each time you want to check if there is a flood, for example
;on *:JOIN:*: if ($isflood(joinflood,5,3)) { mode # +i }

; $1 - name eg "joinflood"
; $2 - times (in how many seconds)
; $3 - seconds

;If not enough parameters, return
if (!$3) return

var %v = $chr(37) $+ isflood. $+ $1

;If the var doesnt exist
if !$(%v,2) {

;Set it to 1
set $(-u $+ $3,2) $(%v,1) 1
}

else {
;Else increment the var
inc $(%v,1)
}
;If the var is more than or equal to what you specified (times)
if $(%v,2) >= $2 {

;Unset the variable so it doesnt continually return true
unset $(%v,1)

return $true
}

; If it is not triggered return false
return $false
}

#112235 24/02/05 02:30 AM
A
asib
asib
A
This isnt working ? frown

#112236 24/02/05 02:32 AM
A
asib
asib
A
Hm.. i have the Clones one.. but this isnt Clone ! alot of BOTs join at Once with many diff ISP(S)

#112237 24/02/05 10:27 PM
C
captain_comic
captain_comic
C
Quote:
Hm.. i have the Clones one.. but this isnt Clone ! alot of BOTs join at Once with many diff ISP(S)

The flood routine I suggested has nothing to do with ISP's, but can count the number of joins per period (or the number of lines per period in your querywindow, etc). Call it in an on JOIN event with: if ($isflood(joinflood, 5, 4)) { .. actions if 5 or more joins in 4 seconds happen .. }
Maybe you have to play with the parameters, try 5,3 5,6 4,4
Good luck

#112238 25/02/05 07:26 AM
I
Iori
Iori
I
set a limit of <users>+5 or so, then you'll only need to worry about 5 bots.
Code:
on @*join:#:.timerlimit $+ # 1 5 mode # +l $!calc($nick( # ,0)+5)
on @*part:#:.timerlimit $+ # 1 5 mode # +l $!calc($nick( # ,0)+5)

#112239 25/02/05 07:29 AM
I
Iori
Iori
I
Quote:
*Notice i did Post this be4 no one Replayed me !

Uh, I did. Asking for just this info

#112240 01/03/05 01:35 AM
A
asib
asib
A
Thanks ! that will Help tho

#112241 01/03/05 01:37 AM
A
asib
asib
A
Thank you very much ! that will doo good "captain_comic" "Iori " smile

Last edited by asib; 01/03/05 01:38 AM.

Link Copied to Clipboard