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

6403 Commits

Author SHA1 Message Date
david
ddb4829b2b Use SIOCGIFNETMASK6 to get IPv6 interface netmasks.
This is used when SIOCGIFNETMASK_IN6 isn't available.
2011-09-28 06:55:48 +00:00
david
31f12a071c Check for <netinet/in6_var.h>.
This contains the SIOCGIFNETMASK6 ioctl definition on AIX.
2011-09-28 06:55:47 +00:00
paulino
872c088481 Lets get back to coding! 2011-09-28 06:10:31 +00:00
gorjan
653cf8fcbd Update address-info to show MAC address related manufacturer. 2011-09-26 22:42:08 +00:00
david
8e832d6067 Move the HAVE_SOCKADDR_SA_LEN test to nbase. 2011-09-26 22:26:51 +00:00
david
8d964ad4e9 Consider IFF_LOOPBACK before IFF_BROADCAST.
The IPv6 loopback interface on AIX has both IFF_BROADCAST and IFF_LOOPBACK set. Checking IFF_BROADCAST first erroneously makes it appear as an Ethernet device.
2011-09-26 22:26:50 +00:00
gorjan
d5b0b9bf43 Adding the lltd-discovery script, which enables the user to discover hosts on local networks using the Microsoft LLTD protocol. 2011-09-26 22:20:08 +00:00
david
c41f53b3b1 --script-updatedb 2011-09-26 20:56:46 +00:00
david
a48b91852c Add version detection to quake3-info.nse, from Toni Ruottu. 2011-09-26 20:56:45 +00:00
david
1d84cd8ec0 Changelog entry for recent AIX portability work. 2011-09-26 03:49:34 +00:00
david
1937cdec90 Add specific installation instructions for AIX. 2011-09-26 03:40:43 +00:00
david
032caee6ac o Made the interface gathering loop work on Linux when an interface
index is more than two digits in /proc/sys/if_inet6. Joe McEachern
  tracked down the problem and provided the fix.
2011-09-25 19:14:33 +00:00
fyodor
0fe496bcbc Add a task for improving the Nmap multicast IPv6 host discovery scripts 2011-09-25 04:40:44 +00:00
david
5d39765730 Check that pcap_get_selectable_fd is declared in PCAP_IS_SUITABLE.
On AIX this test was passing even though this error happened on
compiling:
netutil.cc: In function 'int my_pcap_get_selectable_fd(pcap_t*)':
netutil.cc:870:34: error: 'pcap_get_selectable_fd' was not declared in this scope
2011-09-24 06:35:38 +00:00
david
094a303502 Disable debugging for FPmodel.o, avoiding an assembler problem on AIX. 2011-09-24 04:10:53 +00:00
david
c92b3d600a Add feature names as comments to FPmodel.cc. 2011-09-23 22:45:25 +00:00
david
54dfb2a909 Update ovs-agent-version.nse with a signature from version 3.0.1. 2011-09-23 21:42:06 +00:00
david
23a294ad3c Change another "make" to "$(MAKE)", thanks olli hauer. 2011-09-23 21:15:09 +00:00
henri
9dbef5ab6e Added ssl-google-cert-catalog.nse by Vasiliy Kulikov 2011-09-22 18:37:48 +00:00
henri
6dc4a8820d ChangeLog entry for r26665 2011-09-22 18:13:43 +00:00
henri
b7df13296e Fix a bug in dns.lua: ensure that dns.query() always return two values (status and response).
Update asn-query.nse accordingly.
2011-09-22 18:00:44 +00:00
david
feb691f534 Only show the "other options" in quake3-info with -v. 2011-09-21 22:50:01 +00:00
david
d8dd542bba Get rid of some blank lines in quake3-info. 2011-09-21 22:50:00 +00:00
david
423beece60 o [NSE] Added quake3-info.nse by Toni Ruottu. This script gets
information about games and settings for a Quake 3 (or derived game)
  server.
2011-09-21 22:49:59 +00:00
david
354305f67c Add scanner.l config.h change to NMAP_MODIFICATIONS. 2011-09-21 17:41:22 +00:00
david
b883c1d14f Include config.h at the %top of scanner.c.
On AIX, config.h defines _LARGE_FILES. This interacts badly with other
includes generated at the top of scanner.c, leading to errors like this:

In file included from scanner.c:2784:
/usr/include/unistd.h:171: error: conflicting types for 'lseek64'
/usr/include/unistd.h:169: error: previous declaration of 'lseek64' was here
In file included from /usr/include/unistd.h:746,
                 from scanner.c:2784:
/usr/include/sys/lockf.h:64: error: conflicting types for 'lockf64'
/usr/include/sys/lockf.h:62: error: previous declaration of 'lockf64' was here
2011-09-21 17:41:22 +00:00
david
364e6f64d8 Regenerate scanner.c with flex 2.5.35.
./runlex.sh flex -Ppcap_ -oscanner.c scanner.l
2011-09-21 17:41:21 +00:00
david
b6c5004c3b Remove accidental duplicate struct_ip definitions. 2011-09-21 07:48:11 +00:00
david
fee764a5d8 Use a special struct_ip.h to include <netinet/ip.h> and accoutrements.
The comment in struct_ip.h explains the reasoning for this. The AIX C library
uses #defines that change the names of members of struct ip, and conflict with
some existing code. (Notably struct ip_hdr in libdnet and IPv4Header::h in
libnetutil.) We can still use the AIX files if we include <netinet/ip.h> after
this other code has been preprocessed. That's hard to enforce when
<netinet/ip.h> is included from another header file; this new file allows
including it always late, and only where needed.
2011-09-21 07:31:38 +00:00
david
c87da9aa8b Avoid using parameter names that are #defined on AIX.
AIX defines various things like ip_id as some implementation-dependent
submember of struct ip.
2011-09-21 07:31:37 +00:00
david
75f753b441 Rearrange include for AIX. 2011-09-21 07:31:35 +00:00
david
0bce585dec Use getkerninfo to get routing information on AIX. 2011-09-21 07:31:34 +00:00
david
3efe011acc Use $(MAKE) instead of make for systems that need gmake. 2011-09-21 07:31:33 +00:00
david
22ebd46baa o [NSE] Made irc-info.nse handle the case where the MOTD is missing.
Patch by Sebastian Dragomir.
2011-09-21 05:09:26 +00:00
batrick
8628520123 Change module separator to directory separator as is done in
Lua's ?.lua loader. This is necessary when requiring submodules
e.g. require "foo.bar"
2011-09-20 18:24:09 +00:00
batrick
6069b50ce3 Add loader for searching nselib/ for ?.lua files. nselib/ can be in multiple
directories that nmap will search, e.g. ~/.nmap/nselib $NMAPDIR/nselib
/usr/share/nmap/nselib etc.

Resolves Daniel Miller's request [1].

[1] http://seclists.org/nmap-dev/2011/q3/817
2011-09-20 16:18:35 +00:00
david
613527e7e2 Add @usage to snmp-sysdescr.
The auto-generated usage doesn't work for this script. Eugene Varnavsky
contributed the fix.
2011-09-20 16:12:07 +00:00
david
fe9510187f Make nping-brute work with IPv6 again.
Patch by Toni Ruottu. IPv6 hosts now have bin_ip, which previously was
taken as being an IPv4 address only.
2011-09-20 16:12:07 +00:00
fyodor
cee8ed9068 Add a note to the failed to resolve error message that you might need to use -6. It is a mistake I keep making :) 2011-09-19 23:37:05 +00:00
david
339477c675 Pass CXX to liblinear. 2011-09-19 22:30:09 +00:00
david
289b96c191 Regenerate ca-bundle.crt using the instructions in certs/README. 2011-09-19 22:14:29 +00:00
fyodor
3c01ee3217 latest todo file updates 2011-09-19 22:01:42 +00:00
fyodor
e87e454c0c update the version number in nmap.h too 2011-09-19 21:57:53 +00:00
fyodor
6ed56140bd Update version number to 5.61TEST1 2011-09-19 21:52:08 +00:00
fyodor
dc886eb5c9 Releasing 5.61TEST1 experimental version today, if all goes well with the build and testing 2011-09-19 21:50:07 +00:00
fyodor
8e042f399a Some updates from last week 2011-09-19 20:41:50 +00:00
david
9bf2ec3884 Merge from /nmap-exp/luis/nmap-os6.
svn merge --ignore-ancestry svn://svn.insecure.org/nmap@26621 svn://svn.insecure.org/nmap-exp/luis/nmap-os6

This is the IPv6 OS detection branch. "nmap -6 -O" works now, though at
this point it only prints fingerprints and not OS guesses, because we
need to collect more submissions.
2011-09-19 18:31:46 +00:00
david
f41753c4e9 Add a sockaddr dst argument to send_ip function that use raw sockets.
Heretofore we have always extracted teh destination address directly
from the packet contents. But the raw packet bytes do not contain enough
information in one case: IPv6 link-local addresses. For those we really
need the scope ID, and for that we must pass this information all the
way down.

Before this, I got "no route to host" on OS link-local addresses. I
think that it was working on Linux only on accident, by the OS picking a
default interface or something.
2011-09-19 16:13:35 +00:00
david
d91b131da0 Make various accessors and parameters const. 2011-09-19 16:13:33 +00:00
david
5898afd06b Canonicalize interface addresses returned from libdnet.
Mac OS X appears to have a new address convention that I can't find
documented. The link-local address fe80:4::X:X:X:X stands for
fe80::X:X:X:X%en0, if en0 is the interface with index 4. (I.e., it would
be fe80::X:X:X:X%4 on Windows.) The number 4 could be different numbers.

The interface addresses seem to be stored with these pseudo-zone IDs at
a low level, because they appear that way when they come from libdnet.
This is what "nmap --iflist" shows:

lo0  (lo0)   fe80:1::1/64                   loopback    up   16384
en0  (en0)   fe80:4::xxxx:xxxx:xxxx:xxxx/64 ethernet    up   1500  XX:XX:XX:XX:XX:XX

The OS X network tools seem to hide this. This is what "ifconfig" and
"netstat -rn -f inet6" show:

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        inet6 fe80::xxxx:xxxx:xxxx:xxxx%en0 prefixlen 64 scopeid 0x4

fe80::1%lo0                             link#1                          UHLI            lo0
fe80::xxxx:xxxx:xxxx:xxxx%en0           XX:XX:XX:XX:XX:XX               UHLI            lo0

(Not the "scopeid 0x4".) Also, if you use one of these addresses, it
magically transforms into one without the pseudo-ID (getaddrinfo does
this):

$ ping6 fe80:4::1234
PING6(56=40+8+8 bytes) fe80::xxxx:xxxx:xxxx:xxxx%en0 --> fe80::1234%en0
$ ping6 fe80:1::1234
PING6(56=40+8+8 bytes) fe80::1%lo0 --> fe80::1234%lo0

This translation is messing up our netmask comparisons for the purpose
of routing. If you use a normal link-local address starting with fe80:0,
then it doesn't compare equal with the fe80:4/64 interface address. If
you try to use the 4, then getaddrinfo turns it into fe80:0 anyway, and
the comparison still fails.

So for this reason I added a canonicalize_address function, which calls
getnameinfo on an address, then calls getaddrinfo on the returned
string, to mangle an address the same way the OS would do it. One would
hope this is a no-op in cases other than the one I have described.

Now "nmap --iflist" shows:
lo0  (lo0)   fe80::1/64                   loopback    up   16384
en0  (en0)   fe80::xxxx:xxxx:xxxx:xxxx/64 ethernet    up   1500  XX:XX:XX:XX:XX:XX
2011-09-18 23:49:34 +00:00