dmiller
cd135ab3e8
Lua 5.4 string.unpack() errors if no null in 'z' format
2023-05-01 17:44:40 +00:00
dmiller
b323270b7d
Fix wrong format specifier
2023-05-01 17:44:39 +00:00
dmiller
fa029ca531
Add BSON handlers for most data types. Fixes #2393
2021-12-07 19:33:40 +00:00
dmiller
07811b8006
Avoid crashing script if bson can't be parsed. See #2393
2021-11-11 16:26:27 +00:00
nnposter
6785355374
Add a comment about suspect code
2019-11-17 03:23:53 +00:00
nnposter
67fe6bb0fb
MongoDB wire protocol is using signed int32. Fixes #1802
...
Unlike the old bin library, Lua string.pack does not support silent conversions:
Negative integers cannot be "I" packed and 0xFFFFFFFF cannot be packed with "i4"
2019-11-17 03:05:30 +00:00
nnposter
71034a0b09
String value in "elements" contains null bytes so "z" packing cannot be used. See #1802
2019-11-13 23:59:55 +00:00
dmiller
e9addd756f
Remove some more bin.lua packings
2018-09-21 18:36:58 +00:00
dmiller
f20589ca09
Use explicit endianness in pack/unpack.
2017-02-14 03:47:49 +00:00
dmiller
3c7fe1e452
Remove some unused functions
2016-09-08 13:31:24 +00:00
dmiller
963011520f
Fix bugs where pos return value of bin.unpack was ignored
2016-07-21 17:05:24 +00:00
dmiller
f4619edece
Update http urls for nmap.org to https
2015-11-05 20:41:05 +00:00
dmiller
7f5a75ce5c
Fix a few NSEdoc issues
2015-11-02 16:02:51 +00:00
dmiller
c1b2429efd
Remove some more creative ways of building a literal byte
2015-03-02 13:47:45 +00:00
dmiller
0e74dd7a35
Replace some string.char and bin.pack calls with literals
2015-02-27 19:42:56 +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
dmiller
ec9074f718
Correct "it's" to "its" where necessary
...
it's = it is
its = belonging to it
2014-06-19 04:58:46 +00:00
dmiller
f4765340a3
Fix local variable shadowing a method. Credit Martin Holst Swende
2014-03-06 23:10:01 +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
a084340b6d
Remove useless calls to string.format
...
stdnse.print_debug accepts a format string and arguments, making
string.format redundant in calls of this form:
stdnse.print_debug(1, string.format("%s: error", SCRIPT_NAME))
stdnse.print_debug(("length %d"):format(#tab))
These can be rewritten as:
stdnse.print_debug(1, "%s: error", SCRIPT_NAME)
stdnse.print_debug("length %d", #tab)
2014-02-13 15:47:41 +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
batrick
ceaa65a0f4
Move last remnants of Lua 5.0 "arg' table.
2012-06-06 22:08:01 +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
1286e5bdd7
there is no stdnse.log_error function
2012-04-04 03:04:09 +00:00
patrik
43253cea53
o [NSE] Added authentication support to MongoDB library and modified existing
...
scripts to support it. Added the script mongodb-brute to perform password
brute force guessing. [Patrik]
2012-03-02 12:28:30 +00:00
patrik
af3734f41f
o [NSE] Fixed a bunch of global access errors in various libraries reported by
...
the nse_check_globals script. [Patrik]
2012-01-30 23:13:35 +00:00
patrik
c5ee5ec365
o [NSE] Applied patch that fixes a nil table index bug discovered in the
...
mongodb library. [Thomas Buchanan]
2011-10-18 20:38:50 +00:00
batrick
4444071f03
use # length operator instead of string.len (canonicalize)
...
Used this perl command:
$ # perl -pi -e 's/string\.len\((.*?)\)/#\1/g' *.lua
Also fixed one instance where the above command didn't correctly
translate the intended code (string.len(a .. b .. c)).
2011-05-11 15:08:55 +00:00
david
7d0c08a097
Brief copyediting of NSEDoc for modules.
2010-07-12 19:42:43 +00:00
batrick
9537366a74
Fixed global access error with fix proposed by Matrin Swende [1].
...
[1] http://seclists.org/nmap-dev/2010/q1/459
2010-04-08 20:40:20 +00:00
batrick
8200787f7a
Fixed wrong variable names that were interpreted as globals.
2010-02-08 02:48:07 +00:00
david
ec1b16f7d7
o [NSE] Added two new scripts for the MongoDB database from Martin
...
Holst Swende. mongodb-info gets information like the version number,
memory use, and operating system. mongodb-databases lists the
databases and their size on disk.
2010-01-29 22:23:06 +00:00