1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 09:29:01 +00:00

Give a better error message "requires root privileges" when trying to run a raw

scan on Windows with --unprivileged. Previously Nmap assumed that the only way
o.isr00t could be false on Windows was if pcap functions were not available, so
the user would get the false message "requires that WinPcap version 3.1 or
higher...". NmapOps now has a state variable have_pcap so the meaning of isr00t
isn't overloaded.
This commit is contained in:
david
2008-11-20 00:15:42 +00:00
parent a6b78f7bd4
commit b87ef8aabd
3 changed files with 10 additions and 9 deletions

View File

@@ -145,6 +145,8 @@ class NmapOps {
adjustments (quietly or with a warning to the
user). */
int isr00t;
/* Whether we have pcap functions (can be false on Windows). */
bool have_pcap;
int debugging;
#define PACKET_SEND_NOPREF 1