1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-19 22:19:02 +00:00
Commit Graph

8287 Commits

Author SHA1 Message Date
david
c5faae4b26 Call socket_bindtodevice for -sT scan. 2012-10-03 15:43:24 +00:00
david
84f4697c50 Call socket_bindtodevice in nmap_raw_socket. 2012-10-03 15:43:23 +00:00
david
6ec453e4e8 Add socket_bindtodevice function to Nbase.
The Linux-specific SO_BINDTODEVICE sockopt causes packets to be sent on
a specific interface, in cases where merely setting the source address
does not uniquely determine the interface.
2012-10-03 15:43:22 +00:00
david
a53e00afa1 Factor out an nmap_raw_socket function.
This does the common setup of a raw socket that we use everywhere.
2012-10-03 15:43:21 +00:00
david
19d1115ef1 Allow win32_fatal_raw_sockets to take a NULL devname. 2012-10-03 15:43:19 +00:00
david
422b43be22 Call nsp_setdevice after nsp_new in our Nsock pools.
The exceptions are the calls in ncat/ncat_connect.c and
nping/EchoServer.cc. Ncat doesn't have an option for the interface, and
I think Nping's -e option is only meant to apply to probes, not to the
echo server listener.
2012-10-03 15:43:18 +00:00
david
3e9f862ce3 Add nsock_setdevice function.
This function allows setting the device that will be used in
SO_BINDTODEVICE setsockopt calls for all new sockets.
2012-10-03 15:43:16 +00:00
david
b0c3b7b1f4 Shorter Windows build guide, now that dependencies are external. 2012-10-03 05:18:31 +00:00
david
85e27805d6 Move libsvn and libapr installation to /nmap-mswin32-aux/libsvn-upgrade.txt. 2012-10-03 05:18:28 +00:00
david
91e019210d Add C:\Python27 to PATH of python-wrap.bat. 2012-10-03 05:18:25 +00:00
david
b8e44155da Python is now in nmap-mswin32-aux. 2012-10-03 05:18:23 +00:00
david
0f255f8d10 Upgraded OpenSSL to 1.0.1c (in /nmap-mswin32-aux). 2012-10-02 01:36:51 +00:00
david
2b66e9ebbe Add /nmap-mswin32-aux to CHANGELOG. 2012-10-02 00:53:52 +00:00
david
cfeec34979 Remove vcredist files, moved to /nmap-mswin32-aux. 2012-10-02 00:53:49 +00:00
david
af45d2a647 Build nmap-update by default. 2012-10-02 00:53:46 +00:00
david
d040559d38 Refer to libsvn in /nmap-mswin32-aux. 2012-10-02 00:53:43 +00:00
david
998b048612 Mention nmap-mswin32-aux in nmap-install.xml. 2012-10-02 00:53:41 +00:00
david
2f2e826487 Remove OpenSSL directory, moved to /nmap-mswin32-aux. 2012-10-02 00:53:12 +00:00
fyodor
bb7b928164 Some updates from discussion w/David 2012-10-01 22:20:43 +00:00
david
52a4ae6e71 Fix wrong script id in oracle-enum-users error message.
By Dhiru Kholia.
http://seclists.org/nmap-dev/2012/q4/1
2012-10-01 21:54:47 +00:00
david
b1e5009870 Typo. 2012-10-01 21:22:20 +00:00
david
a8c51eeda0 Remove vestiges of WinIP library.
This was an old library removed in r2811 and r2812, of which a few
traces remained.

I don't know the purpose of this in nbase_misc.c:
  if(sd != 501) // Hack related to WinIP Raw Socket support
    ioctlsocket (sd, FIONBIO, &one);
2012-10-01 19:54:17 +00:00
david
d7479cfa94 Make nmap AdditionalIncludeDirectories the same for Debug and Release. 2012-10-01 19:54:14 +00:00
david
11b76a55e2 Route tables rework to libdnet-stripped/NMAP_MODIFICATIONS. 2012-09-30 00:01:20 +00:00
david
561fd00a3e CHANGELOG for route tables rework. 2012-09-30 00:01:18 +00:00
david
049208898b Set intf_name in route-bsd.c, the parts used by OS X.
There are some other #ifdefs that are used on other platforms, in which
code intf_name might nto be set but will continue to be an empty string
as before.
2012-09-30 00:01:17 +00:00
david
0ed5d26bc3 Set intf_name in route-win32.c. 2012-09-30 00:01:16 +00:00
david
22d49bd5c9 Match against both destination and gateway in sysroutes_dnet_find_interfaces.
This commit fixes two different bugs:

(1) First in some situations Nmap will only see routes that are attached
to the device that handles the default route.

(2) On boxes without a default route, Nmap will not see any route.

These two bugs are caused by sysroutes_dnet_find_interfaces() logic
which will use only the geteway to match interface addresses.

