1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-09 23:16:32 +00:00
Commit Graph

2060 Commits

Author SHA1 Message Date
dmiller
140dd72415 Fix build with OpenSSL 3.0
Updated all OpenSSL code to OpenSSL 3.0 API with no deprecated functions. Some
NSE functions were changed:
* openssl.rc4_options and openssl.rc4 were removed in favor of openssl.encrypt
* openssl.bignum_pseudo_rand is now an alias for openssl.bignum_rand
* openssl.bignum_is_prime and openssl.bignum_is_safe_prime will now ignore the
  nchecks parameter, using a secure default instead.
2022-08-25 14:51:59 +00:00
dmiller
050da3c1b7 Ensure oops errors return a string. Fixes #2500 2022-08-15 16:35:07 +00:00
dmiller
b5b48befe3 Fix a typo [ci skip] 2022-03-10 17:24:36 +00:00
dmiller
dd690b3e0b Bump copyright date and update some links [ci skip] 2022-02-18 17:38:46 +00:00
dmiller
e8df904e7e Handle unknown/unexpected tokens in login. See #1554 2022-01-04 20:36:43 +00:00
dmiller
c3d54f1fac Change how ms-sql NSE scripts run
MS SQL NSE scripts run on database instances, which can be TCP or named
pipes. With this change, all TCP instances on scanned ports will have
script output attached under the port as a portrule script. Named pipe
instances and TCP instances on unscanned ports will be displayed in the
hostrule script output at the end of the host's output. Utility function
mssql.Helper.InitScript makes it easy to write scripts that just work on
a per-instance basis, without bothering where to put the output.
Discovery will be done once per host, regardless of how many scripts are
run, and can be guaranteed to be done before the script's action takes
place.
2022-01-03 21:08:52 +00:00
dmiller
4124025d62 Clarify that args are strings [ci skip] 2022-01-03 21:08:50 +00:00
dmiller
3cf836c9b5 Register mssql instances found in port scan. See #927 2021-12-15 23:44:43 +00:00
dmiller
6a2260aea0 Fix mssql's SetVersionNumber to consider subbuild (not used currently) 2021-12-15 23:44:42 +00:00
dmiller
02c0354744 Avoid TOCTOU by checking discovery state in mssql.Discover
A script might check WasDiscoveryPerformed and get a negative response,
then call Discover, during which time another script already called
Discover. Instead, check the condition *after* acquiring the mutex.
2021-12-15 23:44:41 +00:00
dmiller
0b7dc80349 Fix TDS7 password encoding. Fixes #2388. 2021-12-14 22:35:57 +00:00
dmiller
b281598a4e Add a bit to nsedoc for nmap.list_interfaces 2021-12-12 23:42:35 +00:00
dmiller
87fe985f32 Move a reused function out to file scope 2021-12-07 19:50:47 +00:00
dmiller
8a85cdd06b Minor perf boost: use locals, not class members, for string funcs in stdnse 2021-12-07 19:50:46 +00:00
dmiller
fa029ca531 Add BSON handlers for most data types. Fixes #2393 2021-12-07 19:33:40 +00:00
dmiller
d34d14416d Performance improvement for stdnse.tohex 2021-12-07 19:33:39 +00:00
fyodor
158c2e493c Change Insecure.Com LLC to Nmap Software LLC 2021-11-23 19:01:05 +00:00
dmiller
07811b8006 Avoid crashing script if bson can't be parsed. See #2393 2021-11-11 16:26:27 +00:00
dmiller
f062c59843 fix a typo in json test 2021-11-11 16:26:27 +00:00
ron
210d3c29f4 Add new fingerprint to http-fingerprints.lua (/api/ and /api-docs/) 2021-09-10 17:13:24 +00:00
ron
b0bd2776a7 Add new fingerprint to http-fingerprints.lua (/error.html) 2021-09-09 18:13:32 +00:00
dmiller
7c61f7c9c3 TLS 1.3 support for NSE. Fixes #1691 2021-07-02 20:01:30 +00:00
ron
61f17067a3 Add new fingerprint to http-fingerprints.lua (BitWarden) 2021-06-04 19:10:23 +00:00
nnposter
67a04de96a Use uppercase hex digits in percent encoding. Fixes #2281 2021-05-17 21:31:32 +00:00
ron
056b63833a Add new fingerprints to http-fingerprints.lua (Wordpress, Health) 2021-02-19 20:21:09 +00:00
nnposter
d4f4124c91 Clarify the expected format of the Nikto database 2021-02-17 04:13:20 +00:00
nnposter
6d1c3f091e Fix Nikto db path resolution 2021-02-17 03:42:33 +00:00
dmiller
d4bf034df9 Fix TDS7/mssql login packet for non-ascii usernames. See #2056 2021-02-08 22:49:19 +00:00
dmiller
b305ba6b5d Prevent ssl-* from printing to jetdirect ports. Fixes #2237 2021-01-25 17:00:40 +00:00
nnposter
58617a79f7 SMB2 dialect refactoring. Fixes #2203, closes #2208 2021-01-18 21:21:43 +00:00
dmiller
5258ac6b3c Be clear about why unpwdb/passdb are not valid. See #2224 2021-01-18 18:15:03 +00:00
nnposter
2f78ac2eb5 Fix broken JSON unit tests. Closes #2222 2021-01-08 04:14:21 +00:00
dmiller
1943c0a2fc Simplify output_table __index metamethod
From Lua 5.3 docs: "Despite the name, the metamethod for this event can
be either a function or a table. [...] If it is a table, the final
result is the result of indexing this table with key."
2020-12-30 23:31:35 +00:00
nnposter
77f764fe72 Add script nbns-interfaces. Closes #2201 2020-12-30 03:51:21 +00:00
nnposter
003849f795 Minor code simplification using tableaux.invert 2020-12-16 18:03:08 +00:00
nnposter
1b39988bf9 Correct the return value of smb2.negotiate_v2
As documented, the function should return the negotiated SMB2 dialect,
not just reflect back the dialect override table.
2020-12-16 17:54:15 +00:00
nnposter
a0172dff48 MS SQL build map true-up 2020-12-04 03:16:33 +00:00
nnposter
1293291ac8 Skip lease time in DHCP client packets by default
The old behavior (of using the default time of 1s) did not allow constructing
packets without this option, which in turn resulted in (1) DHCPINFORM packets
being non-compliant with RFC 2131 and (2) DHCP discovery scripts potentially
receiving non-default IP lease information. Fixes #2197
2020-12-04 00:38:12 +00:00
dmiller
6f57df02be Don't strip leading 0s in stdnse.tobinary
Every place this function is used, the result is padded with 0s anyway,
so may as well not strip them here. Didn't remove the padding code since
this could return only 4 chars, and most padding is to 8-char width.
2020-11-30 23:22:07 +00:00
dmiller
86deb87187 Use local functions instead of anonymous functions for gsub (less GC overhead) 2020-11-30 23:22:06 +00:00
dmiller
c8fdcd80b5 Precalc/reuse some tables and values 2020-11-30 17:59:18 +00:00
nnposter
c00f054d3c Fix crashes when decoding codepoints larger than 255. Fixes #2192
These codepoint references are now left intact. If necessary, it would be
a trivial change to replace them with corresponding UTF sequences.

Note that the previous code was decoding the character references recursively,
which was probably not the intent.
2020-11-25 02:14:03 +00:00
dmiller
8eebe86ee9 http.lua: Reuse constant objects instead of creating them 2020-11-06 21:48:32 +00:00
dmiller
5eced2c1a5 Reuse constant objects instead of creating them for frequently-used functions 2020-11-06 21:48:31 +00:00
dmiller
041838d986 Clean up packet.lua, add a few unit tests. 2020-11-04 22:26:58 +00:00
dmiller
81bc933118 Return correct error ID 2020-10-19 17:13:21 +00:00
dmiller
b9bb2ec387 Fix (again) the Windows date representation problem. 2020-10-10 13:37:03 +00:00
nnposter
e333addec4 Ability to set SNMP protocol version. Closes #1473 2020-10-09 02:43:26 +00:00
dmiller
c174f8dd97 Adjust base time by local offset for Windows 2020-10-08 23:09:22 +00:00
dmiller
50bef20b92 Handle date formatting for Windows for years earlier than 1970. See #2136 2020-10-08 23:09:21 +00:00