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

73 Commits

Author SHA1 Message Date
david
67db6f0829 Fix another outError → nping_warning.
Apparently missed in r30691. Reported by Gisle Vanem.
http://seclists.org/nmap-dev/2013/q2/32

Recommitted after recovery from backup.
2013-04-12 17:29:28 +00:00
luis
b70a358447 Merge r30025 from nmap-npingchanges: Add two helper functions to handle sockaddr_storage structures. 2013-03-29 17:53:02 +00:00
luis
a55a038bc6 Merge r28024 from nmap-npingchanges: Make the test script executable 2013-03-29 16:52:12 +00:00
luis
a3f84c2c87 Merge r27963 from nmap-npingchanges: Remove some unimplemented command-line flags 2013-03-29 16:39:36 +00:00
luis
ac64c953ab Merge r27177-180 from nmap-npingchanges: Minor typo and style fixes in -h output 2013-03-29 13:14:18 +00:00
luis
686322d1bd Merged r27162 from nmap-npingchanges: Remove some unused code 2013-03-29 13:01:29 +00:00
luis
84c31d5237 Merge r27120,27121,27123,27124,27125 from nmap-npingchanges. Minor style and typo fixes. 2013-03-29 12:51:50 +00:00
luis
f64b3fafe8 Merge r27122 from nmap-npingchanges: Changed names for output funtions. outPrint() -> nping_print(); outFatal() -> nping_fatal() ; outError() -> nping_warning(). This change is completely irrelevant but I personally hate the names I chose the first time and I thought I'd change them to something better. 2013-03-29 12:44:51 +00:00
david
ce51d8c4da Use the default value of MultiThreadedDLL where possible. 2013-02-09 20:30:01 +00:00
david
6b095f42d2 Use MultiThreadedDebugDLL (/MDd) in place of MultiThreadedDebug (/MTd).
This is to match r8507, which did the analogous thing for the Release
configuration.
http://seclists.org/nmap-dev/2013/q1/120
2013-02-09 20:29:55 +00:00
david
ecb16767e8 Skip privileged pings against localhost on Windows.
Compare to this similar test in Nmap's scan_engine.cc:
  if (scantype != CONNECT_SCAN && Targets[0]->ifType() == devt_loopback) {
    log_write(LOG_STDOUT, "Skipping %s against %s because Windows does not support scanning your own machine (localhost) this way.\n", scantype2str(scantype), Targets[0]->NameIP());
    return;
  }

rndbit made a report--unfortunately we con't fix it, but we can make the
error message clearer.
http://seclists.org/nmap-dev/2013/q1/187
2013-02-09 19:08:05 +00:00
david
9e74850e6e Remove unnecessary or nonexistent files from Nping Windows build.
These were causing Nping to always appear to be out of date when
debugging. Cf. r26250 and r25068.
2013-02-09 18:55:22 +00:00
david
dbdee4792e Keep min/max/avg rtt outputs down to -q. 2013-01-28 22:55:31 +00:00
david
93a245d6e7 Require -v for 'Tx time' and friends in Nping. 2013-01-28 22:55:29 +00:00
david
e1fba2d663 Merge r30416:30527 from /nmap-exp/david/ipv6-ranges.
This is a refactoring of target parsing that stores different types of
target specifications as different classes. The eventual intention is to
allow easy iteration over each specification for the purpose of IPv6
multicast host discovery.
2013-01-22 00:01:08 +00:00
henri
809f1eda68 Merged nsock-logging from nmap-exp/henri/nsock-logging/
Reworked the logging infrastructure to make it more flexible
and consistent.

Updated nmap, nping and ncat accordingly.  Nsock log level can
now be adjusted at runtime by pressing d/D in nmap.
2012-12-15 10:59:30 +00:00
fyodor
a90d961f51 auto-generated files (nroff versions of man pages) 2012-12-10 01:17:51 +00:00
fyodor
d5ae047309 Update my email address in Nping man page too 2012-12-10 01:16:03 +00:00
david
7ebbac2746 Update some mailing list references. 2012-12-06 02:34:28 +00:00
david
ec53dc049a Update with new mailing list addresses. 2012-12-06 02:23:34 +00:00
fyodor
6a42ef47c0 Update the Nmap and Nsock source code headers to note new Nmap dev mailing list email address and a better URL for Nmap license. 2012-12-06 01:21:42 +00:00
david
3dcda9d536 Update Mailman URLs.
http://seclists.org/nmap-dev/2012/q4/389

git ls-files | xargs perl -p -i maillist.pl

maillist.pl:
%MAP = ("nmap-dev" => "dev", "nmap-hackers" => "announce", "nmap-svn" => "svn");
s%http://.*/(mailman/.*)/(nmap-dev|nmap-hackers|nmap-svn)%http://nmap.org/$1/$MAP{$2}%g;
2012-12-05 23:55:29 +00:00
fyodor
e09125e010 Update CHANGELOG to note 6.25 release and also bumped up Nmap SVN version number to avoid confusion and rebuilt files accordingly 2012-11-29 23:40:26 +00:00
fyodor
89d84932de Regenerated the man pages with today's date 2012-11-16 19:09:59 +00:00
fyodor
ea05ae2586 Latest auto-generated files in prep for upcoming 6.20BETA1 release 2012-11-16 00:54:16 +00:00
henri
58418396a8 Make nping and ncat fail (the way nmap does) when invalid nsock engines are supplied. 2012-10-29 10:22:32 +00:00
henri
1e3115dbcb Renamed nmap_fileexistsandisreadable() by file_is_readable(). Former was
hardly readable and is not even a good candidate for longest method
name (http://msdn.microsoft.com/en-us/library/system.windows.media.textformatting.textsource.gettexteffectcharacterindexfromtextsourcecharacterindex.aspx#Y0)
2012-10-20 15:00:10 +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
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