mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
o Added --ip-options support for the connect() scan (-sT). [Kris]
This commit is contained in:
parent
ffb3d8202d
commit
299e0de19e
4 changed files with 16 additions and 0 deletions
|
|
@ -58,6 +58,8 @@ o Nsock now supports binding to a local address and setting IPv4 options
|
|||
o Nmap's Nsock-utilizing subsystems (DNS, NSE, version detection) have been
|
||||
updated to support the -S and --ip-options flags. [Kris]
|
||||
|
||||
o Added --ip-options support for the connect() scan (-sT). [Kris]
|
||||
|
||||
Nmap 4.68 [2008-6-28]
|
||||
|
||||
o Doug integrated all of your version detection submissions and
|
||||
|
|
|
|||
|
|
@ -2588,6 +2588,8 @@ static UltraProbe *sendConnectScanProbe(UltraScanInfo *USI, HostScanStats *hss,
|
|||
unblock_socket(CP->sd);
|
||||
init_socket(CP->sd);
|
||||
set_ttl(CP->sd, o.ttl);
|
||||
if (o.ipoptionslen)
|
||||
set_ipoptions(CP->sd, o.ipoptions, o.ipoptionslen);
|
||||
if (hss->target->TargetSockAddr(&sock, &socklen) != 0) {
|
||||
fatal("Failed to get target socket address in %s", __func__);
|
||||
}
|
||||
|
|
|
|||
10
tcpip.cc
10
tcpip.cc
|
|
@ -161,6 +161,16 @@ setsockopt(sd, IPPROTO_IP, IP_HDRINCL, (const char *) &one, sizeof(one));
|
|||
#endif
|
||||
}
|
||||
|
||||
void set_ipoptions(int sd, void *opts, size_t optslen)
|
||||
{
|
||||
#ifdef IP_OPTIONS
|
||||
if (sd == -1)
|
||||
return;
|
||||
|
||||
setsockopt(sd, IPPROTO_IP, IP_OPTIONS, opts, optslen);
|
||||
#endif
|
||||
}
|
||||
|
||||
void set_ttl(int sd, int ttl)
|
||||
{
|
||||
#ifdef IP_TTL
|
||||
|
|
|
|||
2
tcpip.h
2
tcpip.h
|
|
@ -663,6 +663,8 @@ pcap_if_t *getpcapinterfaces();
|
|||
struct sys_route *getsysroutes(int *howmany);
|
||||
void sethdrinclude(int sd);
|
||||
|
||||
void set_ipoptions(int sd, void *opts, size_t optslen);
|
||||
|
||||
void set_ttl(int sd, int ttl);
|
||||
|
||||
/* Fill buf (up to buflen -- truncate if necessary but always
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue