mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
35 lines
653 B
Lua
35 lines
653 B
Lua
id = "IRC zombie"
|
|
|
|
description = "If port 113 responds before we ask it then something is fishy.\
|
|
Usually this means that the host is an irc zombie."
|
|
|
|
author = "Diman Todorov <diman.todorov@gmail.com>"
|
|
|
|
license = "Same as Nmap--See http://nmap.org/man/man-legal.html"
|
|
|
|
categories = {"malware"}
|
|
|
|
require "shortport"
|
|
|
|
portrule = shortport.port_or_service(113, "auth")
|
|
|
|
action = function(host, port)
|
|
local status = 0
|
|
local owner = ""
|
|
|
|
local client_ident = nmap.new_socket()
|
|
|
|
client_ident:connect(host.ip, port.number)
|
|
|
|
status, owner = client_ident:receive_lines(1)
|
|
|
|
client_ident:close()
|
|
|
|
if owner == "TIMEOUT" then
|
|
return
|
|
end
|
|
|
|
return owner
|
|
end
|
|
|