diff --git a/httpz_scanner/__init__.py b/httpz_scanner/__init__.py index 99c8c3d..9b3fe52 100644 --- 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.5' \ No newline at end of file +__version__ = '2.0.6' \ No newline at end of file diff --git a/httpz_scanner/cli.py b/httpz_scanner/cli.py index 93b24d3..b43d481 100644 --- a/httpz_scanner/cli.py +++ b/httpz_scanner/cli.py @@ -148,7 +148,6 @@ async def main(): shard=args.shard ) - # Run the scanner and handle ALL output here count = 0 async for result in scanner.scan(args.file): # Write to output file if specified @@ -156,15 +155,17 @@ async def main(): with open(args.output, 'a') as f: f.write(json.dumps(result) + '\n') - # Console output - if args.progress: - count += 1 - info(f"[{count}] {format_console_output(result, args.debug, show_fields, args.match_codes, args.exclude_codes)}") - else: - if args.jsonl: - print(json.dumps(result)) + # Only output and increment counter if we have content to show + formatted = format_console_output(result, args.debug, show_fields, args.match_codes, args.exclude_codes) + if formatted: + if args.progress: + count += 1 + info(f"[{count}] {formatted}") else: - print(format_console_output(result, args.debug, show_fields, args.match_codes, args.exclude_codes)) + if args.jsonl: + print(json.dumps(result)) + else: + print(formatted) except KeyboardInterrupt: logging.warning('Process interrupted by user') diff --git a/setup.py b/setup.py index 073e9f4..21df55a 100644 --- 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.5', + version='2.0.6', author='acidvegas', author_email='acid.vegas@acid.vegas', description='Hyper-fast HTTP Scraping Tool',