IRCP

- information gathering tool for irc servers
git clone git://git.acid.vegas/IRCP.git
Log | Files | Refs | Archive | README | LICENSE

commit 03a2e8c4a5b4caec40454661daf0c1ecb83c445b
parent 483e21ab2525c5e5e1d710dde397864b79837b9d
Author: acidvegas <acid.vegas@acid.vegas>
Date: Wed, 31 May 2023 00:23:03 -0400

Better formatting * channel errors output

Diffstat:
MREADME.md | 2+-
Mircp.py | 9+++++----

2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
@@ -152,8 +152,8 @@ With that being said, the ability for anyone to be able to do what this project 
 * Checking for IPv6 availability *(SSL= in 005 responses may help verify IPv6)*
 * Support for IRC servers using old versions of SSL
 * Create a seperate log for failed connections *(Sync to file every hour maybe)*
-* Add snapshot boolean for rbl/proxy detection/scanning
 * Ability to link multiple IRCP instances running in daemon mode together for balancing
+* Remote syncing the logs to another server
 
 ## Mirrors
 - [acid.vegas](https://git.acid.vegas/ircp)
diff --git a/ircp.py b/ircp.py
@@ -148,7 +148,7 @@ def ssl_ctx():
 class probe:
 	def __init__(self, server, semaphore):
 		self.server    = server
-		self.display   = server.ljust(18)+' \033[30m|\033[0m '
+		self.display   = server.ljust(18)+' \033[30m|\033[0m unknown network           \033[30m|\033[0m '
 		self.semaphore = semaphore
 		self.nickname  = None
 		self.snapshot  = {'raw':list()}
@@ -312,11 +312,12 @@ class probe:
 							self.snapshot[numeric] = [self.snapshot[numeric], line]
 				else:
 					self.snapshot['raw'].append(line)
-				if numeric in ('470','471','473','747','475','477','489','519','520'):
+				if numeric in ('405','470','471','473','747','475','477','489','519','520') and len(args) >= 5:
 					chan = args[3]
+					msg = ' '.join(args[4:])[1:]
 					if chan in self.channels['users']:
 						del self.channels['users'][chan]
-					error(f'{self.display}\033[31merror\033[0m - {chan}', line)
+					error(f'{self.display}\033[31merror\033[0m - {chan}', msg)
 				elif line.startswith('ERROR :Closing Link') and 'dronebl' in line.lower():
 					self.snapshot['proxy'] = True
 					error(self.display + '\033[93mDroneBL detected\033[30m')
@@ -355,7 +356,7 @@ class probe:
 				elif numeric == '323': # RPL_LISTEND
 					if self.channels['all']:
 						del self.loops['init']
-						debug(self.display + 'found \033[93m{0}\033[0m channel(s)'.format(str(len(self.channels['all']))))
+						debug(self.display + '\033[36mLIST\033[0m found \033[93m{0}\033[0m channel(s)'.format(str(len(self.channels['all']))))
 						self.loops['chan']  = asyncio.create_task(self.loop_channels())
 						self.loops['nick']  = asyncio.create_task(self.loop_nick())
 						self.loops['whois'] = asyncio.create_task(self.loop_whois())