dmiller
9c97e008f7
Fix #2293 : assertion failed probe->tryno == maxtries
...
When tying UDP payloads to tryno, we were exceeding the maxtries in
order to send all available payloads, leading to assertion failures.
Currently there are not more than 4 payloads for any given port; most
have none, many have 1, very few have more. So we will send them all at
the same time with the same source port/tryno.
2021-08-06 02:47:55 +00:00
dmiller
bafb7b88ae
Code analysis thinks this could be null; assert it
2021-07-21 15:46:38 +00:00
dmiller
1fd272f8dd
const all the things!
2021-04-23 20:37:41 +00:00
dmiller
28fde911fe
Remove an unused state variable from HostScanStats
2021-04-23 20:37:39 +00:00
dmiller
a20fda6480
Respect --max-retries in UDP scan even when some payloads haven't been sent.
2021-01-19 19:57:37 +00:00
dmiller
6310b7d9e3
Ensure all UDP payloads get sent before giving up on a port.
2021-01-18 22:23:55 +00:00
dmiller
9ac591f9db
Better handling for ICMP Host Unreachable
2020-10-29 23:02:30 +00:00
dmiller
15726a0be1
Minor optimization of freshPortsLeft
...
The actual number only matters for certain debug output, so replaced
this frequently-called function with one that short-circuits to return a
boolean. Mostly only matters for host discovery scans, since all others
were only a few instructions already.
2020-10-26 16:59:06 +00:00
dmiller
e317dfdb8a
Avoid a few calls to Target::timedOut, which is not relevant in host discovery
2020-10-26 16:59:06 +00:00
dmiller
4c50296597
Don't count discovery (ping scan) time against host timeout clock. See #1922 , #2153
2020-10-23 03:03:26 +00:00
dmiller
2027c0cdc3
Destroy outstanding probes of completed hosts eventually. See #2153 , #1922
2020-10-22 19:02:05 +00:00
dmiller
ef8213a36c
Reintegrate Nmap 7.90 release branch
2020-10-05 23:00:30 +00:00
dmiller
875a51fb0f
Be more parallel with ARP discovery
...
Two essential changes:
1. (ab)Use the ratelimit detection feature to hold off sending retransmissions,
preferring to send new ARP probes. Late responses will still be recorded, but no
longer counted as drops. This also gives each target the longest amount of time
to respond.
2. Send timing pings much more frequently. Since we're not sending any
retransmissions until timeout + ratelimit, we wouldn't otherwise have any data
on drops in order to speed up or slow down.
Results are faster ARP scans with fewer missed targets. See #92 .
2020-05-15 18:18:18 +00:00
dmiller
6ed754b438
Add "hosthint" element to XML.
...
This feature allows programs consuming XML output to know when a target
has been found to be "up" before all scan phases are completed. This is
helpful for allocating storage, communicating scan progress, or
estimating total scan duration. Closes #1858 .
2020-01-11 07:05:01 +00:00
dmiller
c978ba14ca
Remove some unnecessary unsigned qualifiers (newstate is defined as int in most places)
2020-01-11 07:05:00 +00:00
dmiller
0c2a3776f0
Remove incorrect use of const on return type (not pointer). #1834
2019-12-25 20:01:15 +00:00
dmiller
33f421fd6e
Avoid assertion failure when unsolicited ARP response received
...
We probably want a more explicit handling of the case where we get an
ARP response to a request that we did not send (system's own, or another
Nmap scan running at the same time). In any case, this ought to solve
the crashes reported as #1797 and #1764 .
2019-12-03 17:04:13 +00:00
dmiller
d639a53088
Bump copyright date in license headers
2019-05-28 21:36:04 +00:00
dmiller
14705cd417
ultrascan: bail early if there are no probes in the current scan
...
This shouldn't ever happen, but it currently does for host discovery
scans using -PR where the target is not directly connected. See #1361
2018-10-22 20:12:45 +00:00
dmiller
d8ff55b72e
Start timeout clocks closer to first probe, not in batches. Closes #1150
2018-08-13 19:24:06 +00:00
dmiller
6680f5648d
Avoid using commonly-spoofed-closed ports as ping/timing ports
2018-03-28 20:17:44 +00:00
fyodor
ff62300249
Bump copyright dates to 2018 and slightly improve wording (doesn't change meaning) of Nmap license header text
2018-01-28 21:18:17 +00:00
rewanth
6ee953a5ff
Removes trailing spaces in 69 files. Closes #971 .
2017-08-23 08:52:40 +00:00
dmiller
9c7ea727a7
Update license terms for 2017
2017-06-07 12:32:38 +00:00
dmiller
ab5e247cee
Include netutil.h for IPPROTO_SCTP constant where necessary. Fixes #868
2017-04-26 18:55:16 +00:00
dmiller
e813de759a
Reduce use of utils.h for error functions
2017-04-20 22:39:08 +00:00
dmiller
891c3be3b9
remove tcpip.h from other headers' includes
2017-04-19 13:53:57 +00:00
fyodor
4bd67aa2fb
Update the Nmap license/header text to reflect latest updates to docs/legal-notices.xml
2016-12-14 00:12:23 +00:00
dmiller
3f1ad0742e
New option --defeat-icmp-ratelimit. Closes #353 , Fixes #216
2016-12-09 04:19:45 +00:00
tudor
0a7a7e395b
Scan iterator fix for compilation under Visual Studio 2010
2016-10-18 15:56:40 +00:00
tudor
9c8a435bbf
Fixed scanning the same IP multiple times with a type of scan that is now raw, incompleteHosts and completedHosts are now multisets instead of sets
2016-10-15 22:26:43 +00:00
dmiller
923f1de3e4
Increase const-ness of HssPredicate::operator() to avoid warnings.
2016-08-19 12:38:29 +00:00
tudor
074f99b291
UltraScanInfo::findHost is now faster
2016-08-10 15:39:19 +00:00
tudor
7c0280382e
incompleteHosts and completedHosts are now sets, matching a packet to a target is done faster
2016-08-09 06:07:22 +00:00
tudor
5d942ab1bd
Fixed a compiler warning
2016-08-07 16:57:32 +00:00
dmiller
8b18e348db
Avoid array overrun with -PO when probes time out
2016-07-28 16:19:49 +00:00
dmiller
67fd101b01
Enable Nmap, Nping to use Npcap over Winpcap if available.
2016-06-14 14:16:46 +00:00
dmiller
6e33d6ac3c
Bump date in copyright headers
2016-04-04 15:38:44 +00:00
dmiller
68409b2226
Update copyright date to 2015
2015-06-03 13:01:29 +00:00
d33tah
b9fb766a4f
Move a lot of raw/connect scanning routines.
2014-09-03 14:27:11 +00:00
d33tah
b6b92f6564
Move most (if not all) data structure declarations from scan_engine.cc
...
to scan_engine.h. Some method definitions remain in the header files and
should be moved to .cc later.
2014-09-03 14:27:04 +00:00
dmiller
5adfb3b1de
Update copyright notice to 2014
2014-08-16 01:52:33 +00:00
jay
8d5ec9e310
Reapply r33420, r33421. Fix a missing right parenthesis. https://xkcd.com/859/
2014-08-15 12:09:22 +00:00
fyodor
f6f59a7cd7
Auto regeneration with latest template files, etc.
2014-08-13 22:57:43 +00:00
jay
df4f23eec0
Change all statements of the form 'return BOOLEAN_EXPRESSION ? false : true;' to 'return !BOOLEAN_EXPRESSION;'
2014-08-03 04:25:18 +00:00
jay
68659157f6
Change all statements of the form 'return BOOLEAN_EXPRESSION ? true : false;' to 'return BOOLEAN_EXPRESSION;'
2014-08-03 04:22:02 +00:00
jay
d4cf544df6
Fix a missing bracket at the end of the IMPORTANT NMAP LICENSE TERMS part in each file
2014-08-02 19:29:50 +00:00
d33tah
6355a1bebe
Revert my unfinished refactoring commit I pushed by mistake.
2014-07-23 14:43:12 +00:00
d33tah
308d924415
Remove an unneeded duplicate variable assignment.
2014-07-23 14:37:16 +00:00
dmiller
5ce61b556e
Make a more descriptive error when raw sockets fail.
...
Doesn't happen often, but as the message says, certain Solaris zones can
cause problems here. This message is more informative than the previous
"socket troubles in Init"
2014-07-11 04:00:26 +00:00