Skip to content

Commit

Permalink
wfpayload, fix non fuzzres payload
Browse files Browse the repository at this point in the history
  • Loading branch information
xmendez committed Apr 10, 2019
1 parent f46009f commit ae012c5
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/wfuzz/wfuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from .ui.console.common import help_banner2
from .ui.console.clparser import CLParser

from .fuzzobjects import FuzzResult


def main():
kb = None
Expand Down Expand Up @@ -105,19 +107,26 @@ def usage():

try:
session_options = CLParser(sys.argv).parse_cl()
printer = View(session_options)
printer.header(None)
printer = None

for res in payload(**session_options):
if len(res) > 1:
raise FuzzExceptBadOptions("wfpayload can only be used to generate one word dictionaries")
else:
r = res[0]

r._description = field
# TODO: option to not show headers in fuzzres
# TODO: all should be same object
if isinstance(r, FuzzResult):
if printer is None:
printer = View(session_options)
printer.header(None)

printer.result(r)
print("")
if field:
r._description = field
printer.result(r)
else:
print(r)

except KeyboardInterrupt:
pass
Expand Down

0 comments on commit ae012c5

Please sign in to comment.