MyKings / python-masscan

python-masscan is a python library which helps in using masscan port scanner.
https://pypi.org/project/python-masscan/
GNU General Public License v3.0
281 stars 60 forks source link

Exception string indices must be integers when scanning range #40

Closed xq1xq1xq1 closed 1 year ago

xq1xq1xq1 commented 2 years ago

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"

MyKings commented 2 years ago

Please use mas.scan(scan_ntwk, ports=scan_ports, arguments='--max-rate '+ scan_rate) for testing.