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.
1. All @table blocks must have an explicit @name
2. All @field blocks must have both a name and description
Also added some more information to the creds.States table description
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)
attributename:ruleOID:=value
for example the following finds AD Domain controllers:
(userAccountControl:1.2.840.113556.1.4.803:=8192)
Also added the above as a quickfilter (ad_dcs) to ldap-search.nse to serve as a code example.
Added documentation to explain the values used in some field.
Added a new quick filter (qfilter) to ldap-search.nse that allows the user to specify, on the command line, an attribute and corresponding value to search the LDAP directory for. The use of the asterisk '*' as a wildcard is permitted in the value parameter.
Updated asn1.lua with some minor notes on a hex value that was used.
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)).