1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 08:29:04 +00:00

Updating the lltd-discovery with suggested patches and added to the broadcast category

This commit is contained in:
gorjan
2011-10-03 21:06:04 +00:00
parent 362857db19
commit 1afd9691b0

View File

@@ -20,7 +20,7 @@ http://www.microsoft.com/whdc/connect/Rally/LLTD-spec.mspx
author = "Gorjan Petrovski"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"discovery","safe"}
categories = {"broadcast","discovery","safe"}
require "bin"
require "stdnse"
@@ -28,8 +28,6 @@ require "target"
require "nmap"
require "openssl"
require "nsedebug"
prerule = function()
if not nmap.is_privileged() then
nmap.registry[SCRIPT_NAME] = nmap.registry[SCRIPT_NAME] or {}
@@ -189,11 +187,11 @@ local LLTDDiscover = function(if_table, lltd_responders, timeout)
while true do
local status, plen, l2, l3, _ = pcap:pcap_receive()
local packet = l2..l3
if status then
if status then
local packet = l2..l3
if stdnse.tohex(packet:sub(13,14)) == "88d9" then
start_s = os.time()
local packet=l2..l3
local ipv4, mac, ipv6 = parseHello(packet)
if ipv4 then