Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
execution time increases with --exclude-port #1581
I am trying to automate some scan by using the following command
nmap -iL ip.list -oG - -sT -Pn --exclude-ports 80,443
the same command without the --exclude-ports takes about 3 minutes for about 30 IPs. but the moment I include this with, the time increases to around 3 minutes per IP.
I am trying to understand the possible coz for the behavior and if there is a workaround for doing the same
Thanks for the report. Can you provide output of
One possibility is that some of your targets are heavily firewalled and only have ports 80 and 443 unblocked. In this case, Nmap will still scan the target because of
The other possibility is that
If this does not fix the problem, then the problem is in the behavior of the target (like I first suggested) and not in the code involved with
and sorry for being too abrupt in my last response. got too excited as it worked.
I am on Nmap version 7.60. and all I did was generated a safe-ports file like you mentioned. but I actually excluded port 80 and 443 from it. and it just worked for me.
let me know if you want me to test anything else to determine what caused the issue. will be happy to help.