Description
Description of the issue
I'm encountering an issue where masscan reports a negative wait time after the scan has apparently completed in Kali WSL. This prevents my scripts from completing normally, as they rely on the wait time to determine when the scan is finished.
Specifically, after masscan finishes scanning, the wait time in the output becomes negative, such as "-1s", "-2s", etc. Even though all the targeted scans have finished, the masscan process does not exit, causing my scripts to hang. This issue specifically occurs within the Windows Subsystem for Linux (WSL) environment using Kali Linux.
Steps to reproduce
- Operating System: Windows [Windows Version, e.g., 10/11] with Kali WSL
- WSL Version: [WSL 1 or WSL 2] (Use
wsl --list --verbose
to check) - Kali WSL Version: [Output of
lsb_release -a
inside Kali WSL] - masscan Version: [Output of
masscan --version
inside Kali WSL] - Command used: [The exact command you used, e.g.,
sudo masscan -p1-65535 192.168.1.0/24 --rate 1000
] - Network environment: [Any relevant information about your network within WSL, e.g., bridged mode, NAT mode, etc. Also mention if you're using any VPN within WSL or on the Windows host. E.g., "WSL is using NAT mode, no VPN connected on Windows host."]
- Expected behavior: masscan should exit with a non-negative wait time (or exit immediately) after completing the scan.
- Actual behavior: masscan reports a negative wait time and the process does not terminate.
Example output
[Paste the complete output of masscan from within Kali WSL, including the negative wait time. Please use code blocks for better readability.]
For example:
masscan -p1-65535 192.168.1.0/24 --rate 1000
Starting masscan 1.3 (http://bit.ly/14tV5HH) at 2024-10-27 10:00:00 GMT
-- rate 1000.00 packets/sec, 256 targets, duration 4 minutes 16 seconds
Starting SYN scan
Scanning 256 hosts [1 port/host]
Discovered open port 80/tcp on 192.168.1.1
Discovered open port 443/tcp on 192.168.1.2
...
Finished SYN scan in 4.2 minutes
Wait time: -2s