mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 14:11:29 +00:00
make them look better in output. The full list of changes is anonFTP => ftp-anon ASN => asn-query brutePOP3 => pop3-brute bruteTelnet => telnet-brute daytimeTest => daytime dns-safe-recursion-port => dns-random-srcport dns-safe-recursion-txid => dns-random-txid dns-test-open-recursion => dns-recursion ftpbounce => ftp-bounce HTTPAuth => http-auth HTTP_open_proxy => http-open-proxy HTTPpasswd => http-passwd HTTPtrace => http-trace iax2Detect => iax2-version ircServerInfo => irc-info ircZombieTest => irc-zombie MSSQLm => ms-sql-info MySQLinfo => mysql-info popcapa => pop3-capabilities PPTPversion => pptp-version promiscuous => sniffer-detect RealVNC_auth_bypass => realvnc-auth-bypass robots => robots.txt showHTMLTitle => html-title showOwner => identd-owners skype_v2-version => skypev2-version smb-enumdomains => smb-enum-domains smb-enumsessions => smb-enum-sessions smb-enumshares => smb-enum-shares smb-enumusers => smb-enum-users smb-serverstats => smb-server-stats smb-systeminfo => smb-system-info SMTPcommands => smtp-commands SMTP_openrelay_test => smtp-open-relay SNMPcommunitybrute => snmp-brute SNMPsysdescr => snmp-sysdescr SQLInject => sql-injection SSH-hostkey => ssh-hostkey SSHv1-support => sshv1 SSLv2-support => sslv2 strangeSMTPport => smtp-strangeport UPnP-info => upnp-info xamppDefaultPass => xampp-default-auth zoneTrans => zone-transfer
58 lines
1.2 KiB
Lua
58 lines
1.2 KiB
Lua
description = [[
|
|
Detects the Skype version 2 service.
|
|
]]
|
|
author = "Brandon Enright <bmenrigh@ucsd.edu>"
|
|
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
|
categories = {"version"}
|
|
|
|
require "comm"
|
|
|
|
portrule = function(host, port)
|
|
if (port.number == 80 or
|
|
port.number == 443 or
|
|
port.service == nil or
|
|
port.service == "" or
|
|
port.service == "unknown")
|
|
and port.protocol == "tcp"
|
|
and port.state == "open"
|
|
and port.service ~= "http"
|
|
and port.service ~= "ssl/http"
|
|
then
|
|
return true
|
|
else
|
|
return false
|
|
end
|
|
end
|
|
|
|
action = function(host, port)
|
|
local status, result = comm.exchange(host, port,
|
|
"GET / HTTP/1.0\r\n\r\n", {bytes=26, proto=port.protocol})
|
|
|
|
if (not status) then
|
|
return
|
|
end
|
|
|
|
if (result ~= "HTTP/1.0 404 Not Found\r\n\r\n") then
|
|
return
|
|
end
|
|
|
|
-- So far so good, now see if we get random data for another request
|
|
|
|
status, result = comm.exchange(host, port,
|
|
"random data\r\n\r\n", {bytes=15, proto=port.protocol})
|
|
|
|
if (not status) then
|
|
return
|
|
end
|
|
|
|
if string.match(result, "[^%s!-~].*[^%s!-~].*[^%s!-~]") then
|
|
-- Detected
|
|
port.version.name = "skype2"
|
|
port.version.product = "Skype"
|
|
nmap.set_port_version(host, port, "hardmatched")
|
|
return
|
|
end
|
|
|
|
return
|
|
end
|