| Server IP : 101.53.144.229 / Your IP : 216.73.216.181 Web Server : Apache System : Linux host.gdigitalindia.in 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : digitalshiksha ( 1179) PHP Version : 5.6.40 Disable Function : eval,show_source,system,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,show_source,curl_multi_exechellcmd, ini_restore,apache_get_modules,get_cfg_var,passthru, exec ,proc_get_status,fpassthru,c999_buff_prepare,c999_sess_put,c99_buff_prepare,c99_sess_put,proc_close,ini_alter,dl,symlink,link,proc_close,ini_alter,dl,symlink,link,mail MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/nmap/scripts/ |
Upload File : |
local amqp = require "amqp"
local nmap = require "nmap"
local shortport = require "shortport"
local stdnse = require "stdnse"
description = [[
Gathers information (a list of all server properties) from an AMQP (advanced message queuing protocol) server.
See http://www.rabbitmq.com/extensions.html for details on the
<code>server-properties</code> field.
]]
---
-- @usage
-- nmap --script amqp-info -p5672 <target>
---
-- @args amqp.version Can be used to specify the client version to use (currently, 0-8, 0-9 or 0-9-1)
--
-- @output
-- 5672/tcp open amqp
-- | amqp-info:
-- | capabilities:
-- | publisher_confirms: YES
-- | exchange_exchange_bindings: YES
-- | basic.nack: YES
-- | consumer_cancel_notify: YES
-- | copyright: Copyright (C) 2007-2011 VMware, Inc.
-- | information: Licensed under the MPL. See http://www.rabbitmq.com/
-- | platform: Erlang/OTP
-- | product: RabbitMQ
-- | version: 2.4.0
-- | mechanisms: PLAIN AMQPLAIN
-- |_ locales: en_US
author = "Sebastian Dragomir"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"default", "discovery", "safe", "version"}
portrule = shortport.port_or_service(5672, "amqp", "tcp", "open")
action = function(host, port)
local cli = amqp.AMQP:new( host.ip, port.number )
local status, data = cli:connect()
if not status then return "Unable to open connection: " .. data end
status, data = cli:handshake()
if not status then return data end
cli:disconnect()
port.version.name = "amqp"
port.version.product = cli:getServerProduct()
port.version.extrainfo = cli:getProtocolVersion()
port.version.version = cli:getServerVersion()
nmap.set_port_version(host, port)
return stdnse.format_output(status, cli:getServerProperties())
end