1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 06:01:28 +00:00

o [NSE] Added the script broadcast-tellstick-discover, which discovers Telldus

Technologies TellStickNet devices on the LAN. [Patrik Karlsson]
This commit is contained in:
patrik
2012-05-07 20:01:25 +00:00
parent d02dafb630
commit bc7f0106a2
3 changed files with 55 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
# Nmap Changelog ($Id$); -*-text-*- # Nmap Changelog ($Id$); -*-text-*-
o [NSE] Added the script broadcast-tellstick-discover, which discovers Telldus
Technologies TellStickNet devices on the LAN. [Patrik Karlsson]
o [NSE] Added the Apache JServer Protocol (AJP) library and the scripts o [NSE] Added the Apache JServer Protocol (AJP) library and the scripts
ajp-methods, ajp-headers and ajp-auth. [Patrik Karlsson] ajp-methods, ajp-headers and ajp-auth. [Patrik Karlsson]

View File

@@ -0,0 +1,51 @@
description=[[
Discovers Telldus Technologies TellStickNet devices on the LAN.
]]
---
-- @usage
-- nmap --script broadcast-tellstick-discover
--
-- @output
-- | broadcast-tellstick-discover:
-- | Product: TellStickNet
-- | MAC: ACCA12345678
-- | Activation code: 8QABCDEFGH
-- |_ Version: 3
--
author = "Patrik Karlsson"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"broadcast", "safe"}
prerule = function() return ( nmap.address_family() == 'inet' ) end
local function fail(err) return ("\n ERROR: %s"):format(err or "") end
action = function()
local socket = nmap.new_socket("udp")
local host, port = { ip = "255.255.255.255" }, { number = 30303, protocol = "udp" }
socket:set_timeout(5000)
if ( not(socket:sendto(host, port, "D")) ) then
return fail("Failed to send discovery request to server")
end
local status, response = socket:receive()
if ( not(status) ) then
return fail("Failed to receive response from server")
end
local prod, mac, activation, version = response:match("^([^:]*):([^:]*):([^:]*):([^:]*)$")
if ( not(prod) or not(mac) or not(activation) or not(version) ) then
return
end
local output = {
("Product: %s"):format(prod),
("MAC: %s"):format(mac),
("Activation code: %s"):format(activation),
("Version: %s"):format(version)
}
return stdnse.format_output(true, output)
end

View File

@@ -38,6 +38,7 @@ Entry { filename = "broadcast-pppoe-discover.nse", categories = { "broadcast", "
Entry { filename = "broadcast-rip-discover.nse", categories = { "broadcast", "safe", } } Entry { filename = "broadcast-rip-discover.nse", categories = { "broadcast", "safe", } }
Entry { filename = "broadcast-ripng-discover.nse", categories = { "broadcast", "safe", } } Entry { filename = "broadcast-ripng-discover.nse", categories = { "broadcast", "safe", } }
Entry { filename = "broadcast-sybase-asa-discover.nse", categories = { "broadcast", "safe", } } Entry { filename = "broadcast-sybase-asa-discover.nse", categories = { "broadcast", "safe", } }
Entry { filename = "broadcast-tellstick-discover.nse", categories = { "broadcast", "safe", } }
Entry { filename = "broadcast-upnp-info.nse", categories = { "broadcast", "safe", } } Entry { filename = "broadcast-upnp-info.nse", categories = { "broadcast", "safe", } }
Entry { filename = "broadcast-versant-locate.nse", categories = { "broadcast", "safe", } } Entry { filename = "broadcast-versant-locate.nse", categories = { "broadcast", "safe", } }
Entry { filename = "broadcast-wake-on-lan.nse", categories = { "broadcast", "safe", } } Entry { filename = "broadcast-wake-on-lan.nse", categories = { "broadcast", "safe", } }