1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00
Commit Graph

46 Commits

Author SHA1 Message Date
dmiller
84a824c2cf New script broadcast-ospf2-discover. Closes #743 2017-03-14 00:15:22 +00:00
dmiller
090b522c06 new tests for ipOps.fromdword and todword 2017-03-13 14:58:55 +00:00
dmiller
001318408c Localize string.(un)pack functions for a little performance boost in ipOps which uses them heavily 2017-03-09 05:13:45 +00:00
dmiller
a2e22523a4 Use string packing instead of bitwise operators in ipOps.lua 2017-03-09 05:13:45 +00:00
dmiller
4a5ff0472a Convert ipOps from bin.lua to string.pack. Improved efficiency and added tests 2017-03-07 21:24:30 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
9d5c8962dd Fix error message in ipOps.fromdword 2015-02-27 14:55:25 +00:00
dmiller
d9cf8adf04 New ipOps.str_to_ip function 2014-12-18 00:22:46 +00:00
dmiller
b1c8c3f224 Handle the case of half-byte hex string in ipOps.hex_to_bin 2014-12-03 04:15:09 +00:00
dmiller
08709b41dc Replace ipOps.hex_to_bin with a simpler implementation. 2014-12-03 04:15:08 +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
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
88146749f6 Add unittest.testing() to make test building conditional 2014-03-06 17:15:05 +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
dmiller
c5a4ef91fb Add more unittests to ipOps 2014-01-14 23:18:28 +00:00
dmiller
4b34673a0b Add more complete unittests for ipOps.compare_ip 2014-01-11 15:05:43 +00:00
dmiller
d95cbeb2b9 Add some unit tests to ipOps. Far from complete coverage! 2014-01-03 21:10:03 +00:00
david
76264da093 Consider fec0::/10 private.
This is the site-local prefix deprecated by RFC 3879. Suggested by Marek
Majkowski, who noticed that the prefix was included in Tor's
tor_addr_is_internal_ function.
2013-07-03 06:09:35 +00:00
jah
0936515cd9 Restored the hyphen character, in get_ips_from_range, to a lua string pattern for ip ranges such as "10.0.0.0 - 10.1.0.0" 2012-08-21 01:16:49 +00:00
david
aa6717eb1f Lua 5.2 fixed from Daniel Miller.
http://seclists.org/nmap-dev/2012/q2/525
2012-05-29 20:11:39 +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
1d7b0c0d98 o [NSE] Added ipv6 support to the wsdd, dnssd and upnp libraries. Applied
patch from Dan Miller that fixes errors in processing and sorting ipv6
  addresses in scripts using these libraries. [Daniel Miller, Patrik]
2011-06-16 05:29:42 +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
jah
cb0f4a6134 Add some special use IPv4 addresses to isPrivate which are described in RFC 5736
and RFC 5737, published in Jan 2010. Improve performance of isPrivate for IPv4
addresses by using ip_in_range less frequently. Add an extra return value to
isPrivate - when the first return value is true, the second return value will
now be a string representing the special use assignment in which the supplied
address is located.
2010-04-18 18:55:30 +00:00
jah
a9c5d3391c Changed erroneous RFC1918 Private Address assignment from 172.15/12 to 172.15/12. My bad. 2010-04-11 23:38:06 +00:00
ron
9465a839c1 Added dhcp-discover script 2009-09-10 03:26:53 +00:00
batrick
90a712ae2b Patch to libraries that were inappropriately using globals.
Often two (or more) scripts using the same library would
overwrite the globals each was using. This would result
in (at best) an error or (at worst) a deadlock.

The patch changes the global accesses to local.
2009-07-07 00:20:52 +00:00
david
d8c3cf21a5 Add missing module name prefixes to usage examples in some NSE documentation. 2009-02-17 19:53:02 +00:00
bmenrigh
c4bebb3a01 Starting in Lua 5.1, string.gfind was renamed to string.gmatch. This commit fixes a warning when gfind is used by using gmatch instead. 2008-12-17 20:43:57 +00:00
david
5f166e19ec Don't use empty parentheses when referring to functions by name in NSE
documentation.
2008-11-07 22:49:49 +00:00
david
bf635081c3 Proofread and update documentation of http, ipOps, and listop. 2008-10-24 04:59:36 +00:00
david
7e15f259a4 Standardize the @copyright fields of NSE modules; change "See nmaps COPYING for
license" to "Same as Nmap--See http://nmap.org/book/man-legal.html" like
scripts commonly use. I added the field to some modules I know to be under the
Nmap license: bin, datafiles, dns, nmap, unpwdb. I left alone bin, bit, pcre,
and url, which come from outside sources.
2008-10-24 00:44:22 +00:00
david
e487dac7a3 Remove an HTML anchor from nselib/ipOps.lua. 2008-10-21 17:25:08 +00:00
david
12e34eb5b0 Reformat and merge documentation for some NSE modules: comm, datafiles, dns,
http, ipOps, listop, and match. This is mainly merging the best documentation
from the module source and scripting.xml into the module, with the aim of
making the source code the canonical source for module documentation.
2008-10-15 22:03:14 +00:00
fyodor
84bb81d6ee 1-line fix from Jah:
The attached fixes an error in ipOps.ip_to_bin() when a string is passed
to stdnse.tohex().  This should always be (and should always have been)
a number.
2008-10-07 02:17:08 +00:00
david
fdcbd083b3 Add the expanded nselib/ipOps.lua that contains many of the utility functions
used by whois.nse and ASN.nse.
2008-09-06 03:28:12 +00:00
batrick
670792a4a6 Updated all libraries documentation.
packet and url both need more work.
2008-08-18 04:03:45 +00:00
batrick
462c289f4a Fixed all the modules to give a default name if absent.
Also necessary for the documentation system to know the name
of the module.
2008-08-16 04:20:15 +00:00
fyodor
454e4e3b17 I hope this will recover nselib history 2007-11-27 22:50:00 +00:00
fyodor
bbb0744761 now move nselib to recover history 2007-11-27 22:42:39 +00:00
diman
c0f07c99ac adding nselib nselib-bin second (should work on unix now) 2007-11-27 22:18:59 +00:00
diman
335ec2868f adding nselib and nselib-bin the first 2007-11-27 22:17:30 +00:00
kris
9baeec2897 Changing a comment in nselib/ipOps.lua as it seems to be remnants of a patch for ripeQuery.nse (references doing a RIPE lookup) 2007-10-09 13:29:47 +00:00
fyodor
ed6a634ebc merge soc07 r5144 - added a seperate strbuf-module (code mainly taken from eddies implementation in stdnse.lua 2007-08-11 05:45:11 +00:00
fyodor
cafec3593d merge soc07 r4891 - nse improvements 2007-08-11 04:12:45 +00:00