1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-31 20:09:02 +00:00
Commit Graph

8874 Commits

Author SHA1 Message Date
dmiller
96c1a4f46b Another reindent pass on smb.lua, this time fully automated
Using Vim and this indent script:
https://gist.github.com/bonsaiviking/8845871
2014-02-06 15:53:34 +00:00
dmiller
a56f73effb Add NSEdoc to formulas.lua 2014-02-05 19:02:31 +00:00
dmiller
e5fc094635 Add some NSEdoc for smbauth.get_host_info_from_security_blob 2014-02-05 18:30:57 +00:00
dmiller
7dd47ec3a3 Re-indent the Lua files in nselib/data/
https://secwiki.org/w/Nmap/Code_Standards
2014-02-05 17:58:36 +00:00
dmiller
69e343f0aa Reindent the last of the NSE libraries.
https://secwiki.org/w/Nmap/Code_Standards
2014-02-04 19:47:26 +00:00
henri
d5746993e2 Define nsi_delete() notify modes as enums.
These values aren't flags that can be ORed.
2014-02-03 20:53:09 +00:00
dmiller
961ea25225 Re-indent some NSE libraries.
https://secwiki.org/w/Nmap/Code_Standards
2014-02-03 19:47:34 +00:00
dmiller
63db1bfd12 Replace inline tabs with spaces.
Left some in the @output section, since libraries are apparently
emitting tab-separated tables (mysql or mssql)

https://secwiki.org/w/Nmap/Code_Standards
2014-02-03 16:49:26 +00:00
dmiller
31a2c432e1 Final re-indent for scripts. 2014-02-02 15:33:39 +00:00
dmiller
d309fecd12 Re-indent some more scripts. Whitespace-only commit
https://secwiki.org/w/Nmap/Code_Standards
2014-02-02 15:33:29 +00:00
dmiller
c7d4f2ec96 Re-indent some scripts. Whitespace-only commit
https://secwiki.org/w/Nmap/Code_Standards
2014-01-31 21:01:26 +00:00
dmiller
298be5bfaa Re-indent some scripts. Whitespace-only commit
https://secwiki.org/w/Nmap/Code_Standards
2014-01-31 17:36:09 +00:00
dmiller
bcf991c128 Add missing require in redis-info 2014-01-31 17:36:02 +00:00
dmiller
078aa688c9 Reindent some scripts. Whitespace only.
https://secwiki.org/w/Nmap/Code_Standards
2014-01-31 16:37:27 +00:00
dmiller
32936167c2 Fix dns-fuzz portrule (was defaulting to tcp) 2014-01-31 15:32:23 +00:00
dmiller
b4994505c3 Add TCP support to dns-fuzz. Also suggest -sU in usage 2014-01-31 15:28:54 +00:00
dmiller
972d799143 Add TCP support to dns.lua
Slightly modified from patch from John Bond:
http://seclists.org/nmap-dev/2014/q1/118
2014-01-31 15:14:31 +00:00
dmiller
d36c08dcf5 Re-indent some scripts. Whitespace-only commit
https://secwiki.org/w/Nmap/Code_Standards
2014-01-31 13:02:29 +00:00
henri
64fb5b3482 Added safe fd_set operations.
Only FD_SET and FD_CLR were available. Added a FD_ISSET equivalent.
Implemented them as static inline instead of macros for consistency.

These functions abort() if the FD number is higher than FD_SETSIZE
(except on windows where no check is performed).
2014-01-30 19:02:57 +00:00
henri
bf872bf113 Extract and publish more information about redis.
* Get OS
  * Get redis version (and set it to port.version)
  * Get architecture (and set it to port.extraversion)
  * Make and set an application CPE
2014-01-30 18:35:25 +00:00
henri
1cb2aba30f Updated the redis scripts portrules. 2014-01-30 18:35:21 +00:00
henri
4f5be9bfab Designate the redis service as "redis".
This makes it consistent with the GET probe.
2014-01-30 18:35:13 +00:00
dmiller
4eaa21e7cb Integrate David's ssl-enum-ciphers improvements
From this thread: http://seclists.org/nmap-dev/2014/q1/105

* Extensions now better supported in tls.lua
* ssl-enum-ciphers sends all EC options to ensure servers reply with
  supported EC suites
* tls.lua supports multiple messages of a single type within 1 record
* tls.record_buffer will read an entire TLS record into a buffer
* ssl-date and tls-nextprotoneg updated to use tls.record_buffer
2014-01-30 18:12:14 +00:00
dmiller
83fd814a2c Really fix nsock's pcap configuration
This wasn't using Nmap's included libpcap if no options were specified,
instead compiling nsock without pcap support if no libpcap could be
found (which breaks Nmap)
2014-01-30 03:40:26 +00:00
dmiller
cd7df91ce0 Fix a bug introduced in r32678
string.gsub returns 2 values, the new string and the number of
replacements made. It also has a 4th argument, the number of
replacements to make. So when you use the return value of gsub as the
3rd argument, and no replacements were made, it instructs the next call
to not make any replacements. Thanks to Ron Bowes for reporting this
issue.
2014-01-29 13:24:30 +00:00
david
d6288c5280 Escape '%' in arguments to Thread:d.
A user reported this crash when scanning a target whose name contained
the '%' character:

