diff --git a/httpz_scanner/__init__.py b/httpz_scanner/__init__.py
@@ -6,4 +6,4 @@ from .scanner import HTTPZScanner
from .colors import Colors
-__version__ = '2.0.1'
-\ No newline at end of file
+__version__ = '2.0.2'
+\ No newline at end of file
diff --git a/httpz_scanner/cli.py b/httpz_scanner/cli.py
@@ -7,11 +7,13 @@ import asyncio
import logging
import os
import sys
+import json
-from .colors import Colors
-from .scanner import HTTPZScanner
-from .utils import SILENT_MODE, info
-from .parsers import parse_status_codes, parse_shard
+from .colors import Colors
+from .scanner import HTTPZScanner
+from .utils import SILENT_MODE, info
+from .parsers import parse_status_codes, parse_shard
+from .formatters import format_console_output
def setup_logging(level='INFO', log_to_disk=False):
'''
@@ -147,8 +149,12 @@ async def main():
shard=args.shard
)
- # Run the scanner with file/stdin input
- await scanner.scan(args.file)
+ # Run the scanner and process results
+ async for result in scanner.scan(args.file):
+ if args.jsonl:
+ print(json.dumps(result))
+ else:
+ print(format_console_output(result, args.debug, show_fields, args.match_codes, args.exclude_codes))
except KeyboardInterrupt:
logging.warning('Process interrupted by user')
diff --git a/setup.py b/setup.py
@@ -10,7 +10,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
setup(
name='httpz_scanner',
- version='2.0.1',
+ version='2.0.2',
author='acidvegas',
author_email='acid.vegas@acid.vegas',
description='Hyper-fast HTTP Scraping Tool',
| | |