IRCP

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

commit e89c30217e27bbe1fd70df10ea7a019c41b4e343
parent 9871e08cf42072cd4f5ec4baa585ad3763dc7ce0
Author: acidvegas <acid.vegas@acid.vegas>
Date: Mon, 29 May 2023 00:27:23 -0400

Capture raw data before ban exception is raised

Diffstat:
Mircp.py | 4++--

1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ircp.py b/ircp.py
@@ -282,6 +282,8 @@ class probe:
 							self.snapshot[numeric].append(line)
 						elif type(self.snapshot[numeric]) == str:
 							self.snapshot[numeric] = [self.snapshot[numeric], line]
+				else:
+					self.snapshot['raw'].append(line)
 				if line.startswith('ERROR :Closing Link'):
 					raise Exception('DroneBL') if 'dronebl' in line.lower() else Exception('Banned')
 				elif line.startswith('ERROR :Trying to reconnect too fast') or line.startswith('ERROR :Your host is trying to (re)connect too fast') or line.startswith('ERROR :Reconnecting too fast'):
@@ -360,8 +362,6 @@ class probe:
 							else:
 								if [i for i in ('You\'re banned','You are permanently banned','You are banned','You are not welcome') if i in msg]:
 									raise Exception('K-Lined')
-				else:
-					self.snapshot['raw'].append(line)
 			except (UnicodeDecodeError, UnicodeEncodeError):
 				pass
 			except Exception as ex: