StealthBot.net: AntiFlood Script - StealthBot.net

Jump to content

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

AntiFlood Script version 1.0.7

#1 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted November 20, 2009 - 03:20 AM

Name: AntiFlood
Author: AwaKening
Version: 1.0.8

Purpose: Locks your channel when floodbots are detected.

Requirements: Stealthbot Version 2.7.1 or higher

Commands:
antiflood (force triggers the flood)

floodreset (can be used to open the channel and reset the timer)

letmein (whisper only)
If the channel is locked, a user can whisper the bot (letmein) to have the channel open for only them to enter.

Settings:
NOTE: All settings can be found in scripts.ini

SameRealm - Count users of the same realm towards flood detection (Clan members still excluded)
If set to False, then only users with @ in their name would count towards the flood limit
Default True

CloseTime - Minutes to close channel when an attack is detected
Default 60

override - Seconds to allow a user in on whisper when channel is locked
Default 6

userLimit - Nonclan members and unsafelisted users per minute allowed to join the channel
Default 4

Sweep - Sweep kick the channel of users containing @ when a flood is detected
Default True

SafeLetmein - Require users to be safelisted or have access greater than 0 to be able to enter using (letmein)
Default False

LetMeIn - (Case Sensitive) whispered command to allow users a short access window to enter the channel during a lockdown
You can use /dnd as your password if you would like all whispers blocked while in lockdown.
Default letmein

Changelogs:
' 1.0.8 updated 01/12/2013
'    - /dnd can now be used as your letmein setting to block whispers all together
' 1.0.7 updated 03/17/2009
'    - New Setting "LetMeIn" to allow command change
' 1.0.6 updated 02/06/2009
'    - ChatDelay set to 0 on Load
'    - Save call to create a timer by utilizing MOTD Event
'    - Added setting SameRealm
' 1.0.5 updated 01/02/2009
'    - Whispers from users of other realms are now ignored
'    - Added a setting to require letmein users to be safelisted or have >0 access
' 1.0.4 updated 12/27/2009
'    - Added command to manually trigger flood
'    - Added /scq before /clan private
' 1.0.3 updated 12/01/2009
'    - Removed product limitation for letmein command
'    - Safelisted users now won't add to the flood counter
'    - Removed /scq and made all /clan commands priority 1
'    - Changed the cycle timer to round down on 1/2 instead of up
' 1.0.2 udpated 11/28/2009
'    - Changed the Cycle timer
'    - Added IsOnline check in the cycle timer
' 1.0.1 updated 11/22/2009
'    - Will not kick out clan members now when the bot is not part of a clan
'    - Safelisted members will not be kicked out during lockout
'    - Fixed an addq argument error in Sweep Channel



Additional Notes:
Some credit is due to The_Black_Ninja for the idea of this script

Floodbots apparently have been updated to whisper your bot with the letmein command in some cases. For this reason, users from other realms will not be let in anymore. Additional security can be enabled in your settings to check if the user is safelisted or has access greater than 0.

Attached File(s)



#2 User is offline   GurkenKinG Icon

  • Emperor of TBR
  • PipPipPip
  • Group: Members
  • Posts: 268
  • Joined: October-13 09

Posted November 21, 2009 - 01:01 PM

Can you please make a version with a floodbot detection which reacts on SEXP Users or STAR Users, so it goes in floodmode if more then 3 of them join during a period of time? Because when the clan channel is full of people, it can actually happen that the script makes your channel private and there is no flood attack at all (happened twice to me already)
Posted Image


Posted Image

#3 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted November 21, 2009 - 08:29 PM

I'll add some more options later to only count other products. For now, adjust the setting (userLimit=4) in scripts.ini. That's what it's there for. Clan members are never counted, so the only time the number goes up is with visitors. Floodbots come in so quickly that it would even trigger with a number much higher; you might just see a bit of spam before it happens.

#4 User is offline   GurkenKinG Icon

  • Emperor of TBR
  • PipPipPip
  • Group: Members
  • Posts: 268
  • Joined: October-13 09

Posted November 21, 2009 - 08:55 PM

ah, ok =) thx alot, your script is great
Posted Image


Posted Image

#5 User is offline   InsaneFirebat Icon

  • Group: Members
  • Posts: 83
  • Joined: September-12 09

Posted November 22, 2009 - 06:34 PM

