Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
look for vuls from dzscan.org based on plugin name
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyc0 committed Oct 17, 2015
1 parent 1bef83a commit 52d2668
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
15 changes: 12 additions & 3 deletions dzscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from utils import HEADERS
from utils import examine, banner
from utils import USAGE, parseCmd
from utils import fetch_vul

import datetime
import re, sys, time
Expand Down Expand Up @@ -205,8 +206,8 @@ def fetch_index_plugin(self):
base.fetch_index_plugin()

print '[-] Enumerating plugins from passive detection ...'
base.init_addon()
base.execute()
# base.init_addon()
# base.execute()

if not base.log:
pointer = sys.stdout
Expand All @@ -215,8 +216,16 @@ def fetch_index_plugin(self):
log_name = urlsplit(base.url)[1].replace('.', '_')
pointer = open('%s.log' % log_name, 'a')

pointer.write('\n')
for out in base.outs:
pointer.write('\n\n[+] Plugin "%s" \n******** \n\n用来写漏洞内容的\n\n********\n\n' % out)
ids = fetch_vul(out)
pointer.write('[-] Plugin %s found !\n' % out)
if not ids:
pointer.write('[!] But no vul(s) relative to this plugin : (\n\n')
else:
for id in ids:
pointer.write('[+] Found vul No.%s relative : )' % id)
pointer.write('Enter http://dzscan.org/index.php/welcome/view?id=%s to view detail' % id)

pointer.write('[+] %s plugins found. \n' % (len(base.outs) or 'No'))
pointer.write('[+] Finished: %s.\n' % time.ctime())
Expand Down
8 changes: 5 additions & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def examine(content):


def fetch_vul(addon):
fetch_url = 'http://dzscan.org/index.php/welcome/view?plugin=%s' % addon
json_data = json.loads(requests.get(fetch_url).content)
ids = set()
url = 'http://dzscan.org/index.php/welcome/view?plugin=%s' % addon
json_data = json.loads(requests.get(url).content)
for vul in json_data:
return "http://dzscan.org/index.php/welcome/view?id=%s" % vul['id']
ids.add(vul['id'])
return ids

0 comments on commit 52d2668

Please sign in to comment.