mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 05:09:14 +00:00
Allow win32_fatal_raw_sockets to take a NULL devname.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user