From 2ebc2ee09e46c765e4692072f26589bb88ed098d Mon Sep 17 00:00:00 2001 From: Ajin Abraham Date: Sun, 18 Nov 2018 11:19:25 +0530 Subject: [PATCH] update scanner --- plugins/scanners.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/scanners.py b/plugins/scanners.py index cfd640b..b83e5c1 100644 --- a/plugins/scanners.py +++ b/plugins/scanners.py @@ -22,13 +22,15 @@ def find_cms(url): return "unknown" -def cmd_runner(cmd): +def cmd_runner(cmd, jsono=True): try: result = check_output(cmd, stderr=STDOUT, universal_newlines=True) return result except CalledProcessError as exc: print("[ERROR]", exc.returncode, exc.output) - return json.dumps(json.loads(exc.output.strip())) + if jsono: + return json.dumps(json.loads(exc.output.strip())) + return exc.output.strip() def droopescan(url): @@ -43,7 +45,7 @@ def droopescan(url): def update_wpscan(): print("[INFO] Updating WPScan") - cmd_runner(['wpscan', '--update']) + cmd_runner(['wpscan', '--update'], False) def wpscan(url):