NSE: Script Engine Scan Aborted.
An error was thrown by the engine: nse_main.lua:322: invalid capture index
stack traceback:
	[C]: in function 'gsub'
	nse_main.lua:322: in function 'd'
	nse_main.lua:377: in function 'start'
	nse_main.lua:912: in function 'run'
	nse_main.lua:1390: in function <nse_main.lua:1293>
	[C]: in ?

I'm not sure how a name with '%' got resolved, but I was able to
reproduce the crash by adding this line to /etc/hosts:
	127.0.0.1	a%40b
and then running
	./nmap --script=banner a%40b -d --top-ports 5

The gsub function recognizes "%d", where d is a digit, as a capture
index. The constructed string is then passed to print_debug, which is
like printf. Therefore we escape every occurrence of "%" twice, to get
"%%%%".
2014-01-27 22:56:29 +00:00
dmiller
1d9fa6bea2 Fix some bugs in sstp-discover reported on IRC 2014-01-27 19:13:22 +00:00
d33tah
e35d0a0c23 Add a comment to explain numIncompleteHostsLessThan. 2014-01-27 00:44:16 +00:00
dmiller
3bd86146ac Don't clean Ndiff if it wasn't built 2014-01-26 16:54:13 +00:00
dmiller
16505b5cc7 Nsock: let libpcap decisions set LDFLAGS, needed for make check 2014-01-26 16:38:24 +00:00
dmiller
2e047114f6 Improve support for non-included libpcap in nsock 2014-01-26 16:38:22 +00:00
dmiller
6251f85c9e Let nsock handle --with-libpcap in the same way as Nmap 2014-01-26 16:38:18 +00:00
dmiller
ef61c11831 Retab creds.lua (Fixes some nsedoc ugliness) 2014-01-23 21:52:38 +00:00
dmiller
620f9fdb34 Remove trailing whitespace in lua files
Whitespace is not significant, so this should not be a problem.
https://secwiki.org/w/Nmap/Code_Standards
2014-01-23 21:51:58 +00:00
dmiller
86ac3c0a19 Whitespace fixing on packetdecoders.lua
Changed indentation to 2 spaces, converted \r\n line endings to \n,
changed line-internal tabs to single space, removed whitespace at line
endings, reindented entire file with vim.
https://secwiki.org/w/Nmap/Code_Standards
2014-01-22 18:26:02 +00:00
dmiller
db1d82ad1f Fixed global assignments with nse_check_globals
All fixes made by hand. A couple real bugs/errors fixed, due to
copy-paste of code from other scripts without changing variable names.
2014-01-22 17:45:00 +00:00
dmiller
8a07146936 Define in-use-but-undefined ScriptDBSyntaxError
Subclassed SyntaxError to provide some useful info when this happens. It
was happening with unittest.nse because it wasn't part of any category.
Previously, this would crash Zenmap because ScriptDBSyntaxError was
undefined. Now it crashes because there's really a syntax error (fixed
in previous revision)
2014-01-21 22:17:16 +00:00
dmiller
2ea4934bbf Add unittest.nse to 'safe' category 2014-01-21 22:17:13 +00:00
sophron
7b43ab1ff6 [NSE] Symbol '%' missing in the urls. 2014-01-20 14:44:45 +00:00
dmiller
726b259b20 Consolidate "contains" functions into stdnse.contains
These implementations were all functionally identical. The replacement
has an extra feature of returning the index where the value was found,
currently unused.
2014-01-16 22:57:33 +00:00
dmiller
197f28265f New function stdnse.format_mac
This function will format a MAC address as colon-separated hex bytes.
It's really very simple: stdnse.tohex(mac, {separator=":"})

This commit updates all the instances I could find of the varying
convoluted attempts at performing this conversion.
2014-01-16 21:50:30 +00:00
dmiller
a6b79f9976 Add CHANGELOG entry for tls library 2014-01-16 21:50:26 +00:00
dmiller
b61d378d3a Update script.db 2014-01-16 19:09:13 +00:00
dmiller
a998d97216 Add sstp-discover NSE script from Niklaus Schiess 2014-01-16 19:07:43 +00:00
dmiller
645ef2a0bd Update ssl-date to use tls lib 2014-01-16 18:10:04 +00:00
dmiller
760da1788f Let tls-nextprotoneg use tls.lua library
Required fixes to tls lib's extensions (did not previously support
extension data)
2014-01-16 18:10:02 +00:00
dmiller
35148980ef Update ssl-enum-ciphers to use tls.lua 2014-01-16 18:09:59 +00:00
dmiller
71b0769fc3 New tls.lua library for handling TLS records 2014-01-16 18:09:57 +00:00
dmiller
b083fb98e6 Update comm library NSEdoc
Document some missing options to the functions, and adjust an error
message to use the correct option name.
2014-01-15 20:11:39 +00:00
dmiller
3b5b0ba154 Note that HTTPS is supported by http NSE library 2014-01-15 16:52:46 +00:00