your script kicks out clan members and other safelisted users as well... disabled til fixed
 [01:30:04 PM] <GoBn]Furious BU.33 ping time [125ms] Rank:  50 <none>>
 [01:30:13 PM] -- BU.33 [125ms] has joined the channel using WarCraft III: The Frozen Throne (Level: 22, icon tier Random, myrmidon icon, in clan GoBn).
 [01:30:13 PM] BU.33 was kicked out of the channel by GoBn]Furious (Channel Locked by Antiflood).
 [01:30:13 PM] -- BU.33 has left the channel.
 [01:30:14 PM] <GoBn]Furious BU.33 ping time [125ms] Rank:  50 <none>>
 [01:30:16 PM] <TheDragonClaw> safelist gobn and gex1
 [01:30:21 PM] <FuriousHatred> yea i did
 [01:30:25 PM] <FuriousHatred> hold on
 [01:30:45 PM] -- BU.33 [125ms] has joined the channel using WarCraft III: The Frozen Throne (Level: 22, icon tier Random, myrmidon icon, in clan GoBn).
 [01:30:48 PM] <FuriousHatred> sorry
 [01:30:49 PM] BU.33 was kicked out of the channel by GoBn]Furious (Channel Locked by Antiflood).
 [01:30:50 PM] -- BU.33 has left the channel.
 [01:30:51 PM] <FuriousHatred> wtf
 [01:30:53 PM] <FuriousHatred> ,whois gobn
 [01:30:55 PM] <GoBn]Furious BU.33 ping time [125ms] Rank:  50 S>
 [01:30:57 PM] <GoBn]Furious> GoBn (clan) [ (),  ()] holds rank 50 and flags S.
 [01:31:11 PM] -- Wolf-Lord [203ms] has joined the channel using WarCraft III: The Frozen Throne (Level: 24, icon tier Random, dragon turtle icon, in clan GoBn).
 [01:31:12 PM] Wolf-Lord was kicked out of the channel by GoBn]Furious (Channel Locked by Antiflood).

Fear the fearsome fury of the forest fawn! Posted Image Clan [email protected]
Posted Image

#6 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted November 22, 2009 - 06:55 PM

I didn't even think about safelist. I'll add it in.

As for it kicking out clan members, it's because your bot is not in your clan. I should have specified that in the instructions. I'll just make the script recognize that issue anyway. Give me a few minutes to update this.

#7 User is offline   GurkenKinG Icon

  • Emperor of TBR
  • PipPipPip
  • Group: Members
  • Posts: 268
  • Joined: October-13 09

Posted November 22, 2009 - 06:59 PM

I though it should just kick out users with "@" in the name during a flood? or does it also kick out any other users not in the clan?
Posted Image


Posted Image

#8 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted November 22, 2009 - 07:26 PM

Only @

He had an issue because his bot was just a channel operator, but not part of the clan at all. I've fixed it now though and updated the link.



#9 User is offline   InsaneFirebat Icon

  • Group: Members
  • Posts: 83
  • Joined: September-12 09

Posted November 22, 2009 - 11:52 PM

