1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Merge r17853:17879 from /nmap-exp/luis/nping-dedup.

------------------------------------------------------------------------
r17854 | luis | 2010-06-06 15:47:34 +0200 (Sun, 06 Jun 2010) | 1 line

Removed a few things from the documentation that were rerefenced but not yet implemented
------------------------------------------------------------------------
r17855 | luis | 2010-06-06 15:53:45 +0200 (Sun, 06 Jun 2010) | 1 line

Fixed a bug that caused ARP Requests to be sent no matter what the user supplied as the ARP operation code
------------------------------------------------------------------------
r17856 | luis | 2010-06-06 16:23:47 +0200 (Sun, 06 Jun 2010) | 1 line

Fixed a bug that produced a buffer overflow when non-RFC-compliant ICMP types were set. Now, if user supplies a weird ICMP type, a regular 8-byte ICMP header will be sent
------------------------------------------------------------------------
r17858 | luis | 2010-06-06 22:08:13 +0200 (Sun, 06 Jun 2010) | 1 line

Added a function (and a helper) so the number parsing in Nping is consistent. The new function, parse_unsigned_number() may parse 8, 16, or 32 bit unsigned integers, specified in hexadecimal, octal or decimal. Alternatively, source string may be the special value <<rand>> or <<random>>, and the function will generate a random number of the desired length. Function validate_number_spec() is needed due to the limitations of strtoul() that doesn't report errors on things like 1zzzppp, and gives undesired results when a minus sign is supplied. validate_number_spec() performs various checks, trying to detect bogus input. However, if something is not catched by it, strtoul() may take care of it. I've been testing both functions for hours, even with automatically generated input and I haven't been able to find any bug, so I think its safe to start using this.
------------------------------------------------------------------------
r17859 | luis | 2010-06-06 23:43:04 +0200 (Sun, 06 Jun 2010) | 1 line

Added the possibility to supply special value <<rand>> in MAC address specification
------------------------------------------------------------------------
r17860 | luis | 2010-06-07 00:01:30 +0200 (Mon, 07 Jun 2010) | 1 line

Added the possibility to specify the special value <<broadcast>> so the address FF:FF:FF:FF:FF:FF is set. Also, fixed move string length check so the function does not return OP_FAILURE before checking for these special values
------------------------------------------------------------------------
r17866 | luis | 2010-06-07 01:05:31 +0200 (Mon, 07 Jun 2010) | 1 line

Implemented function getRandomTextPayload() to support <<random>> value in payload string specification
------------------------------------------------------------------------
r17867 | luis | 2010-06-07 01:08:29 +0200 (Mon, 07 Jun 2010) | 1 line

Lots of changes in Nping's  command-line argument parser to use the new parse_unsigned_number() function. Now virtually all parameters may be specified in hexadecimal, octal or decimal base, or even using the special value <<random>>
------------------------------------------------------------------------
r17868 | luis | 2010-06-07 01:12:02 +0200 (Mon, 07 Jun 2010) | 1 line

Removed useless var declarations. There is already an aux32 var declared at the start of the function
------------------------------------------------------------------------
r17869 | luis | 2010-06-07 01:24:00 +0200 (Mon, 07 Jun 2010) | 1 line

Fixed a bug that caused the SYN flag to be set even when the user had specified --flags 0x00.
------------------------------------------------------------------------
r17870 | luis | 2010-06-07 01:27:33 +0200 (Mon, 07 Jun 2010) | 1 line

Fixed another bug in flag parsing. When an empty string was being passed, the SYN bit was being set. Now if an empty string is passed, no flags will be set
------------------------------------------------------------------------
r17873 | luis | 2010-06-07 13:12:36 +0200 (Mon, 07 Jun 2010) | 1 line

Fixed a bug that caused -g to be ignored in TCP-Connect or UDP unprivileged modes. Now, providing the user has enough privileges on his system, the specified source port will be set, at least in the first packet send to each target.  I've tested this on Linux and the OS complains when Nping attempts to use the same source port twice for the same target IP address in TCP-Connect mode. For this reason, a new warning was added so the users know that it will probably fail.
------------------------------------------------------------------------
r17875 | luis | 2010-06-07 13:25:04 +0200 (Mon, 07 Jun 2010) | 1 line

Fixed a bug that caused message <<Operation now in progress>> to be displayed in TCP-Connect mode when RST packets were being received. The problem was that errno was being used and by the time it was referenced, its value had changed so the wrong message was being printed. Now, the error code is obtained from nsock trough a call to nse_errorcode() and the correct message is displayed: <<Connection refused>>
------------------------------------------------------------------------
r17876 | luis | 2010-06-07 13:29:04 +0200 (Mon, 07 Jun 2010) | 1 line

Minor fix
------------------------------------------------------------------------
r17877 | luis | 2010-06-07 13:49:52 +0200 (Mon, 07 Jun 2010) | 1 line

Fixed a bug that caused Nping to fail when the first supplied target was not resolvable (eg: nping bogushost.fkz scanme.insecure.com tcpdump.com).
------------------------------------------------------------------------
r17878 | luis | 2010-06-07 14:56:02 +0200 (Mon, 07 Jun 2010) | 1 line

Fixed a bug that causes Nping to fail when scanning an IP address assigned to a local network interface. The problem is complex and difficult to solve due to the way Nping handles targets and determines things like src IP addresses. This patch introduces an ugly hack (an explicit check for a particular situation in route_dst() ). This is not the most elegant solution and it probably only works in Linux, but it should be OK until a better solution is found.
------------------------------------------------------------------------
r17879 | luis | 2010-06-07 18:46:44 +0200 (Mon, 07 Jun 2010) | 1 line

Added a few wrappers for the new parse_unsigned_number() function. This should minimize the risks of calling it with an invalid pointer type. Also, its prototype has been removed from utils.h and it has been declared static. Additionally, the validate_number_spec() function was removed, relying on strtoul() to perform the appropriate validation.
------------------------------------------------------------------------
This commit is contained in:
luis
2010-06-09 17:16:09 +00:00
parent 021d8b1a14
commit 003e23c4e8
2 changed files with 1413 additions and 2817 deletions

View File

@@ -175,6 +175,9 @@ them both to 0; an emulation function will be used. */
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME #undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */ /* Define to the version of this package. */
#undef PACKAGE_VERSION #undef PACKAGE_VERSION

4157
libpcre/configure vendored

File diff suppressed because it is too large Load Diff