IRCP

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

commit 7eb8f1cce27353b72c100f7f0c4648eb9125add7
parent af94eca852fa65fad6f0295467b2e2ed91ab0f34
Author: acidvegas <acid.vegas@acid.vegas>
Date: Wed, 31 May 2023 19:40:45 -0400

Added option to search strings in all logs

Diffstat:
Mparser.py | 5++++-

1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/parser.py b/parser.py
@@ -19,9 +19,12 @@ def parse(option, data, raw=True):
 if len(sys.argv) >= 2:
 	option  = sys.argv[1]
 	raw    = True
+	search = False
 	if len(sys.argv) == 3:
 		if sys.argv[2] == 'clean':
 			raw = False
+		elif sys.argv[2] == 'search':
+			search = True
 	logs  = os.listdir('logs')
 	found = list()
 	for log in logs:
@@ -38,7 +41,7 @@ if len(sys.argv) >= 2:
 				elif type(data) == list:
 					for item in data:
 						found.append(parse(option, item, raw))
-			else:
+			elif search:
 				for item in data:
 					_data = data[item]
 					if type(_data) == str and option in _data: