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.9'
-\ No newline at end of file
+__version__ = '2.0.11'
+\ No newline at end of file
diff --git a/httpz_scanner/scanner.py b/httpz_scanner/scanner.py
@@ -212,10 +212,10 @@ class HTTPZScanner:
tasks, return_when=asyncio.FIRST_COMPLETED
)
for task in done:
- result = await task
- if self.show_progress:
- count += 1 # Increment counter here
- yield result
+ if result := await task: # Only yield if result is not None
+ if self.show_progress:
+ count += 1
+ yield result
task = asyncio.create_task(self.check_domain(session, domain))
tasks.add(task)
@@ -229,10 +229,10 @@ class HTTPZScanner:
tasks, return_when=asyncio.FIRST_COMPLETED
)
for task in done:
- result = await task
- if self.show_progress:
- count += 1
- yield result
+ if result := await task: # Only yield if result is not None
+ if self.show_progress:
+ count += 1
+ yield result
task = asyncio.create_task(self.check_domain(session, domain))
tasks.add(task)
@@ -251,10 +251,10 @@ class HTTPZScanner:
tasks, return_when=asyncio.FIRST_COMPLETED
)
for task in done:
- result = await task
- if self.show_progress:
- count += 1
- yield result
+ if result := await task: # Only yield if result is not None
+ if self.show_progress:
+ count += 1
+ yield result
task = asyncio.create_task(self.check_domain(session, domain))
tasks.add(task)
@@ -264,7 +264,7 @@ class HTTPZScanner:
if tasks:
done, _ = await asyncio.wait(tasks)
for task in done:
- result = await task
- if self.show_progress:
- count += 1
- yield result
-\ No newline at end of file
+ if result := await task: # Only yield if result is not None
+ if self.show_progress:
+ count += 1
+ yield result
+\ No newline at end of file
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.9',
+ version='2.0.11',
author='acidvegas',
author_email='acid.vegas@acid.vegas',
description='Hyper-fast HTTP Scraping Tool',
| | |