Implement staggered WHO information collection to avoid detection

pull/1/head
Mark Veidemanis 6 years ago
parent ae017eab36
commit a61f74e578

@ -27,7 +27,8 @@
"Prefix": "*"
},
"Delays": {
"WhoLoop": 60
"WhoLoop": 600,
"WhoRange": 1800
}
},
"Default": {

@ -3,6 +3,8 @@ from twisted.words.protocols.irc import IRCClient
from twisted.internet.defer import Deferred
from twisted.internet.task import LoopingCall
from random import randint
import modules.keyword as keyword
import modules.userinfo as userinfo
import modules.counters as count
@ -247,7 +249,10 @@ class IRCBot(IRCClient):
main.saveConf("masterbuf")
lc = LoopingCall(self.getWho, channel)
self._getWho[channel] = lc
lc.start(main.config["Tweaks"]["Delays"]["WhoLoop"])
intrange = main.config["Tweaks"]["Delays"]["WhoRange"]
minint = main.config["Tweaks"]["Delays"]["WhoLoop"]
interval = randint(minint, minint+intrange)
lc.start(interval)
def left(self, channel, message):
if channel in self.channels:
@ -266,6 +271,8 @@ class IRCBot(IRCClient):
keyword.sendMaster("KICK %s: (%s/%s) %s" % (self.name, kicker, channel, message))
count.event(self.name, "selfkick")
monitor.event(self.name, channel, {"type": "kick", "exact": kicker, "nick": nick, "ident": ident, "host": host, "message": message})
lc = self._getWho[channel]
lc.stop()
def userJoined(self, user, channel):
nick, ident, host = self.parsen(user)

Loading…
Cancel
Save