python-masscan icon indicating copy to clipboard operation
python-masscan copied to clipboard

hello,When I was using the python-masscan package, I encountered the following problems. My version is 3.7, and I think it's because I don't have administrator privileges to use it. But when I use it in the flask framework, I can't use the'sudo'command. I hope you can help me.

Open Sunllnus opened this issue 5 years ago • 6 comments

This is my code: import masscan mas = masscan.PortScanner() mas.scan('47.99.62.36', ports='22,80,3306') print(mas.scan_result)

error: Traceback (most recent call last): File "/Users/xf/.virtualenvs/test/lib/python3.7/site-packages/masscan/masscan.py", line 371, in analyse_masscan_xml_scan dom = ET.fromstring(self._masscan_last_output) File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/xml/etree/ElementTree.py", line 1316, in XML return parser.close() xml.etree.ElementTree.ParseError: no element found: line 1, column 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/xf/Desktop/test/demo.py", line 3, in mas.scan('47.99.62.36', ports='22,80,3306') File "/Users/xf/.virtualenvs/test/lib/python3.7/site-packages/masscan/masscan.py", line 317, in scan masscan_warn_keep_trace=masscan_warn_keep_trace File "/Users/xf/.virtualenvs/test/lib/python3.7/site-packages/masscan/masscan.py", line 375, in analyse_masscan_xml_scan raise ET.ParseError xml.etree.ElementTree.ParseError: None

Sunllnus avatar May 13 '19 05:05 Sunllnus

@Sunllnus
Please upgrade your python-masscan to v0.1.3 version and try it.

MyKings avatar May 21 '19 11:05 MyKings

Thank you for helping me upgrade to version 0.1.3 as you said. But the error still exists, and I have to use the sudo command to execute it.

Sunllnus avatar May 21 '19 12:05 Sunllnus

@MyKings

Sunllnus avatar May 21 '19 12:05 Sunllnus

Having the same issue, is there any fix for this?

heychazza avatar Jun 13 '22 14:06 heychazza

Having the same issue, is there any fix for this?

I don't understand what you mean, can you provide a detailed description of the environment and the error message?

MyKings avatar Jun 15 '22 03:06 MyKings

Having the same issue, is there any fix for this?

I don't understand what you mean, can you provide a detailed description of the environment and the error message?

That it requires sudo to run

heychazza avatar Jun 15 '22 06:06 heychazza