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

33 Commits

Author SHA1 Message Date
nnposter
3952e2fd62 Fixes an issue that caused long integers to be expressed in scientific notation. Fixes #807 2017-04-09 13:33:31 +00:00
dmiller
5fe8df548d Convert json.lua to native bitwise operators 2017-03-09 05:13:44 +00:00
dmiller
1923a5f115 Remove some old documentation about a deleted test system in json.lua [ci skip] 2017-02-06 18:45:06 +00:00
dmiller
3c7fe1e452 Remove some unused functions 2016-09-08 13:31:24 +00:00
dmiller
cb4b46bd53 Canonicalize authors as tables instead of comma-separated strings 2016-06-09 22:46:42 +00:00
dmiller
6b598fe547 Remove an incorrect NSEdoc blurb: JSON Object uses all keys 2016-04-14 16:50:47 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
00064a1809 Whitespace/reindent cleanup in NSE. https://secwiki.org/w/Nmap/Code_Standards 2015-05-31 17:37:51 +00:00
dmiller
fac667e621 Bugfixes in json.lua
A few bugs crept in during the conversion to LPEG parsing:

1. Unicode parsing of UTF-16 surrogate pairs returned an ending position
that was off by 2, so that the last 2 characters in the escape code were
parsed as literal characters.

2. Arrays and objects were not being tagged as such with make_array and
make_object during parsing.

This commit fixes these bugs, and returns to using unicode.utf8_enc for
UTF-8 encoding instead of a separately-defined function. Also, the tests
at the end (which were helpful in finding both of the bugs above) were
converted to unittest.lua tests.
2015-02-28 12:43:43 +00:00
dmiller
0e74dd7a35 Replace some string.char and bin.pack calls with literals 2015-02-27 19:42:56 +00:00
dmiller
2692746c42 NSEdoc cleanup
Mostly splitting function summaries (the first paragraph of NSEdoc) from
the body of the description to make the summary indexes shorter and
easier to scan.

Also fixed some unbalanced code tags like <code>foo</table>
2014-09-02 18:23:06 +00:00
jay
b281e0bf1d Get rid of unnecessary spaces at the end of lines 2014-08-09 19:09:06 +00:00
batrick
4b9f1c6766 nselib stdnse.print_debug -> stdnse.debug
Manual fixes.
2014-08-03 01:17:09 +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
devin
d68396d823 Merged Lpeg branch 2014-06-26 20:12:54 +00:00
dmiller
17c3e9755e NSEdoc cleanup.
1. The first paragraph of a function's NSEdoc is used as a short
summary. Some of these were very long, so I split off a shorter summary.

2. Use asterisks (*) to denote bulletted lists, not 'o'

3. Wrap lines at 80 columns

4. a couple other spelling and formatting fixes
2014-03-10 19:01:19 +00:00
dmiller
44a006a7cf Let json.lua use unicode.lua for utf8_enc 2014-02-19 17:08:31 +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
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
ceaa65a0f4 Move last remnants of Lua 5.0 "arg' table. 2012-06-06 22:08:01 +00:00
patrik
721ac80024 reverted previous commit, due to unfinnished changes in smb, asn1 and smbauth
libraries.
2012-06-06 22:04:28 +00:00
patrik
c4617f8d31 Fixed a bunch of errors reported by Ron Bowes;
http://seclists.org/nmap-dev/2012/q2/639
2012-06-06 21:57:00 +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
patrik
5c43a48121 applied patch to json library from Daniel Miller adding the functions
make_array and make_object:
http://seclists.org/nmap-dev/2011/q3/15

These functions add support for treating Lua tables as JSON arrays or objects.
2011-07-09 19:49:05 +00:00
gorjan
c16b036f4f Small NSEDoc fix for nselib/json.lua 2011-05-21 07:24:11 +00:00
david
4d1b301f43 Enable NSEDoc for json.generate; this should be a public function. 2011-04-02 16:28:14 +00:00
david
7d0c08a097 Brief copyediting of NSEDoc for modules. 2010-07-12 19:42:43 +00:00
david
5fa554266b Fix NSEDoc. 2010-03-31 20:28:14 +00:00
david
b3edd3d4c0 Make json.lua string escaping/unescaping a little nicer. Derive both
forward and reverse escapes from a single table.
2010-02-28 22:05:04 +00:00
david
15915eb793 Make Json:parseValue handle any kind of value, without taking a
parameter to control whether only top-level structures are allowed.
Instead, move the special top-level code out to the Json:parseStart
function.
2010-02-28 21:31:55 +00:00
david
dfe10a6866 Remove the call to test() at the end of json.lua, otherwise the test
gets run (and output printed) whenever the module is loaded.
2010-02-28 21:26:22 +00:00
david
e89094261d Add json.lua, couchdb-databases.nse, and couchdb-stats.nse, all by
Martin Holst Swende.
2010-02-28 21:25:01 +00:00