To fix this, first check the current route and see if the gateway was set
otherwise use the destination address to match the address of an
interface.
2012-09-30 00:01:14 +00:00
david
6c8b5c7dd9 Assign sys_route interfaces immediately when iface names come from libdnet. 2012-09-30 00:01:13 +00:00
david
98aa8fbe80 Set intf_name in route-linux.c. 2012-09-30 00:01:12 +00:00
david
5bbe36af7a Add intf_name to the route_entry struct.
This is set to an empty string in all functions yielding routes,
particularly route_loop. The code to get the interface pertaining to a
route is different on different platforms, so must be added one by one.
The code setting the intf_name to an empty string is only tested on
Linux.
2012-09-30 00:01:10 +00:00
david
bfea61a51e Put the sscanf count check right after the call to sscanf. 2012-09-27 03:10:28 +00:00
david
06dcb1c138 Check ipv6 route flags and sscanf count as well. 2012-09-27 03:06:22 +00:00
david
95b634d28c We are reading 11, not 10, fields from /proc/net/route. 2012-09-27 02:58:27 +00:00
david
645e0d213f We can only read n - 1 bytes of interface name; sscanf doesn't include
the terminator.

Noticed by Djalal.
2012-09-27 02:58:26 +00:00
djalal
af495cdc49 Fixed a bug that prevented Nmap from finding any interfaces when one
of them had the type ARPHDR_INFINIBAND; this was the case for
IP-over-InfiniBand interfaces. However, This support is not complete
since IPoIB interfaces use 20 bytes for the hardware address, and
currently we only report and handle 6 bytes.
Nmap IP level scans should work without any problem, please refer to
the '--send-ip' switch and to the following thread:
http://seclists.org/nmap-dev/2012/q3/642

This bug was reported by starlight.2012q3.
2012-09-26 09:24:00 +00:00
djalal
e017b7c290 Fixed a bug that prevented Nmap from finding any interfaces when one
of them had the type ARPHDR_IEEE80211; this was the case for wireless
interfaces operating in access point mode. This bug was reported by
Sebastiaan Vileijn.

http://seclists.org/nmap-dev/2012/q3/986
2012-09-26 08:49:22 +00:00
henri
094aa2d3dc Fixed typo. 2012-09-25 12:22:09 +00:00
henri
f2bb268135 Added 404 detection checks to attempt to reduce false positives. 2012-09-25 12:07:59 +00:00
david
a0601febeb Store port numbers in host byte order in number-to-service mapping.
I don't know why these were in network byte order. Every single
interaction had a htons on entrance and ntohs on exit.
2012-09-25 05:24:16 +00:00
david
b084226813 CHANGELOG for protocol number-to-name fix. 2012-09-25 05:11:06 +00:00
david
b2a1ff8e54 Fix broken protocol lookup.
For some reason (probably by imitation of nmap_getservbyport), protocol
numbers, which are byte values 0–255, had htons called on them after
being read from nmap-protocols. On little-endian platforms, this turned
them into integers 0x0100, 0x0200, 0x0300, etc.

protocol_table is supposed to be an array of 256 linked lists, linking
all the protocol names of the same number. Because of the above htons
conversion, all protocols mapped to bucket 0 on lookup instead. Perhaps
in an attempt to work around this broken lookup, all protocols were
inserted into bucket 0 on init; all other buckets were empty. This
worked on little-endian platforms, but on big-endian platforms where
htons is a no-op, all protocol numbers but 0 mapped to an empty linked
list.

Remove all the htons stuff and just look things up by integers. Use the
same mapping on initial insertion and on lookup, so that the buckets are
acutally populated.

This was noticed by hejianet.
http://seclists.org/nmap-dev/2012/q3/1005
2012-09-25 05:08:09 +00:00
fyodor
fdac9b93bb Latest todo updates 2012-09-24 22:56:32 +00:00
david
9a21b96b49 Let -e work in ipv6-ra-flood. NSEDoc fixes.
Patch by Adam Števko.
2012-09-24 04:33:15 +00:00
batrick
4fe62b040c Better response to misuse of stdnse.base|new_thread when not executing an
action function (current == nil).
2012-09-23 21:31:02 +00:00
david
6b86535138 Use parse_timespec for ipv6-ra-flood.timeout argument. 2012-09-23 21:15:24 +00:00
david
40a2af0a84 Description and timeout argument for ipv6-ra-flood.
Patch by Adam Števko.
2012-09-23 21:15:22 +00:00
david
b19647254d Typo. 2012-09-23 21:15:20 +00:00
david
7ddb82d555 Remove nonexistent @output from ipv6-ra-flood.nse. 2012-09-22 16:54:31 +00:00
david
a41633cd85 Close an NSE socket before making a second attempt to connect.
Without this, we were leaking socket descriptors. See
http://seclists.org/nmap-dev/2012/q3/971.
2012-09-21 21:13:28 +00:00