mirror of
git://git.acid.vegas/IRCP.git
synced 2024-11-22 16:06:41 +00:00
Added random nick changes every 5 minutes
This commit is contained in:
parent
3795798be9
commit
ae275bef6a
@ -95,7 +95,6 @@ All of the raw data from a server is logged & stored. The categories below are s
|
|||||||
* Capture `IRCOPS` & `STATS p` command outputs
|
* Capture `IRCOPS` & `STATS p` command outputs
|
||||||
* Built in identd
|
* Built in identd
|
||||||
* Checking for IPv6 availability *(SSL= in 005 responses may help verify IPv6)*
|
* Checking for IPv6 availability *(SSL= in 005 responses may help verify IPv6)*
|
||||||
* Random nick changes for stealth on larger networks
|
|
||||||
* Support for IRC servers using old versions of SSL
|
* Support for IRC servers using old versions of SSL
|
||||||
|
|
||||||
## Mirrors
|
## Mirrors
|
||||||
|
26
ircp.py
26
ircp.py
@ -22,8 +22,9 @@ class settings:
|
|||||||
class throttle:
|
class throttle:
|
||||||
channels = 3 # Maximum number of channels to scan at once
|
channels = 3 # Maximum number of channels to scan at once
|
||||||
delay = 120 # Delay before registering nick (if enabled) & sending /LIST
|
delay = 120 # Delay before registering nick (if enabled) & sending /LIST
|
||||||
join = 10 # Delay between channel joins
|
join = 10 # Delay between channel JOINs
|
||||||
part = 3 # Delay before leaving a channel
|
nick = 300 # Delay between every random NICK change
|
||||||
|
part = 3 # Delay before PARTing a channel
|
||||||
threads = 100 # Maximum number of threads running
|
threads = 100 # Maximum number of threads running
|
||||||
timeout = 15 # Timeout for all sockets
|
timeout = 15 # Timeout for all sockets
|
||||||
whois = 3 # Delay between WHOIS requests
|
whois = 3 # Delay between WHOIS requests
|
||||||
@ -137,7 +138,7 @@ class probe:
|
|||||||
self.snapshot = copy.deepcopy(snapshot) # <--- GET FUCKED PYTHON
|
self.snapshot = copy.deepcopy(snapshot) # <--- GET FUCKED PYTHON
|
||||||
self.channels = {'all':list(), 'current':list(), 'users':dict()}
|
self.channels = {'all':list(), 'current':list(), 'users':dict()}
|
||||||
self.nicks = {'all':list(), 'check':list()}
|
self.nicks = {'all':list(), 'check':list()}
|
||||||
self.loops = {'init':None,'chan':None,'nick':None}
|
self.loops = {'init':None,'chan':None,'nick':None,'whois':None}
|
||||||
self.reader = None
|
self.reader = None
|
||||||
self.writer = None
|
self.writer = None
|
||||||
|
|
||||||
@ -222,15 +223,27 @@ class probe:
|
|||||||
else:
|
else:
|
||||||
await asyncio.sleep(throttle.join)
|
await asyncio.sleep(throttle.join)
|
||||||
del self.channels['users'][chan]
|
del self.channels['users'][chan]
|
||||||
|
self.loops['nick'].cancel()
|
||||||
while self.nicks['check']:
|
while self.nicks['check']:
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
self.loops['nick'].cancel()
|
self.loops['whois'].cancel()
|
||||||
await self.raw('QUIT')
|
await self.raw('QUIT')
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
pass
|
pass
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
error(self.display + 'error in loop_channels', ex)
|
error(self.display + 'error in loop_channels', ex)
|
||||||
|
|
||||||
|
async def loop_nick(self):
|
||||||
|
try:
|
||||||
|
while True:
|
||||||
|
await asyncio.sleep(throttle.nick)
|
||||||
|
await self.raw('NICK ' + self.nickname)
|
||||||
|
self.nickname = rndnick()
|
||||||
|
except asyncio.CancelledError:
|
||||||
|
pass
|
||||||
|
except Exception as ex:
|
||||||
|
error(self.display + 'error in loop_nick', ex)
|
||||||
|
|
||||||
async def loop_whois(self):
|
async def loop_whois(self):
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
@ -287,8 +300,9 @@ class probe:
|
|||||||
elif numeric == '323': # RPL_LISTEND
|
elif numeric == '323': # RPL_LISTEND
|
||||||
if self.channels['all']:
|
if self.channels['all']:
|
||||||
debug(self.display + 'found {0} channel(s)'.format(str(len(self.channels['all']))))
|
debug(self.display + 'found {0} channel(s)'.format(str(len(self.channels['all']))))
|
||||||
self.loops['chan'] = asyncio.create_task(self.loop_channels())
|
self.loops['chan'] = asyncio.create_task(self.loop_channels())
|
||||||
self.loops['nick'] = asyncio.create_task(self.loop_whois())
|
self.loops['nick'] = asyncio.create_task(self.loop_nick())
|
||||||
|
self.loops['whois'] = asyncio.create_task(self.loop_whois())
|
||||||
elif numeric == '352' and len(args) >= 8: # RPL_WHORPL
|
elif numeric == '352' and len(args) >= 8: # RPL_WHORPL
|
||||||
nick = args[7]
|
nick = args[7]
|
||||||
if nick not in self.nicks['all']+['BOPM','ChanServ','HOPM']:
|
if nick not in self.nicks['all']+['BOPM','ChanServ','HOPM']:
|
||||||
|
Loading…
Reference in New Issue
Block a user