Update modules/botnet_protect.py
This commit is contained in:
parent
9d4de13e7c
commit
1369475afe
1 changed files with 9 additions and 9 deletions
|
@ -23,15 +23,15 @@ class IRCatModule:
|
||||||
raise Exception("Botnet detected!")
|
raise Exception("Botnet detected!")
|
||||||
def onSocket(self, ip, socket, value, cachedNick=None, validated=False):
|
def onSocket(self, ip, socket, value, cachedNick=None, validated=False):
|
||||||
if cachedNick != None:
|
if cachedNick != None:
|
||||||
if not (ip in self.memory and self.memory[ip] == 0):
|
print(value)
|
||||||
print(value)
|
if "JOIN" in value:
|
||||||
if "JOIN" in value:
|
target = value.split(" ")[1]
|
||||||
target = value.split(" ")[1]
|
self.memory[ip] = 1 # 1: Just joined the channel, continue observing.
|
||||||
self.memory[ip] = 1 # 1: Just joined the channel, continue observing.
|
print("Autoban> Somebody joined " + target)
|
||||||
print("Autoban> Somebody joined " + target)
|
if target.lower() == "#ircatsucks":
|
||||||
if target.lower() == "#ircatsucks":
|
self.ban(ip)
|
||||||
self.ban(ip)
|
elif "PRIVMSG" in value:
|
||||||
elif "PRIVMSG" in value:
|
if not (ip in self.memory and self.memory[ip] == 0):
|
||||||
target = value.split(" ")[1]
|
target = value.split(" ")[1]
|
||||||
content = " ".join(value.split(" ")[2:])[1:]
|
content = " ".join(value.split(" ")[2:])[1:]
|
||||||
if content in self.sus_strings:
|
if content in self.sus_strings:
|
||||||
|
|
Loading…
Add table
Reference in a new issue