nnposter
2646596f0f
Resolves ether_type incompatibility in packet.Frame
...
Frame:new() was populating the value as a 16-bit integer while
Frame:build_ether_frame() was expectng a two-byte string
Ethertype constants from various locations have been migrated to packet.lua
2024-08-25 17:43:17 +00:00
dmiller
453f9a7e25
Use stdnse.get_script_interfaces() for all relevant scripts
2024-05-24 19:01:16 +00:00
nnposter
7d1c26968c
Use promiscuous mode in broadcast-dhcp-discover. Closes #2470
2022-06-08 23:10:28 +00:00
nnposter
f0e85baf85
Add support for DHCP client identifier
...
see https://datatracker.ietf.org/doc/html/rfc2132#section-9.14
Closes #2468
2022-06-08 22:59:30 +00:00
nnposter
35b543b291
Use the same endianness for IP ID and DHCP transaction ID
2022-04-24 02:07:22 +00:00
nnposter
e73041f34b
Optimize BPF to capture only DHCP responses
2022-04-24 01:22:54 +00:00
nnposter
81088425f3
Remove unused variables
2022-04-24 01:17:46 +00:00
dmiller
0af0b822a1
Send DHCP requests on all interfaces, not only the lowest-metric one
2022-01-13 22:30:21 +00:00
nnposter
15e529c64f
Clarify default script behavior
2020-12-04 01:16:08 +00:00
dmiller
f15fc6bb78
Allow broadcast-dhcp-discover to receive more than 1 response. Fixes #1908
2020-02-05 18:32:14 +00:00
dmiller
8df11582e6
Move comma-separated list code to outlib
2020-01-19 16:37:36 +00:00
nnposter
c4ecf225dd
Add script argument to force specific MAC address. See #1838
2020-01-15 01:20:36 +00:00
dmiller
26ef852a28
Move stdnse.generate_random_string to new rand.lua
2018-09-08 17:07:06 +00:00
dmiller
7c72319ab5
Change a few more bin.pack to string.pack
2017-03-24 22:05:52 +00:00
dmiller
f89d7610b0
Replace IP address parsing with functions from ipOps
2017-03-14 18:59:12 +00:00
dmiller
e373419855
Add a few NSE cross-references
2017-02-09 22:59:52 +00:00
dmiller
4da5cfebc7
Avoid blank output from broadcast-dhcp-discover
2016-02-11 23:50:48 +00:00
dmiller
f4619edece
Update http urls for nmap.org to https
2015-11-05 20:41:05 +00:00
dmiller
7852fa3c18
Remove many ERROR outputs from non-debug NSE output
2015-08-27 20:43:55 +00:00
dmiller
5c11f46bf0
Update dhcp-discover and broadcast-dhcp-discover to XML output
2014-09-05 02:54:40 +00:00
dmiller
40f36a4e3e
Some string optimizations in NSE
...
Changes fall into these categories:
1. Avoid pathological string building. Loops over x = x .. "foo" can
become very slow. Instead, use strbuf.lua, table.concat, or just one
continuous concatenation; a = x .. y .. z is one operation, better than
a = x .. y; a = a .. z
2. Use hex-escaped strings instead of string.char. I find this more
readable in many cases, and it avoids a table lookup and function call.
3. Don't duplicate code. A few libraries and scripts had re-implemented
stdnse.generate_random_string or openssl.rand_bytes.
2014-09-03 04:49:54 +00:00
batrick
a19c9eb461
stdnse.print_verbose -> stdnse.verbose1
...
$ sed -i 's/stdnse.print_verbose( *\([0-9]*\) *, *" *%s *:* *\([^"]*\)" *, *SCRIPT_NAME/stdnse.verbose\1("\2"/' *.nse
$ sed -i 's/stdnse.print_verbose( *" *%s *:* *\([^"]*\)" *, *SCRIPT_NAME/stdnse.verbose1("\1"/' *.nse
and some manual corrections.
2014-08-02 18:32:26 +00:00
batrick
2a8c81c4f6
stdnse.print_debug -> stdnse.debug1
...
$ sed -i 's/stdnse.print_debug("%s \([^"]*\)", SCRIPT_NAME/stdnse.debug1("\1"/' *.nse
2014-08-01 21:35:56 +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
d309fecd12
Re-indent some more scripts. Whitespace-only commit
...
https://secwiki.org/w/Nmap/Code_Standards
2014-02-02 15:33:29 +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
fdb0f775e2
Update timeout script-args to use standard timespec
...
Many scripts were documented as using timespecs (10s, 5000ms, etc) for
timeout script-args, but one 1 or 2 actually did. Now all timeout
script-args will accept timespecs, except those which took a number of
milliseconds, which remain unchanged.
Also fixed some documentation issues (missing script name in arg
description, missing nsedoc for args, etc)
2013-03-05 21:34:25 +00:00
patrik
448bb5a71b
fixed a bug in a loop where the script would wait for a condition that was
...
supposed to be signalled by other threads which were no longer running.
2012-08-29 05:37:56 +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
henri
9ff8043d92
Added privilege checks to the prerules to prevent scripts from failing at
...
action() time when executed unprivileged.
Removed the check which was performed by broadcast-dhcp-discover.nse in its
action() function, so that users can force execution if desired.
2012-01-13 14:23:55 +00:00
david
2532c413b5
o [NSE] Fixed a race condition in broadcast-dhcp-discover.nse that
...
could cause responses to be missed on fast networks. It was noticed
by Vasiliy Kulikov. [David]
2012-01-10 03:25:19 +00:00
patrik
01da8be17a
Updated the broadcast-dhcp-discover script to work with the changes in the
...
dhcp library [Patrik]
2011-12-29 08:59:19 +00:00
patrik
9b2fcfe0b1
Fixed undeclared local variable in broadcast-dhcp-discover [Patrik]
2011-12-28 17:02:10 +00:00
patrik
cbf959aecc
o [NSE] Added the script broadcast-dhcp-discover that sends a DHCP discover
...
message to the broadcast address and collects and reports the network
information received from the DHCP server. [Patrik]
2011-07-21 11:56:15 +00:00