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,259 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,230 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 836 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,377 views
+1 vote
3 answers

Not able to install arpspoof

There is no package called arpspoof. To use the arpspoof command, ...READ MORE

answered Feb 9, 2019 in Cyber Security & Ethical Hacking by Omkar
• 69,230 points
61,778 views
0 votes
1 answer

Not able to run nikto scan on nikto-test.com

Hi, the webpage nikto-test.com doesn’t exist anymore. ...READ MORE

answered Apr 1, 2019 in Cyber Security & Ethical Hacking by Karan

reshown Apr 1, 2019 by Omkar 2,782 views
+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,649 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,350 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,230 points
1,814 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