Skip to content

Commit

Permalink
update scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinabraham committed Nov 18, 2018
1 parent 56e958b commit 2ebc2ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/scanners.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit 2ebc2ee

Please sign in to comment.