Not able to use nmap in python

+1 vote

I am trying to create a port scanner using python with nmap module. I have imported to nmap module but I am getting error:

>>> nm = nmap.PortScanner()
AttributeError: module 'nmap' has no attribute 'PortScanner'
Jan 28, 2019 in Cyber Security & Ethical Hacking by Pavan
3,404 views

1 answer to this question.

+1 vote

nmap module doesn’t have PortScanner attribute. The module you need to install to use PortScanner is python-nmap.

To install this, you can run the following command in command prompt/terminal:

pip install python-nmap
answered Jan 28, 2019 by Omkar
• 69,220 points
i did but it wasn't work in my case
Can you post the error?

Related Questions In Cyber Security & Ethical Hacking

0 votes
0 answers

I do not have a real result about encryption file use AES mode CFB in pycrptodome on python

I'm using Ubuntu win. on python I ...READ MORE

Aug 23, 2019 in Cyber Security & Ethical Hacking by Ahmed
• 310 points

closed Aug 23, 2019 by Ahmed 885 views
0 votes
1 answer

How to use Python to read block of data in txt file and convert it to structured data?

Okay, I understand. To extract structured data ...READ MORE

answered Apr 19, 2023 in Cyber Security & Ethical Hacking by Edureka
• 12,690 points
1,555 views
0 votes
0 answers
+1 vote
2 answers

python nmap can't find PortScanner attribute

you want install        1.pip uninstall nmap        2.pip install python-nmap in ...READ MORE

answered Jan 25, 2020 in Python by Rangertech_hacker234
8,831 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,434 views
0 votes
1 answer
0 votes
1 answer

Not able to run nmap scan on router.

Might not be the actual router address. ...READ MORE

answered Jan 31, 2019 in Cyber Security & Ethical Hacking by Omkar
• 69,220 points
1,866 views
+1 vote
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP