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

305 Commits

Author SHA1 Message Date
dmiller
7bf0a7f016 Remove/change some text to describe Npcap, not WinPcap 2021-07-21 22:42:46 +00:00
dmiller
f17fa67008 Avoid copying script results; store pointers instead. 2021-04-29 17:52:24 +00:00
dmiller
74e066d356 Another round of const 2021-04-27 19:22:12 +00:00
dmiller
bf9d60734d Use std::multiset to keep script outputs in order instead of sorting. 2021-04-27 19:22:09 +00:00
dmiller
d142d1f808 a few more consts 2021-04-26 15:04:47 +00:00
dmiller
e2f1df924c Fix expansion of %F strftime-like filenames. 2021-01-27 21:38:46 +00:00
dmiller
ef2bafb09c Report system error message when fopen fails 2020-12-28 17:51:16 +00:00
dmiller
38671f2225 Enhance output to print proto, reason, and port list for ignored ports
Normal output will report count, protocol, and reason for each group of
ports in an ignored state (usually closed or filtered when there are
more than 25 ports in one of those states).

XML output will contain a consolidated list of port numbers as well.
2020-12-17 22:12:04 +00:00
dmiller
19daadfd31 Short-circuit 0-ports-scanned case, which already gets special treatment as 'Skipped port scan' output 2020-12-17 22:12:04 +00:00
dmiller
bad0e61739 Fix grepable output when all scanned ports are ignored
Previous behavior was to output an extra host status line "Status: up"
New behavior outputs an empty "Ports: \t" then the "Ignored State"
field.
2020-12-17 17:34:32 +00:00
dmiller
790beb2419 Simplify: No way to have only 1 scanned port in ignored state. 2020-12-17 17:34:32 +00:00
dmiller
1566da56f8 Reduce/cache calls to getStateCounts 2020-12-15 21:45:56 +00:00
dmiller
d1b39a6003 Use unsigned format specifier for unsigned value (was showing negative hosts scanned) 2020-12-02 15:30:24 +00:00
dmiller
ef8213a36c Reintegrate Nmap 7.90 release branch 2020-10-05 23:00:30 +00:00
dmiller
8ba183531d Allow %F date format to mean YYYY-mm-dd like GNU date 2020-09-17 21:42:03 +00:00
dmiller
4fcc04cce5 Avoid printing null timestamp if scan was skipped. Fixes nmap/nmap#1725 2020-05-14 18:11:41 +00:00
dmiller
f37a4bc42e Fix a variable name (broke Windows build in r37875, 7faec7f15) 2020-02-07 05:07:09 +00:00
dmiller
7faec7f157 Inline getpcapinterfaces, used in only 1 location 2020-01-14 03:39:25 +00:00
dmiller
a2c75e0ef4 Abstract nsock logging function to avoid nsock.h inclusion in output.h 2020-01-11 16:03:28 +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
736cefcdb6 Pass ScriptResult by const reference instead of copying. #1834 2019-12-29 05:15:12 +00:00
dmiller
e356ad1123 Add thread-safe wrapper for ctime. 2019-12-20 20:53:32 +00:00
dmiller
4a1c9424d3 Replace localtime calls with thread-safe alternative. See #1834 2019-12-15 05:05:57 +00:00
nnposter
7e9cf65489 Prevent backslash-escaping of CR characters in XML output. Fixes #1648 2019-07-21 00:44:32 +00:00
dmiller
d639a53088 Bump copyright date in license headers 2019-05-28 21:36:04 +00:00
dmiller
33f16dd075 Don't fatal() on iflist if npcap isn't found 2018-11-21 03:43:10 +00:00
dmiller
689ea0e05d Spelling corrections. Fixes #1160 2018-03-26 14:59:41 +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
dmiller
2a1f81d42d Use bool not int for boolean options 2017-12-07 18:20:07 +00:00
dmiller
d9b66b20a3 Rename o.resolve_all to o.always_resolve
This is the flag for the -R option. "always" is more appropriate than
"all," since "resolveall.nse" does something different, and there is a
"resolve_all" function that does that thing as well, unrelated to the -R
option.
2017-12-06 04:17:04 +00:00
rewanth
6ee953a5ff Removes trailing spaces in 69 files. Closes #971. 2017-08-23 08:52:40 +00:00
dmiller
a66e75173e Keep resolved, scanned addresses separate from unscanned addresses. 2017-08-07 14:25:13 +00:00
dmiller
9c7ea727a7 Update license terms for 2017 2017-06-07 12:32:38 +00:00
dmiller
e09cb62439 Only report warning about ratelimits when filtered ports exist 2017-05-02 20:36:08 +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
dmiller
b4924eb362 Avoid warning about --defeat-rst-ratelimit when TCP scan was not even done. Fixes #727 2017-03-05 04:25:39 +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
dmiller
062d272d0f Make --open imply --defeat-rst-ratelimit 2016-11-28 17:11:01 +00:00
dmiller
7128753730 Randomly ask for user submission of already-matching IPv6 fingerprint from weak groups 2016-09-30 05:30:44 +00:00
dmiller
9370f5bd5d Strip carriage returns (\r) from output to prevent spoofing 2016-09-21 03:55:12 +00:00
tudor
7f1ec2b806 o.numhosts_scanned and o.numhosts_up are now printed as unsigned ints with %u 2016-08-09 14:31:59 +00:00
tudor
c860732097 Limited unnecessary calls to alloc_vsprintf 2016-08-07 16:19:53 +00:00
vincent
32efc8b28c Use FQDN_LEN instead of MAXHOSTNAMELEN for DNS name buffers
This closes #140 (issue #140), namely "Use correct lengths 
for FQDN, not MAXHOSTNAMELEN"
2016-07-26 14:06:22 +00:00
vincent
0f22680426 Correct format string specifiers
The formats has been tested and verified on Mac OS X 10.8.5,
Mac OS X 10.11.5 and Ubuntu 14.04 LTS, all on x86_64 machines
and OSs. It mainly silences warnings. There were no warnings on
Ubuntu but a few on Mac OS, so the fix is intended to silence
warnings on Mac OS whithout triggering new warnings on other OSs.
Example of warnings previously encountered:

netutil.cc:2828:74: warning: format specifies type 'unsigned short'
but the argument has type 'int' [-Wformat]
2016-07-01 11:44:26 +00:00
dmiller
6e33d6ac3c Bump date in copyright headers 2016-04-04 15:38:44 +00:00
dmiller
e124565c58 Use time_t instead of long and double for storing uptime
Fixes #275.

This results in fewer casts and less subtraction than the previous
method, and should still be portable. Only division and subtraction and
difftime are performed on the value, so it will not overflow. And the
TCP timestamp itself is a 32-bit value, so it can't refer to a time
farther in the past than the 32-bit epoch. One explicit cast (to long
long) is used in order to ensure the format string can handle any
conceivable value according to the compiler and avoid a warning message.
2016-01-13 20:53:39 +00:00
dmiller
dd0050598b Print service info for unlisted ports when service tunnel is detected 2015-12-20 05:34:56 +00:00
dmiller
5e47450bdc Use forward-declaration of class FingerPrintResults in Target.h 2015-06-30 04:04:51 +00:00