mirror of https://github.com/n1nj4sec/pupy.git
Update wesng
This commit is contained in:
parent
7ee41cb352
commit
1245883b90
|
@ -1 +1 @@
|
||||||
Subproject commit 4b6d92112115a706e9c8af44e68bd7bbc900fbe6
|
Subproject commit 802dc10fd6ec7ada1aab44f31906fedc96b8fb22
|
|
@ -40,6 +40,9 @@ class Exploit_Suggester(PupyModule):
|
||||||
@classmethod
|
@classmethod
|
||||||
def init_argparse(cls):
|
def init_argparse(cls):
|
||||||
cls.arg_parser = PupyArgumentParser(prog='Exploit_Suggester', description=cls.__doc__)
|
cls.arg_parser = PupyArgumentParser(prog='Exploit_Suggester', description=cls.__doc__)
|
||||||
|
cls.arg_parser.add_argument(
|
||||||
|
'-no-recent-kb', default=False, action='store_true',
|
||||||
|
help='Do not filter findings by most recent KB date')
|
||||||
cls.arg_parser.add_argument(
|
cls.arg_parser.add_argument(
|
||||||
'--hide', nargs='+', default='',
|
'--hide', nargs='+', default='',
|
||||||
help='(WES only) Hide vulnerabilities of for example Adobe Flash Player and Microsoft Edge')
|
help='(WES only) Hide vulnerabilities of for example Adobe Flash Player and Microsoft Edge')
|
||||||
|
@ -123,7 +126,7 @@ class Exploit_Suggester(PupyModule):
|
||||||
wes = imp.load_source('wes', WES_PATH)
|
wes = imp.load_source('wes', WES_PATH)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cves, date = wes.load_defintions(definitions)
|
cves, date = wes.load_definitions(definitions)
|
||||||
except BadZipfile:
|
except BadZipfile:
|
||||||
self.error(
|
self.error(
|
||||||
'Defintions were downloaded incorrectly ({})'.format(
|
'Defintions were downloaded incorrectly ({})'.format(
|
||||||
|
@ -154,7 +157,17 @@ class Exploit_Suggester(PupyModule):
|
||||||
self.error(e.msg)
|
self.error(e.msg)
|
||||||
return
|
return
|
||||||
|
|
||||||
filtered = wes.apply_display_filters(filtered, found, args.hide, True)
|
if not args.no_recent_kb:
|
||||||
|
recentkb = wes.get_most_recent_kb(found)
|
||||||
|
if recentkb:
|
||||||
|
recentdate = int(recentkb['DatePosted'])
|
||||||
|
found = list(filter(lambda kb: int(kb['DatePosted']) >= recentdate, found))
|
||||||
|
|
||||||
|
if 'Windows Server' in productfilter:
|
||||||
|
self.info('Filtering duplicate vulnerabilities')
|
||||||
|
found = wes.filter_duplicates(found)
|
||||||
|
|
||||||
|
filtered = wes.apply_display_filters(found, args.hide, True, [])
|
||||||
if not filtered:
|
if not filtered:
|
||||||
self.info('No vulnerabilities found')
|
self.info('No vulnerabilities found')
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue