Implement staggered WHO information collection to avoid detection
This commit is contained in:
parent
ae017eab36
commit
a61f74e578
|
@ -27,7 +27,8 @@
|
||||||
"Prefix": "*"
|
"Prefix": "*"
|
||||||
},
|
},
|
||||||
"Delays": {
|
"Delays": {
|
||||||
"WhoLoop": 60
|
"WhoLoop": 600,
|
||||||
|
"WhoRange": 1800
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Default": {
|
"Default": {
|
||||||
|
|
|
@ -3,6 +3,8 @@ from twisted.words.protocols.irc import IRCClient
|
||||||
from twisted.internet.defer import Deferred
|
from twisted.internet.defer import Deferred
|
||||||
from twisted.internet.task import LoopingCall
|
from twisted.internet.task import LoopingCall
|
||||||
|
|
||||||
|
from random import randint
|
||||||
|
|
||||||
import modules.keyword as keyword
|
import modules.keyword as keyword
|
||||||
import modules.userinfo as userinfo
|
import modules.userinfo as userinfo
|
||||||
import modules.counters as count
|
import modules.counters as count
|
||||||
|
@ -247,7 +249,10 @@ class IRCBot(IRCClient):
|
||||||
main.saveConf("masterbuf")
|
main.saveConf("masterbuf")
|
||||||
lc = LoopingCall(self.getWho, channel)
|
lc = LoopingCall(self.getWho, channel)
|
||||||
self._getWho[channel] = lc
|
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):
|
def left(self, channel, message):
|
||||||
if channel in self.channels:
|
if channel in self.channels:
|
||||||
|
@ -266,6 +271,8 @@ class IRCBot(IRCClient):
|
||||||
keyword.sendMaster("KICK %s: (%s/%s) %s" % (self.name, kicker, channel, message))
|
keyword.sendMaster("KICK %s: (%s/%s) %s" % (self.name, kicker, channel, message))
|
||||||
count.event(self.name, "selfkick")
|
count.event(self.name, "selfkick")
|
||||||
monitor.event(self.name, channel, {"type": "kick", "exact": kicker, "nick": nick, "ident": ident, "host": host, "message": message})
|
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):
|
def userJoined(self, user, channel):
|
||||||
nick, ident, host = self.parsen(user)
|
nick, ident, host = self.parsen(user)
|
||||||
|
|
Loading…
Reference in New Issue