dmiller
edb130e908
Replace some print calls with proper debug functions. See #1774
2019-10-07 03:13:09 +00:00
dmiller
2f7f6c7b6a
Remove unused requires
2019-06-27 19:13:41 +00:00
dmiller
e0af0179eb
Remove use of bit library from all NSE libs
2018-08-28 15:21:53 +00:00
dmiller
f4619edece
Update http urls for nmap.org to https
2015-11-05 20:41:05 +00:00
dmiller
0e74dd7a35
Replace some string.char and bin.pack calls with literals
2015-02-27 19:42:56 +00:00
dmiller
204d37e4d7
Replace packet.toip* and ip*tobin with ipOps.ip_to_str and str_to_ip
2015-02-27 19:42:46 +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
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
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
kroosec
f73e6665a1
Renamed Packet:ip6_set_len into Packet:ip6_set_plen for consistency.
2012-06-15 16:09:16 +00:00
kroosec
6f29a6a1d4
Fixed a bug in packet.lua library that caused tcp_data_length to have an incorrect size in IPv6 packets due to IPv4 packet length and IPv6 payload length fields being used the same way to calculate tcp_data_length.
2012-06-15 16:08:00 +00:00
kroosec
08e2f98ebe
Added Packet:ip6_set_len(plen) function to set IPv6 payload length field.
2012-06-15 15:13:20 +00:00
kroosec
6ea3969357
Added Packet:ip_set_id(id).
2012-06-06 08:52:13 +00:00
kroosec
e47d988e44
Small typo in Packet:build_ip_packet documentation.
2012-06-01 10:46:27 +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
ab33bede2c
Added ICMP echo request support to the packet library.
2012-04-22 18:42:41 +00:00
patrik
134d55890c
Added the MLDV2_LISTENER_REPORT constant
2012-04-09 09:53:56 +00:00
henri
1f431b953f
Consistent naming of the address fields between IPv4 and IPv6.
...
All IP packet objects now have the following attributes:
- ip_bin_src (binary src address)
- ip_bin_dst (binary dst address)
- ip_src (decimal-dotted string src address)
- ip_dst (decimal-dotted string dst address)
The ip6_src and ip6_dst attributes have therefore been renamed (ip_bin_src and
ip_bin_dst).
This patch also updates the scripts accordingly.
2012-01-21 14:46:00 +00:00
patrik
bf7a46fc0d
Added support for decoding the ether_type to Frame:ether_parse in the packet
...
library. [Patrik]
2012-01-10 06:59:45 +00:00
henri
ed2fc828ac
Added IPv6 support to firewalk.nse.
2012-01-08 15:13:35 +00:00
henri
27aec6396d
Indentation fix
2012-01-02 22:13:50 +00:00
henri
77465c37df
Proper method call with ":" instead of "."
...
This fixes broadcast-listener.nse failure:
/home/henri/nmap/nselib/packet.lua:521: attempt to index local 'self' (a number value)
2011-11-18 15:42:09 +00:00
david
ef5dfd8479
Compress strings of zeros in packet.toipv6.
...
I do this just by passing the uncompressed names through nmap.resolve.
Before:
fe80:0000:0000:0000:0000:0000:0000:0001, 2001:0470:1f05:155e:0000:0000:0000:0003
After:
fe80::1, 2001:470:1f05:155e::3
2011-10-29 19:40:19 +00:00
david
622e2e08a7
Standardize on ip6_nhdr in packet.lua.
...
Some places were using ip6_nxt_hdr and some were using ip6_nhdr.
ip6_nhdr seemed to be the prevailing usage.
2011-10-29 19:40:14 +00:00
david
2c45aa3b8a
Add Weilin's patch to packet.lua to handle IPv6.
2011-09-02 04:10:59 +00:00
weilin
586b8464b2
Reverted the unintended changes on nselib/packet.lua@25009.
2011-07-21 02:32:47 +00:00
weilin
1dcf652410
Added ND ping for local IPv6 nets, merging from /nmap-exp/weilin/nmap-nd.
2011-07-19 02:31:54 +00:00
gorjan
70b09c9598
Small fix: missed an 'end'
2011-07-13 09:34:19 +00:00
gorjan
c08ca750fa
Added default values for the index and length parameters if no value is supplied in the Packet:raw(index,length) function of the nselib/packet.lua library
2011-07-13 09:27:54 +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
batrick
6fb600782f
Don't use io.write to print error information.
2010-12-08 14:08:35 +00:00
david
7d0c08a097
Brief copyediting of NSEDoc for modules.
2010-07-12 19:42:43 +00:00
jah
4554312eb6
Added UDP header support.
2010-04-10 00:16:32 +00:00
kris
d1e4ae6dc7
Set header variables like ip_ttl when calling ip_set_ttl() rather than just
...
setting the packet data. This was confusing watching packets go correctly
over the wire but having incorrect variables.
2010-01-24 20:16:40 +00:00
david
bef983abdd
Make packet.in_cksum more efficient by not making lots of substring
...
copies.
2009-10-29 00:28:29 +00:00
david
9817ee470d
Make packet.in_cksum work for data with an odd length.
2009-10-29 00:15:04 +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
batrick
3eba69f9f8
Removed packet.hextobin and packet.bintohex. Both are unnecessary
...
with the struct (bin) library available:
function hextobin(str) return bin.pack("H", str) end
function bintohex(str) return bin.unpack("H", str) end
Also removed a commented copy that was in the sniffer-detect.nse script.
2009-05-28 03:59:02 +00:00
batrick
b32881993a
[NSE] Significantly shortend hextobin function for packet module.
2009-05-06 08:32:59 +00:00
david
d0e545b49c
Proofread and update documentation of nmap, openssl, packet, and pcre.
2008-10-24 19:08:27 +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
a31f0890d5
Document the packet NSE module.
2008-10-15 23:09:51 +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
majek04
4ed4ffa219
Added promiscuous.nse for detecting local NIC in promisc mode. First script using pcap for nse.
2007-11-27 18:59:53 +00:00