mirror of
https://github.com/nmap/nmap.git
synced 2026-01-01 12:29:03 +00:00
Let daytime.nse run against both TCP and UDP port 13. It only did UDP before.
RFC 867 says the service runs over both protocols.
This commit is contained in:
@@ -11,10 +11,10 @@ categories = {"discovery"}
|
||||
require "comm"
|
||||
require "shortport"
|
||||
|
||||
portrule = shortport.port_or_service(13, "daytime", "udp")
|
||||
portrule = shortport.port_or_service(13, "daytime", {"tcp", "udp"})
|
||||
|
||||
action = function(host, port)
|
||||
local status, result = comm.exchange(host, port, "dummy", {lines=1, proto="udp"})
|
||||
local status, result = comm.exchange(host, port, "dummy", {lines=1, proto=port.proto})
|
||||
|
||||
if status then
|
||||
return "Daytime: " .. result
|
||||
|
||||
Reference in New Issue
Block a user