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

How to use PortScannerYield?Got an error #11

Closed liuyoyi closed 5 years ago

liuyoyi commented 5 years ago

AttributeError: 'PortScanner' object has no attribute 'listscan'

MyKings commented 5 years ago

@liuyoyi Provide script or scan parameters?

MyKings commented 5 years ago

I think you can add the following debug code in line 354 of the masscan/masscan.py script.

asser type(masscan_err_keep_trace) is list, masscan_err

The final effect might look like this :)


         assert type(masscan_err_keep_trace) is list, masscan_err

        if masscan_xml_output is not None:
             self._masscan_last_output = masscan_xml_output
kw2583 commented 3 years ago

Encountering this same issue. Searching through the code, listscan is only found in one place, which is line 607, but listscan isn't actually implemented anywhere. From what I can tell, it should probably refer to all_hosts, but simply replacing listscan with all_hosts doesn't do the trick.