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

16 Commits

Author SHA1 Message Date
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
6139ed22e7 Replace host.ip, port.number with host, port
In most cases (e.g. any of the nmap.socket operations), functions can
take full host and port tables instead of just host.ip and port.number.
This makes for cleaner-looking code and easier extensibility if we
decide to check for a protocol on both TCP and UDP, for instance.
2015-02-18 14:38:42 +00:00
tomsellers
845616623d Add support to 'citrix-enum-apps-xml' for reporting if published applications in the list are enforcing/requiring the level of ICA/session data encryption shown in the script result. This information was already in the XML provided by the server, this change just adds parsing for it. 2014-12-17 11:56:52 +00:00
jay
03dd80d280 Convert to unix line endings using dos2unix 2014-08-09 18:06:14 +00:00
fyodor
91645f1aee Change a couple files to unix line endings 2014-04-23 09:37:37 +00:00
dmiller
6bd9462dd6 Fix some CRLF line endings to LF 2014-04-17 19:50:24 +00:00
tomsellers
cacf764754 Change to citrixxml.lua to improve performance of citrixlua library when handling large XML responses containing application lists. Large responses were causing the script to consume 100% CPU for extended periods of time.
Reference:
http://seclists.org/nmap-dev/2014/q2/74
2014-04-16 11:56:21 +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
961ea25225 Re-indent some NSE libraries.
https://secwiki.org/w/Nmap/Code_Standards
2014-02-03 19:47:34 +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
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
david
5fa554266b Fix NSEDoc. 2010-03-31 20:28:14 +00:00
david
2a9f389fcc Make the module declaration in citrixxml.lua match the file name. It was
"citrix" and not "citrixxml".
2010-02-11 03:51:05 +00:00
david
19c2d93903 Merge from /nmap-exp/david/nselib-http. This is an overhaul of HTTP
parsing mostly. Response parsing is centralized, and fewer operations
are done on raw HTTP data.

The biggest user-visible change is that http.request goes back to
returning a parsed result table, not raw HTTP data. I believe this is
how the function worked in the past; it's what the NSEDoc for the
function says. The only thing that used http.request was citrixxml.lua,
and this commit alters it to match the new expectations.

The other change is that the http.pipeline function no longer accepts
the "raw" option. The only script that used that was sql-injection.nse,
and this commit modifies that script as well.
2010-01-13 02:53:13 +00:00
david
f2ae05968b Add the scripts
citrix-brute-xml
  citrix-enum-apps
  citrix-enum-apps-xml
  citrix-enum-servers
  citrix-enum-servers-xml
and the citrixxml modules, all by Patrik Karlsson.
2009-12-14 07:30:38 +00:00