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

129 Commits

Author SHA1 Message Date
dmiller
6db5c9cb85 Bump copyright date 2025-02-26 17:44:43 +00:00
nnposter
efa0dc36f2 Fix off-by-one overflow in the IP protocol table.
Fixes #2896, closes #2897, closes #2900
2024-08-08 01:31:06 +00:00
dmiller
1bb2703c51 Silence unnecessary warning after earlier code changes 2024-04-18 15:47:39 +00:00
dmiller
f999182d0f Bump date and reapply header templates 2024-02-28 18:46:45 +00:00
dmiller
c5f3665c4f Avoid up to 2 portlist lookups when setting port state in ultrascan 2024-02-26 23:10:51 +00:00
dmiller
e75a253d72 Avoid portlist lookup when port is already available 2024-02-26 23:10:51 +00:00
dmiller
1a4d41a6b7 Avoid additional portlist lookup when setting port state 2024-02-26 23:10:50 +00:00
dmiller
38c113f820 Use string_pool for service names so they aren't freed by Lua. See #2657 2023-06-16 22:19:20 +00:00
dmiller
6f6b2de214 Apply new license templates, bump copyright date 2023-04-14 17:11:46 +00:00
dmiller
3a32543db0 Key service table on protocol number, not name 2022-09-16 01:10:19 +00:00
dmiller
5f21094a68 Fix a memory leak of port service name (strdup but not freed) 2022-09-13 21:09:38 +00:00
dmiller
cc5cd5f2c6 Define our own servent/protoent structs with const members. 2022-09-12 16:59:35 +00:00
dmiller
dd690b3e0b Bump copyright date and update some links [ci skip] 2022-02-18 17:38:46 +00:00
fyodor
3aec3f3a07 Update to latest copyright templates. Main change is that Insecure.Com LLC is now Nmap Software LLC 2021-11-23 16:04:37 +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
57b7e56a68 Fix a couple isIgnoredState calls to the new prototype. 2020-12-15 22:16:36 +00:00
dmiller
1566da56f8 Reduce/cache calls to getStateCounts 2020-12-15 21:45:56 +00:00
dmiller
ef8213a36c Reintegrate Nmap 7.90 release branch 2020-10-05 23:00:30 +00:00
dmiller
736cefcdb6 Pass ScriptResult by const reference instead of copying. #1834 2019-12-29 05:15:12 +00:00
dmiller
d639a53088 Bump copyright date in license headers 2019-05-28 21:36:04 +00:00
dmiller
b1f5943b6f Make -v actually increase number of shown ports in ignorable states
With a single -v option, there was no change in how many ignorable ports
(e.g. closed or filtered) would be shown before being rolled up into the
"Not shown" line. Taking verbosity plus 1, we now get up to 50 ports in
an ignorable state, versus up to 25 without -v.
2019-05-20 03:43:10 +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
31dd0876a4 Move some functions to more appropriate files 2017-08-02 05:10:19 +00:00
dmiller
9c7ea727a7 Update license terms for 2017 2017-06-07 12:32:38 +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
228794974a Adjust indentation for clarity 2016-07-29 16:23:59 +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
dmiller
95437a1468 Fix a crash in isTCPwrapped. Closes #89 2015-03-23 12:35:39 +00:00
dmiller
29174ba87d Fix a use-after-free in idle and ftp bounce scans
PortList::forgetPort in verbose mode tries to print details on a Port
after it has been deleted. This function is only called in idle and ftp
bounce scans. Reported by Mak Kolybabi:
http://seclists.org/nmap-dev/2015/q1/129
2015-02-04 20:46:10 +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
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
20235c2389 Improve OS detection by moving to a different port if 'tcpwrapped' is detected 2014-07-30 06:55:48 +00:00
d33tah
421176fc00 Get rid of double newline at the EOF I accidentally introduced in the
last commit.
2014-06-18 11:30:02 +00:00
dmiller
3f0d0c16f9 Spellcheck on Nmap, Nsock, Nbase source files 2014-02-20 18:44:12 +00:00
d33tah
4816358475 Replace all tab characters at the beginnings of lines with 8 spaces.
Mixed indentation annoyed my vim.
2014-01-05 19:14:26 +00:00
d33tah
ccd0c02a4c Add a lacking space in the license comment. The command I used to do this is:
for file in `grep "* including the terms and conditions of this license text as well.       \*" * -r --files-with-match `; do sed "s/\* including the terms and conditions of this license text as well.       \*/* including the terms and conditions of this license text as well.        */g" -i $file; done
2013-09-11 19:06:20 +00:00
fyodor
6e01ecd452 Update an email address, fix a typo, and slightly reword a sentence. 2013-07-30 00:02:00 +00:00
fyodor
83fb10ec56 Update the Nmap copyright/license files. This isn't the new Nmap Public Source License we've been discussing on the list, but rather just a 'quick patch' to hopefully prevent some of the abuse we've been seeing from companies lately. More details on the changes will be posted to the dev list. Also, the copyright year was updated to 2013 (which is the only change to Nsock license statements). 2013-07-28 22:05:05 +00:00
david
c8b9bf8107 Make PortList::mapPort return void.
Contrary to the doc comment, this function could never return false but
only cause a fatal error.

