mirror of
https://github.com/nmap/nmap.git
synced 2026-08-28 04:25:15 +00:00
Show a warning whenever raw socket sending is attempted on Windows--not just
when using --send-ip.
This commit is contained in:
parent
e02f4bc983
commit
4ff30d9b99
6 changed files with 30 additions and 0 deletions
|
|
@ -1526,6 +1526,9 @@ void UltraScanInfo::Init(vector<Target *> &Targets, struct scan_lists *pts, styp
|
|||
rawsd = -1;
|
||||
} else {
|
||||
/* Initialize a raw socket */
|
||||
#ifdef WIN32
|
||||
win32_warn_raw_sockets(Targets[0]->deviceName());
|
||||
#endif
|
||||
if ((rawsd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0 )
|
||||
pfatal("socket troubles in %s", __func__);
|
||||
/* We do not wan't to unblock the socket since we want to wait
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue