python-masscan
python-masscan copied to clipboard
Exception string indices must be integers when scanning range
I am running Python 3.9.7 with python-masscan 0.1.6
I trying to scan a range of IP Addresses in the format: X.X.X.X-Y.Y.Y.Y
My command in the script is:
scan_rate = "1000" ports = "nnn,ooo,ppp" scan_ntwk = "X.X.X.X-Y.Y.Y.Y" mas.scan("--range " + scan_ntwk, ports=scan_ports, arguments='--max-rate '+ scan_rate)
I get this exception: - string indices must be integers
It seems to work fine when in prefix format as scan_ntwk = "X.X.X.X/ZZ"
Please use mas.scan(scan_ntwk, ports=scan_ports, arguments='--max-rate '+ scan_rate)
for testing.