[06:51:34 PM] Error (#5): Invalid procedure call or argument in DestroyObj().
[06:51:34 PM] Error (#91): Object variable or With block variable not set in DestroyObj().

the console was flooded as soon as i reloaded the scripts with these errors repeated VERY many times
Fear the fearsome fury of the forest fawn! Posted Image Clan [email protected]
Posted Image

#10 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted November 23, 2009 - 12:14 AM

That's not an error with my script. Please download the latest SB build or go back to 2.7.1. It was an error introduced into one of the SB build updates.

#11 User is offline   InsaneFirebat Icon

  • Group: Members
  • Posts: 83
  • Joined: September-12 09

Posted November 23, 2009 - 01:15 AM

[08:06:30 PM] <GoBn]Furious> .: StealthBot Beta v2.7 - Build 454 :.
doesnt happen anymore thx
Fear the fearsome fury of the forest fawn! Posted Image Clan [email protected]
Posted Image

#12 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted November 29, 2009 - 08:21 PM

Updated to 1.0.2 for some minor changes.

Floods are becoming increasingly common. If measures are taken to stop the flooding, then maybe they will stop trying. They actually quit bothering my channel within a few days. That being said, lets get this script into official scripts so it's easy to find.

I'm open to suggestions to make this script better.

#13 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted November 30, 2009 - 12:11 AM

View PostAwaKening, on 29 November 2009 - 03:21 PM, said:

That being said, lets get this script into official scripts so it's easy to find.
Done.

Does your script re-arrange the queue items so that long text messages and greets are moved to the bottom or even eliminated when a flood is detected?

#14 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted November 30, 2009 - 12:58 AM

It does /scq right now. I suppose I could just put priority to private the clan instead. I've personally never messed with priorities to make sure that they even work.



#15 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted November 30, 2009 - 01:42 AM

I've done a few tests with AddQ "Message", Priority and the system actually sorts them pretty well, so if you do AddQ "/c private", 1 then theoretically, it should move that message to the top of the queue, provided the bot isn't banning the users internally cause those internal commands take precedence over the rest...that would be a tricky thing lol To tell the bot to stfu and private the channel now...

#16 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted November 30, 2009 - 04:37 AM

It's changed for next release then to remove /scq and just prioritize /c private

#17 User is offline   aka- Icon

  • member
  • PipPipPip
  • Group: Members
  • Posts: 106
  • Joined: October-07 09

Posted December 01, 2009 - 11:32 PM

The "letmein" isnt working for me. when we got atked i went and tryed it.

#18 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted December 02, 2009 - 05:14 AM

View Postaka-, on 01 December 2009 - 04:32 PM, said:

The "letmein" isnt working for me. when we got atked i went and tryed it.


It works just fine for me. You only have 6 seconds by default settings to get in the channel after you whisper it. The time can be changed if you need. If you still have problems, please post a log showing the channel lock and a user whispering it.

Script updated to 1.0.3. Check the changelog.

#19 User is offline   aka- Icon

  • member
  • PipPipPip
  • Group: Members
  • Posts: 106
  • Joined: October-07 09

Posted December 03, 2009 - 04:09 AM

View PostAwaKening, on 02 December 2009 - 05:14 AM, said:

It works just fine for me. You only have 6 seconds by default settings to get in the channel after you whisper it. The time can be changed if you need. If you still have problems, please post a log showing the channel lock and a user whispering it.

Script updated to 1.0.3. Check the changelog.


so u dont need any access to it, or do u? ill see when hey flood again.

ok nvm, it works. thanks awakening, and NIce script!

#20 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted December 03, 2009 - 06:40 AM

Thanks, and I'm glad it's working for you.

#21 User is offline   aka- Icon

  • member
  • PipPipPip
  • Group: Members
  • Posts: 106
  • Joined: October-07 09

Posted December 11, 2009 - 03:09 AM

Hmmmm, sometime this works.. but latly it hasnt... i just redled it and refresh my script. it still not locking the channle and so on..

#22 User is offline   The-Black-Ninja Icon

  • The Sex
  • Icon
  • Group: Scripting Moderators
  • Posts: 2,526
  • Joined: August-01 09

Posted December 11, 2009 - 03:15 AM

Awakening, when the channel gets set as private and your timer to open the channel gets activated, would you be able to put an Exit Sub in the Userjoins event so that it won't be going crazy trying to private the channel all the time AND/OR once the channel is set to private, start another timer that fires every 5 seconds that goes through the channel list and kicks/bans any remaining flood bots?

I did something like that on mine and it works decently.

#23 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted December 11, 2009 - 07:18 AM

When the channel is locked the first time, it should be going through and kicking the floodbots at that time. There's no need to check for floodbots every 5 seconds after because they can't get in.

It shouldn't be going crazy trying to reprivate the channel. The only people able to join the channel when it's private is clan members, and there is an exit sub at that point.

If LCase(GetInternalDataByUsername(Username, 0)) = Split(LCase(myChannel))(1) Then Exit Sub

I'm checking myChannel instead of botvars.clan because some people only have the bot with ops, but not in the clan.

Sub Event_Userjoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString, Banned)
 '// Am I a channel operator?
 If botFlags <> 2 Then Exit Sub

 '// Is the entering user a part of this clan?
 If LCase(GetInternalDataByUsername(Username, 0)) = Split(LCase(myChannel))(1) Then Exit Sub

 '// Is the user safelisted
 If IsSafelisted(Username) Then Exit Sub

 If Locked Then
  If Username = tempUser Then
   Call Temp_Timer()
  Else
   AddQ "/kick " &Username& " Channel Locked by Antiflood"
  End If
  Exit Sub
 End If

 userCount = userCount+1

 If userCount > AFSetting("userLimit") Then
  Locked = True
  AddQ "/clan private", 1
  userCount = AFSetting("CloseTime") * AFSetting("userLimit")
  If AFSetting("Sweep") Then
   Call SweepChannel()
  End If
  AddQ "Flood Detection:  Channel locked down for " &AFSetting("CloseTime")& " Minutes."
  AddQ "Nonclan users may whisper bot (letmein) for short access time."
 End If
End Sub


Copy and paste is changing my tabs to a single space :(




#24 User is offline   buckylawson Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: December-12 09

Posted December 13, 2009 - 09:16 PM

Hey I am eV.Sheriff from Clan GGL on Useast and I need some help with this script here, you see it works like a charm when it activates protection mode but the "clean floods" dont trigger it for some reason, can you make it so that if a message from an @ account detected in mutiples of 5 or more within 90 seconds it goes into protect or how does it act now?

#25 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted December 14, 2009 - 03:54 AM

Please describe "clean floods"

This system is simply checking for multiple users joining your channel that aren't in the clan. If too many join within a certain amount of time, then it locks.

Are you having a problem with just 1 username joining and repeating messages without leaving the channel? That type of flood is easier to control by using antispam.

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users