mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Provide a new nsock_setup_udp function to create a UDP socket without connecting it. Provide an NSE interface to the function. Add broadcast.nse, a script that receives UDP broadcasts with an unconnected socket.
This commit is contained in:
parent
df99409651
commit
87ee8343f3
2 changed files with 52 additions and 0 deletions
15
scripts/broadcast.nse
Normal file
15
scripts/broadcast.nse
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
description = ""
|
||||
categories = {}
|
||||
|
||||
prerule = function() return true end
|
||||
|
||||
action = function()
|
||||
local s, status, data
|
||||
|
||||
s = nmap.new_socket()
|
||||
s:bind("255.255.255.255", 67)
|
||||
s:setup("ipv4", "udp")
|
||||
status, data = s:receive()
|
||||
|
||||
return data
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue