0

I am working on idea to check port status of websites using NMAP library of python. so, I done some code, I used This Link to check 'open' word in dictionary I was getting in to print directly port number and status.

I need help to get result fast as I am not able to do it. I want to check port range of 80 to 443 ports.whenever I try to do that range It takes about 15 mins for one host (i.e. google.com). I have about 4-5 host names with range of 80 to 443 ports to check.

code image is for reference, what my code is looked like. but I used a list for host names. and basically two for loops to work all this. one for host name and other for range of port numbers.

any help is appreciated. Thank you

Code

DRPandya
  • 113
  • 3
  • 14

1 Answers1

0

Hmm, that’s really slow for a scan which would indicate to me there’s something wrong with the host you’re scanning (IDS?) or poor connection (you probably ruled this out). I believe IPs should be strings (as you correctly did in your script) but ports are numeric. Also maybe try scanning your local host or another local network machine which will be much faster and won’t block your IP. Either way, some other ways to improve your speed include multi-threading (via threading, Queue and a host of other libraries), passing the T1-5 flags in Nmap (-T0 is slowest, -T3 is default, -T5 is insane mode). There’s also IDS evasive Nmap settings if you’re set on scanning actual remote hosts

YUNG MOON
  • 1
  • 1
  • Thank You Yung Moon, I will try with Local machine. (cause I am busy with other projects). Can you guide me to use T1-5 flags in Nmap? cause I don`t have idea about it. and about IDS evasive Nmap Settings. – DRPandya Aug 30 '20 at 12:10