RoliSoft/ReconScan

Required modules

Closed this issue · 5 comments

I prepared your script with "chmod +x recon.py" and ran it with "./recon.py -v 192.168.10.10" and received this error......

Traceback (most recent call last):
File "./recon.py", line 21, in
from libnmap.parser import NmapParser
ImportError: No module named 'libnmap'

I did a little googleing and eventually found what I thought was the solution.....

"sudo python -m pip install python-libnmap "

I am still receiving the error listed above, so I googled some more and ran "help('modules') at the python prompt. This listed my installed modules, but libnmap was not among them.

"updatedb" & "locate libnmap" show libnmap is installed at
/usr/local/lib/python2.7/dist-packages/libnmap

Do you have any advice on why libnmap isn't working for me?

I think it has to do with the module not being properly imported into python. I'm trying to follow the advice here...

https://askubuntu.com/questions/470982/how-to-add-a-python-module-to-syspath/471168

I think this might be the solution, it's just not working yet.

It seems that you have installed python-libnmap into Python 2.7, however, the script is written in Python 3.

Since the script is running with "./recon.py", you already have a Python 3 interpreter already installed, you just need to install python-libnmap into Python 3 instead of 2.7. To do so, run sudo pip3 install python-libnmap

If you don't have pip3, follow the instructions from here to get it: http://stackoverflow.com/a/6587528/156626

Thanks for the followup, I appreciate it. I can't believe I didn't notice the python version; the small things matter. I'm almost out of data for this month and the python3-pip download is quite large. I'll have to try it at the end of the month.

same error i got
same to be fix if install pip3 ---> python 3 ---> colorama
i do this
pip3 install python-libnmap
bash: pip3: command not found
i see i dont have pip3 so i try to install pip3 whit --->>
apt-get install python3-pip
pip3 install python-libnmap
if u don`t have coloramta on python3 you better get one
pip3 install colorama
It seems to work for me

Another way is to download https://pypi.python.org/pypi/python-libnmap & https://pypi.python.org/pypi/colorama

Then run python3 /python-libnmap/setup.py install
& python3 /colorama/setup.py install