From 610e056f4e41b225774aaa23745b788ca3f71ad7 Mon Sep 17 00:00:00 2001 From: "Devansh Raghav - @vip3r" <79361298+DevanshRaghav75@users.noreply.github.com> Date: Sun, 25 Jul 2021 16:52:47 +0700 Subject: [PATCH] #1 Fixed unwanted spaces while printing the URLs --- grepX/core/greper.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/grepX/core/greper.py b/grepX/core/greper.py index 9e2ef14..55025f5 100644 --- a/grepX/core/greper.py +++ b/grepX/core/greper.py @@ -324,10 +324,10 @@ def grep_xss(): for each_pattern in xss_patterns: if re.findall(each_pattern, each_read): if SILENT: - print(each_read, file=OUTPUT) + print(each_read,sep='', end='', file=OUTPUT) pass else: - print(each_read) + print(each_read, sep='', end='') found.append(each_read) for i in found: print(i, file=OUTPUT) @@ -341,10 +341,10 @@ def grep_sqli(): for pattern in sqli_patterns: if re.findall(pattern, TAR): if SILENT: - print(TAR, file=OUTPUT) + print(TAR,sep='', end='' , file=OUTPUT) pass else: - print(TAR) + print(TAR, sep='', end='') found.append(TAR) for i in found: print(i, file=OUTPUT) @@ -357,10 +357,10 @@ def grep_lfi(): for pattern in lfi_patterns: if re.findall(pattern, TAR): if SILENT: - print(TAR, file=OUTPUT) + print(TAR,sep='', end='', file=OUTPUT) pass else: - print(TAR) + print(TAR, sep='', end='') found.append(TAR) for i in found: print(i, file=OUTPUT) @@ -373,10 +373,10 @@ def grep_ssrf(): for pattern in ssrf_patterns: if re.findall(pattern, TAR): if SILENT: - print(TAR, file=OUTPUT) + print(TAR,sep='', end='', file=OUTPUT) pass else: - print(TAR) + print(TAR, sep='', end='') found.append(TAR) for i in found: print(i, file=OUTPUT) @@ -389,10 +389,10 @@ def grep_ssti(): for pattern in ssti_patterns: if re.findall(pattern, TAR): if SILENT: - print(TAR, file=OUTPUT) + print(TAR,sep='', end='', file=OUTPUT) pass else: - print(TAR) + print(TAR, sep='', end='') found.append(TAR) for i in found: print(i, file=OUTPUT) @@ -405,10 +405,10 @@ def grep_rce(): for pattern in rce_patterns: if re.findall(pattern, TAR): if SILENT: - print(TAR, file=OUTPUT) + print(TAR,sep='', end='', file=OUTPUT) pass else: - print(TAR) + print(TAR, sep='', end='') found.append(TAR) for i in found: print(i, file=OUTPUT) @@ -421,10 +421,10 @@ def grep_idor(): for pattern in idor_patterns: if re.findall(pattern, TAR): if SILENT: - print(TAR, file=OUTPUT) + print(TAR,sep='', end='', file=OUTPUT) pass else: - print(TAR) + print(TAR, sep='', end='') found.append(TAR) for i in found: print(i, file=OUTPUT) @@ -437,10 +437,10 @@ def grep_redirect(): for pattern in redirect_patterns: if re.findall(pattern, TAR): if SILENT: - print(TAR, file=OUTPUT) + print(TAR,sep='', end='', file=OUTPUT) pass else: - print(TAR) + print(TAR, sep='', end='') found.append(TAR) for i in found: - print(i, file=OUTPUT) \ No newline at end of file + print(i, file=OUTPUT)