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

24 Commits

Author SHA1 Message Date
nnposter
4fb51d6a3e Fix a typo 2019-03-06 05:30:15 +00:00
nnposter
be802e321f Incorrect status variables were checked for errors. Closes #1504 2019-03-06 04:53:23 +00:00
dmiller
99825c525d Remove bin.lua from rmi.lua 2018-09-11 04:37:48 +00:00
dmiller
d84ddbe3fd Remove bit library from a few more libs 2018-08-28 03:52:55 +00:00
dmiller
689ea0e05d Spelling corrections. Fixes #1160 2018-03-26 14:59:41 +00:00
nnposter
8be2332c54 Fixes unpacking of the Java serialization magic marker. This complements the change in r36149. 2016-09-30 20:22:09 +00:00
dmiller
bd77d65e3b Avoid another unsigned vs signed integer overflow in packing 2016-08-20 00:08:02 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
03110e7e89 String concat cleanup grab-bag
Mostly just eliminating concatenation-reassignments by chaining
concatenations, reordering assignments to allow better use of bin.pack,
and using tables to store intermediate results before concatenating
them. Used strbuf as a quick fix in dhcp.lua. Eliminated some unused
string variables in vulns.lua.
2015-03-02 14:39:29 +00:00
dmiller
e275a96c72 Use string.gsub instead of looped concat to modify strings 2015-02-27 14:55:29 +00:00
batrick
ee6622aea4 nselib stdnse.print_debug -> stdnse.debug
$ f() { find -name \*.lua -exec /bin/echo sed -i "$1" {} \; ; }
$ f 's/stdnse.print_debug( *\([0-9]*\) *, */stdnse.debug\1(/'
$ f 's/stdnse.print_debug( *"\(.*\))/stdnse.debug1("\1)/'
2014-08-03 00:56:45 +00:00
dmiller
1b71f75aad Spelling fixes for Lua files
Mostly in documentation/comments, but a couple code bugs were caught,
including a call to stdnse.pirnt_debug and a mis-declared variable.
2014-02-19 04:15:46 +00:00
dmiller
1c0c090ace Refactor some Lua string concatenations.
Using this regular expression, '\(\w*\)\s*=\s*\1\s*\.\.', found and
replaced many string concatenation-reassignments. These can cause
performance issues, since a new string gets allocated for each
reassignment. In many cases, the replacement is simply a single string,
wrapped across lines with the '\z' escape, which consumes a newline and
whitespace following it. In other cases, a table is used to hold the
substrings until the final string is built with a single table.concat
operation (same technique used in stdnse.strbuf).

Also, some string-building loops of this form:

s = ""
for i = 1, 100, 1 do
  s = s .. "\0"
end

were replaced with this much faster and cleaner version:

s = string.rep("\0", 100)
2014-02-18 18:10:23 +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
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
aca
ba67aa5993 Commited rmi-vuln-classloader script 2012-05-28 18:04:28 +00:00
batrick
000f6dc4d9 Lua 5.2 upgrade [1] for NSE.
[1] http://seclists.org/nmap-dev/2012/q2/34
2012-05-27 08:53:32 +00:00
batrick
c4d6d12be7 \x is not a valid escape sequence... 2011-09-09 19:08:13 +00:00
fyodor
de57b85a47 Typo fix: LUA -> Lua 2011-05-18 23:15:58 +00:00
david
596d2bf477 Fix to rmi.doh by Martin Swende. 2011-01-16 05:07:22 +00:00
david
21d0324c5b Updates to rmi-dumpregistry.nse and rmi.lua from Martin Holst Swende. 2010-11-23 17:45:58 +00:00
batrick
93528b984c Fixed bad global access. 2010-11-02 23:35:02 +00:00
david
d7ab029c76 Fix a documentation typo in rmi.lua. 2010-11-02 01:17:52 +00:00
david
3040659465 Add the rmi.lua library and rmi-dumpregistry.nse script by Martin Holst Swende. 2010-11-01 20:47:48 +00:00