You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some case it is useful to force the format on stdout (--output=-).
This patch add --format=csv|json|text. This patch doesn't modify
anything in the current Wafw00f behavior, it ensure CLI compatibility.
rules are:
- if recognize file extension (csv, json), format is ingnored
- if do not reconize extension and format is not set, default format is text
- if do not reconize extension and format set, sue the format.
Co-authored-by: Thierry Fournier <[email protected]>
Copy file name to clipboardExpand all lines: wafw00f/main.py
+33-3Lines changed: 33 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -320,6 +320,8 @@ def main():
320
320
parser.add_option('-t', '--test', dest='test', help='Test for one specific WAF')
321
321
parser.add_option('-o', '--output', dest='output', help='Write output to csv, json or text file depending on file extension. For stdout, specify - as filename.',
322
322
default=None)
323
+
parser.add_option('-f', '--format', dest='format', help='Force output format to csv, json or text.',
324
+
default=None)
323
325
parser.add_option('-i', '--input-file', dest='input', help='Read targets from a file. Input format can be csv, json or text. For csv and json, a `url` column name or element is required.',
0 commit comments