monkey.patch_all(thread=False) still patches the queue module, which
replaces queue.SimpleQueue used internally by ThreadPoolExecutor with
a gevent queue. Worker threads in ThreadPoolExecutor have no gevent
hub, causing LoopExit ("This operation would block forever") and
AssertionError ("Can only use Waiter.switch method from the Hub
greenlet") exceptions during scanning.
Adding queue=False preserves the standard queue for ThreadPoolExecutor
while keeping gevent's socket/ssl patching for cooperative I/O.
- Refactor the serial port scanning logic of the `_scan` method in `core.py`.
- Extract the `_scan_port` method to handle the logic for a single port, and within the `_scan` function, utilize `gevent.spawn` and `gevent.joinall` to implement concurrent scanning of multiple ports on the target IP using coroutines.
- Address the significant time-consuming bottleneck caused by serial waiting of multiple ports during target packet loss.
- Initialize `requests.Session()` in the `POCTemplate` base class and configure `Connection: keep-alive`
- Replace all `requests.get` and `requests.post` calls in the `pocs/` directory with Session-based requests
- The explicitly declared `Connection: close` header in each POC has been removed, allowing for the reuse of underlying TCP connections and significantly reducing handshake latency during batch scanning.
- Modify the `get_all_ip` function in `utils/net.py` from returning a complete list to using a `yield` generator, to prevent Out-Of-MemoryError (OOM) when scanning large network segments (such as /8 or /16).
- In the `_generate_ip` function in `data.py`, which is responsible for restoring the scanning state, `itertools.islice` is introduced to replace the unsupported generator slicing operation, ensuring correct skipping logic during the resumption of scanning for large network segments.
- Fix gevent.exceptions.LoopExit in SnapshotPipeline.process() by
adding timeout to queue.get() and catching exceptions, preventing
the thread from crashing when the gevent hub has no pending events
- Add --no-resume CLI flag to start a fresh scan instead of resuming
from a previous interrupted scan, addressing the need to clear
scan cache
Closes#118, Closes#135