HID Tablet
7 ˆl–Ðz¾”ŠeJeAà™¸ËêbÑ¿�þZeæÖnQ8ëq‘â¼@?Ï
„¢y¿ÌÊÉ ?÷ local match = require "match"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local table = require "table"
local xmpp = require "xmpp"
description = [[
Connects to XMPP server (port 5222) and collects server information such as:
supported auth mechanisms, compression methods, whether TLS is supported
and mandatory, stream management, language, support of In-Band registration,
server capabilities. If possible, studies server vendor.
]]
---
-- @output
-- PORT STATE SERVICE REASON VERSION
-- 5222/tcp open jabber syn-ack ejabberd (Protocol 1.0)
-- | xmpp-info:
-- | Respects server name
-- | info:
-- | xmpp:
-- | lang: en
-- | version: 1.0
-- | capabilities:
-- | node: http://www.process-one.net/en/ejabberd/
-- | ver: TQ2JFyRoSa70h2G1bpgjzuXb2sU=
-- | features:
-- | In-Band Registration
-- | auth_mechanisms:
-- | DIGEST-MD5
-- | SCRAM-SHA-1
-- | PLAIN
-- | pre_tls:
-- | features:
-- |_ TLS
--@xmloutput
-- Respects server name
--
--
--
-- http://www.process-one.net/en/ejabberd/
-- TQ2JFyRoSa70h2G1bpgjzuXb2sU=
--
--
-- In-Band Registration
--
--
-- DIGEST-MD5
-- SCRAM-SHA-1
-- PLAIN
--
--
--
--
-- @args xmpp-info.server_name If set, overwrites hello name sent to the server.
-- It can be necessary if XMPP server's name differs from DNS name.
-- @args xmpp-info.alt_server_name If set, overwrites alternative hello name sent to the server.
-- This name should differ from the real DNS name. It is used to find out whether
-- the server refuses to talk if a wrong name is used. Default is ".".
-- @args xmpp-info.no_starttls If set, disables TLS processing.
author = "Vasiliy Kulikov"
license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
categories = {"default", "safe", "discovery", "version"}
local known_features = {
['starttls'] = true,
['compression'] = true,
['mechanisms'] = true,
['register'] = true,
['dialback'] = true,
['session'] = true,
['auth'] = true,
['bind'] = true,
['c'] = true,
['sm'] = true,
['amp'] = true,
['ver'] = true
}
local check_citadel = function(id1, id2)
stdnse.debug1("CHECK")
local i1 = tonumber(id1, 16)
local i2 = tonumber(id2, 16)
return i2 - i1 < 20 and i2 > i1
end
-- Be careful while adding fingerprints into the table - it must be well sorted
-- as some fingerprints are actually supersetted by another...
local id_database = {
{
--f3af7012-5d06-41dc-b886-42521de4e198
--''
regexp1 = '^' .. string.rep('[0-9a-f]', 8) .. '[-]' ..
string.rep('[0-9a-f]', 4) .. '[-]' ..
string.rep('[0-9a-f]', 4) .. '[-]' ..
string.rep('[0-9a-f]', 4) .. '[-]' ..
string.rep('[0-9a-f]', 12) .. '$',
regexp2 = '^$',
name = 'prosody'
},
{
regexp1 = '^' .. string.rep('[0-9a-f]', 8) .. '$',
regexp2 = '^' .. string.rep('[0-9a-f]', 8) .. '$',
name = 'Citadel',
check = check_citadel
},
{
--1082952309
--(no)
regexp1 = '^' .. string.rep('[0-9]', 9) .. '$',
regexp2 = nil,
name = 'jabberd'
},
{
--1082952309
--(no)
regexp1 = '^' .. string.rep('[0-9]', 10) .. '$',
regexp2 = nil,
name = 'jabberd'
},
{
--8npnkiriy7ga6bak1bdpzn816tutka5sxvfhe70c
--egnlry6t9ji87r9dk475ecxc8dtmkuyzalk2jrvt
regexp1 = '^' .. string.rep('[0-9a-z]', 40) .. '$',
regexp2 = '^' .. string.rep('[0-9a-z]', 40) .. '$',
name = 'jabberd2'
},
{