1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 12:41:29 +00:00

Change some of the output of sniffer-detect.nse and add an @output section.

This commit is contained in:
david
2008-11-06 03:49:39 +00:00
parent 1ff973e495
commit a44a66c68a

View File

@@ -4,6 +4,12 @@ Checks if a target on a local Ethernet has its network card in promiscuous mode.
The technique is described at The technique is described at
http://www.securityfriday.com/promiscuous_detection_01.pdf. http://www.securityfriday.com/promiscuous_detection_01.pdf.
]] ]]
---
-- @output
-- Host script results:
-- |_ sniffer-detect: Likely in promiscuous mode (tests: "11111111")
author = "Marek Majkowski <majek04+nse@gmail.com>" author = "Marek Majkowski <majek04+nse@gmail.com>"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html" license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
@@ -114,7 +120,7 @@ action = function(host, port)
pcap:pcap_close() pcap:pcap_close()
if out == '1_1___1_' then if out == '1_1___1_' then
return 'Win98/Win2K/WinXP with pcap installed. I\'m unsure if they\'re sniffing. (tests: "' .. out .. '")' return 'Windows with libpcap installed; may or may not be sniffing (tests: "' .. out .. '")'
end end
if results[out] == false then if results[out] == false then
-- probably not sniffing -- probably not sniffing
@@ -122,7 +128,7 @@ action = function(host, port)
end end
if results[out] == true then if results[out] == true then
-- rather sniffer. -- rather sniffer.
return 'PROMISCUOUS (tests: "' .. out .. '")' return 'Likely in promiscuous mode (tests: "' .. out .. '")'
end end
-- results[out] == nil -- results[out] == nil