Resolves these Parfait reports
(http://seclists.org/nmap-dev/2012/q4/412).

Error: Null pointer dereference (CWE 476)
    Read from null pointer 'port'
         at line 344 of components/nmap/build/amd64/portlist.cc in function 'PortList::setServiceProbeResults(unsigned short, int, serviceprobestate, char const*, service_tunnel_type, char const*, char const*, char const*, char const*, char const*, char const*, std::vector<char const*, std::allocator<char const*> > const*, char const*)'.
           Function 'PortList::createPort(unsigned short, unsigned char)' may return constant 'NULL' at line 671, called at line 343.
           Null pointer introduced at line 671 in function 'PortList::createPort(unsigned short, unsigned char)'.
Error: Null pointer dereference (CWE 476)
    Write to null pointer 'current'
         at line 520 of components/nmap/build/amd64/portlist.cc in function 'PortList::setPortState(unsigned short, unsigned char, int)'.
           Function 'PortList::createPort(unsigned short, unsigned char)' may return constant 'NULL' at line 671, called at line 518.
           Null pointer introduced at line 671 in function 'PortList::createPort(unsigned short, unsigned char)'.
Error: Null pointer dereference (CWE 476)
    Write to null pointer 'answer'
         at line 880 of components/nmap/build/amd64/portlist.cc in function 'PortList::setStateReason(unsigned short, unsigned char, unsigned short, unsigned char, sockaddr_storage const*)'.
           Function 'PortList::createPort(unsigned short, unsigned char)' may return constant 'NULL' at line 671, called at line 877.
           Null pointer introduced at line 671 in function 'PortList::createPort(unsigned short, unsigned char)'.
         at line 885 of components/nmap/build/amd64/portlist.cc in function 'PortList::setStateReason(unsigned short, unsigned char, unsigned short, unsigned char, sockaddr_storage const*)'.
           Function 'PortList::createPort(unsigned short, unsigned char)' may return constant 'NULL' at line 671, called at line 877.
           Null pointer introduced at line 671 in function 'PortList::createPort(unsigned short, unsigned char)'.
2012-12-22 06:02: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
e941b783f4 Whitespace. 2012-12-04 03:06:21 +00:00
david
7f5a11f006 NOLUA guard in Port::freeScriptResults. 2012-12-04 03:06:20 +00:00
david
03d4b03d2c Get rid of "using namespace std".
Importing the whole std namespace caused a problem with Clang and the
punning of bind and std::bind.

http://seclists.org/nmap-dev/2012/q4/58

The Web's opinion of "using namespace std" also seems to be more against
than for.
2012-10-11 04:45:50 +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
kroosec
ba9c6ea5e1 Second commit from rpc-grind branch. Removing old implementation from output and portlist. 2012-08-17 18:31:50 +00:00