mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +00:00
Allow win32_fatal_raw_sockets to take a NULL devname.
This commit is contained in:
parent
422b43be22
commit
19d1115ef1
1 changed files with 7 additions and 1 deletions
|
|
@ -252,10 +252,16 @@ static void print_xml_service(const struct serviceDeductions *sd) {
|
|||
/* Show a fatal error explaining that an interface is not Ethernet and won't
|
||||
work on Windows. Do nothing if --send-ip (PACKET_SEND_IP_STRONG) was used. */
|
||||
void win32_fatal_raw_sockets(const char *devname) {
|
||||
if ((o.sendpref & PACKET_SEND_IP_STRONG) == 0) {
|
||||
if ((o.sendpref & PACKET_SEND_IP_STRONG) == 0)
|
||||
return;
|
||||
|
||||
if (devname != NULL) {
|
||||
fatal("Only ethernet devices can be used for raw scans on Windows, and\n"
|
||||
"\"%s\" is not an ethernet device. Use the --unprivileged option\n"
|
||||
"for this scan.", devname);
|
||||
} else {
|
||||
fatal("Only ethernet devices can be used for raw scans on Windows. Use\n"
|
||||
"the --unprivileged option for this scan.", devname);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue