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

46 Commits

Author SHA1 Message Date
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
2f2e826487 Remove OpenSSL directory, moved to /nmap-mswin32-aux. 2012-10-02 00:53:12 +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
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
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
luis
f712477644 Fix a bug in the argparser. When users pass 'random' as an IPv6 address, the randomly generated address never gets stored. This was reported and fixed by Mark Atkinson. More info: http://seclists.org/nmap-dev/2012/q3/950 2012-09-20 20:40:38 +00:00
david
7e5c9a8914 Regen with Autoconf 2.68 and aclocal 1.11.6.
for DIR in . nbase ncat nsock/src nping;
	do (echo $DIR; cd $DIR && aclocal --force && autoconf --force);
done
2012-09-19 16:41:35 +00:00
david
380bb92867 Remove broken incldue of nbase/configlocal.m4. 2012-09-19 16:41:30 +00:00
david
ad61d6de85 Remove unused aclocal.m4 files.
These aren't getting regenerated even with "aclocal --force"; I think
it's because there is nothing to put in them. Running "aclocal
--verbose" shows that all the required macros are in acinclude.m4 files:

aclocal: saw macro PCAP_IS_SUITABLE
aclocal: saw macro RECVFROM_ARG6_TYPE
aclocal: saw macro PCAP_IS_SUITABLE
aclocal: saw macro CHECK_IPV6_IPPROTO_RAW
aclocal: saw macro APR_FIND_APR
aclocal: ../acinclude.m4 is already included by configure.ac
2012-09-19 16:41:28 +00:00
david
0bf004cf6b Move acinclude.m4 inclusion from aclocal.m4 to configure.ac.
aclocal.m4 is autogenerated, so running aclocal would remove the
m4_include of acinclude.m4.

The exceptions are at the top of the source tree and in nsock/src, where
an acinclude.m4 lives; aclocal notices it there and automatically adds
an inclusion to the end of aclocal.m4, so no inclusion is needed in
configure.ac.
2012-09-19 16:41:25 +00:00
david
74a79b14f5 Correct header comment. 2012-09-19 16:41:24 +00:00
fyodor
b9cdbfa2ca An ID of npìng-man was used, so I changed it to the normal ASCII nping-man (note that the i character is slightly different in these two cases). 2012-09-18 09:07:24 +00:00
david
113e0b975f Break out resolve and resolve_numeric.
Besides the confusingness of the nodns argument being negatively
phrased, it had the value 0 in every existing call. Split out the nodns
special case into a separate function resolve_numeric.

This also has the side effect of changing the number of parameters to
the resolve function, which will cause a compile error for any calls I
might have missed changing when I changed the return code meaning in the
previous commit.

Ncat has its own copy of resolve, which obeys the global o.nodns rather
than a parameter. I'm leaving that alone for now. But give it the same
resolve_internal function, and make resolve call it with different flags
depending on the value of o.nodns.
2012-09-15 17:56:11 +00:00
david
0e738370ee Make resolve return a getaddrinfo error code.
The only error we can have apart from a getaddrinfo error is a list of
zero addresses; return EAI_NONAME in that case.

This unfortunately inverts the truth value of the return code of
resolve; 0 now means success.
2012-09-15 17:56:08 +00:00
fyodor
2c6b5e7d24 The Nroff man pages aren't really able to render superscripts (AFAICT) and so 2^32 was rendering as just 232. So I changed it to just say that Nping will run continuously if '-c 0' is specified. If it really stops after 4 billion rounds, that is a bug that we should probably fix at some point 2012-09-12 07:16:41 +00:00
david
cb68c85409 Don't use exit in PCAP_IS_SUITABLE.
John Spencer reported that musl libc doesn't automatically include
<stdlib.h>, as Glibc does, so the configure check was wrongly failing.

conftest.c: In function 'main':
conftest.c:35:5: error: implicit declaration of function 'exit'
2012-09-08 19:44:24 +00:00
sean
5d541b08ca Fixed the race condition where nping would print out an error after running. I removed the call to create a time since we don't really need a timer there. 2012-08-05 18:23:10 +00:00
sean
17f7791c02 General File cleanup. Added closing paren for the port error message 2012-08-04 01:18:40 +00:00
sean
ce2f251cd5 Added a function to check if port specification will do anything. Changed over my logic to use this new functioni. (scan_mode_uses_target_ports) 2012-08-04 01:08:31 +00:00
sean
256bffba9c Removed the requirement from is root in the error message about having a useless -p option 2012-08-04 00:52:36 +00:00
sean
a9a6c431cd Added an error message when the user runs nping in a priviliged mode and specifies a port. I choose to add an error message to keep nping's behavior inline withnmaps. 2012-08-04 00:41:02 +00:00
sean
d653563331 Fixed the warnings " warning: variable ‘readbuff’ set but not used [-Wunused-but-set-variable]". Added error handling in the event that readbuff was NULL. 2012-06-21 02:02:37 +00:00
sean
8d6243980f Patched the "ProbeMode.cc:183:25: warning: variable ‘loopret’ set but not used [-Wunused-but-set-variable]" by added error handling for the NSOCK_LOOP_ERROR return value. Thisbrought ProbeMode::start inline with the rest of nmap's handling of nsock_loop. 2012-06-21 01:45:25 +00:00
sean
5a98556318 Changed the outFatal to an outError for consistancy with the other error messages 2012-06-21 01:36:22 +00:00
sean
7be1b6b6d2 Fixed the warning about "ProbeMode.cc:182:18: warning: variable ‘ev’ set but not used [-Wunused-but-set-variable]". The code set the ev variable however it never did anything with it.
-This line, and those below, will be ignored--

M    nping/ProbeMode.cc
2012-06-21 01:26:45 +00:00
david
42f71759c2 Use one, not two, spaces after "WARNING:".
There were more cases of one space than two.
2012-06-20 20:13:51 +00:00
david
7f5d53184c Uniform handling of makefile.dep in makefiles.
"make clean" keeps makefile.dep and "make distclean" deletes it. This
patch is by Michael McTiernan.

http://seclists.org/nmap-dev/2012/q2/827
2012-06-19 14:06:49 +00:00
sean
e3dc67a44d Added error handling code for the loopret variable that was causing this warning"EchoServer.cc: In member function ‘int EchoServer::start()’:
EchoServer.cc:1403:25: warning: variable ‘loopret’ set but not used [-Wunused-but-set-variable]", by simply mimicing the other error handling around nsock_loop elsewhere.
2012-06-19 03:38:04 +00:00
fyodor
b70e4f71cf Bump the Nmap version number in SVN up to 6.02 2012-06-16 19:44:58 +00:00
sean
f8f3dd1921 Fixed some stylistic mistakes in the previous commit. 2012-06-12 04:10:08 +00:00
sean
34c9ba9892 Fixed the utils_net.cc: In function ‘int send_packet(NpingTarget*, int, u8*, size_t)’:
utils_net.cc:1114:7: warning: variable ‘res’ set but not used [-Wunused-but-set-variable] warnings by catching the return values of res and if they indicate failure at a lower level return OP_FAILURE
2012-06-12 03:52:46 +00:00
fyodor
528c87ddb3 Latest builds of man pages 2012-05-30 21:56:09 +00:00
fyodor
22c7faa94b move the svn version number up to 6.01 and rebuild 2012-05-22 09:51:42 +00:00
fyodor
426a8f03d2 Update version number for 5.61TEST5 release 2012-03-09 02:17:53 +00:00
david
894f858fd4 Include <sys/types.h> in the PCAP_IS_SUITABLE test.
The lack of this was causing PCAP_IS_SUITABLE to fail on Arch Linux, at
least. I think that in some cases this caused both -L../libpcap and
-lpcap to be added to the linker line, which could cause an error
because of the need to link with -lnl. (We check for -lnl when
--with-libpcap=included is used (since r23163), but the PCAP_IS_SUITABLE
failure went around this check and allowed linking with the included
libpcap without checking whether -lnl is required.)

Here are reported build failures and responses:
http://seclists.org/nmap-dev/2011/q3/449
http://seclists.org/nmap-dev/2011/q4/33
http://seclists.org/nmap-dev/2012/q1/369
2012-03-04 05:18:08 +00:00
henri
b1086ac340 Added a --nsock-engine option to nmap, nping and ncat to enforce use of a
given nsock IO engine. [Henri]
2012-03-01 09:05:02 +00:00
fyodor
684f42c4ad One more adjustment to the license text. Notes that Zenmap, Ncat, and Nping use this license. Note that contributions made directly in the src repository are treated the same as those in the mailing list. 2012-03-01 06:53:35 +00:00
fyodor
e96a7b7b24 Update the headers for each code file. This updates code copyright dates to 2012, notes the awesome NSE in the list of technology, and slightly rewords the derivative works clarification 2012-03-01 06:32:23 +00:00
fyodor
1b1c6c52c3 Note that verbosity level 4 and higher is the same as level 3 2012-02-17 01:04:31 +00:00
fyodor
8e5d833881 Update a link to Nmap's HACKING file in svn 2012-02-16 07:35:59 +00:00
david
96052bfa9e Remove about 5 MB of DocBook XSL from the Nping docs directory.
This doesn't seem to be needed anymore.
2012-01-13 21:36:41 +00:00
fyodor
c5effdfb4f Update the Nmap version number to 5.61TEST4 2012-01-02 00:45:04 +00:00
fyodor
158b912bf8 Some more improvements to the CHANGELOG 2012-01-02 00:35:16 +00:00
fyodor
5c2ddb3c6e latest generated docs 2011-12-19 21:07:38 +00:00
colin
5724d88eac [Nping] Make --safe-payloads default, add --include-payloads
Resolving item from todo list:
o [Nping] The --safe-payloads option should be default (though we
  should keep it for backward compatability).  We could then introduce
    --include-payloads for cases where they are desired.

-Documentation has not been updated.
2011-11-30 03:09:04 +00:00
david
ed2ba4e168 Copy nping, nsock, nbase, zenmap, ncat from their homes in /.
If you have trouble updating after this revision you need to follow
these instructions. You have probably just seen an error like this:

svn: URL 'svn://svn.insecure.org/nping' of existing directory 'nping'
does not match expected URL 'svn://svn.insecure.org/nmap/nping'

This is caused by the replacement of SVN externals.

Here's what you need to do. First, save any local changes you might have
in the nping, nsock, nbase, ncat, and zenmap directories. (For example
by running "cd nping; svn diff > ../nping.diff".) If you don't have any
local changes you can skip this step.

Then run these commands:

rm -rf nping/ nsock/ nbase/ ncat/ zenmap/
svn update
svn cleanup

If all else fails, you can just delete your whole working directory and
check out anew:

svn co --username guest --password "" svn://svn.insecure.org/nmap

There may be further discussion in the mailing list thread at
http://seclists.org/nmap-dev/2011/q4/303.
2011-11-16 21:49:44 +00:00