1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 01:19:03 +00:00
Commit Graph

290 Commits

Author SHA1 Message Date
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
henri
b55ff2d68f Don't associate nsock logging info to a nspool.
Make current loglevel and current log callback global
to the library. Attaching them to the nsock pool doesn't
bring any benefit and prevents from logging activity in
code sections that don't have access to a pool (such as
proxy chain specification parsing).

Updated external calls and nsock tests accordingly.
2015-06-27 08:21:53 +00:00
dmiller
638a123ba6 Move osscan structs from global_structures to osscan2.h 2015-06-23 15:53:05 +00:00
dmiller
68409b2226 Update copyright date to 2015 2015-06-03 13:01:29 +00:00
dmiller
c0628fd141 Report IPv4 and IPv6 addresses resolved for each host
Previously, we would only request IPv4 addresses by default, or only
IPv6 when scanning with -6. Now, we'll request both (by not passing an
address family in the hints to getaddrinfo) and report them all in the
"Other addresses" line. This should encourage more users to scan with
-6. Additionally, it allows us to catch and report attempts to scan
IPv6-only hosts via IPv4, where previously we would just say "Failed to
resolve"

Closes #76
2015-03-11 04:14:26 +00:00
dmiller
54c737a377 Update location of fingerprint submitter. 2015-02-12 05:02:47 +00:00
dmiller
d0b360b1a2 normalize capitalization for ttl output 2014-09-03 04:49:48 +00:00
dmiller
5adfb3b1de Update copyright notice to 2014 2014-08-16 01:52:33 +00:00
jay
05772dd1e5 Change default output mode to show TTL info with --reason directly (no need of --reason -v). Also, remove TTL column and move TTL info to REASON column. See http://seclists.org/nmap-dev/2014/q3/289 for discussion on this 2014-08-15 14:07:25 +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
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
jay
d70f5b364a Show TTL in default output if "--reason -v" is asked for. 2014-07-22 01:55:04 +00:00
dmiller
1320ea9ca2 Remove leftover debugging statement 2014-06-26 04:01:44 +00:00
dmiller
a0a94f9303 Properly handle interfaces with NULL addresses
Some vsnprintf implementations (or perhaps some compiler options?) don't
like formatting NULL as %s, and will segfault (ran into this with
libstdc++ on Solaris). We don't get bug reports because at least some
(including mine on Ubuntu) will simply format it as "(null)".

This patch adds explicit checking for NULL to avoid the segfault
condition.
2014-06-26 02:53:57 +00:00
d33tah
a80c90608c sed -i 's/if ( /if (/g' *.cc *.h; sed -i 's/for ( /for (/g' *.cc *.h; sed -i 's/( /(/g' nmap_amigaos.h tcpip.h service_scan.cc
There's still quite a lot of code like this, nse_openssl.cc being most
messy IMHO. Also, I left out "if( something )" syntax.
2014-06-25 15:40:54 +00:00