403Webshell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/nmap/scripts/isns-info.nse
local stdnse    = require "stdnse"
local shortport = require "shortport"
local isns      = require "isns"
local tab       = require "tab"
local table     = require "table"

description = [[
Lists portals and iSCSI nodes registered with the Internet Storage Name
Service (iSNS).
]]

---
-- @usage
-- nmap -p 3205 <ip> --script isns-info
--
-- @output
-- PORT     STATE SERVICE
-- 3205/tcp open  unknown
-- | isns-info: 
-- |   Portal
-- |     ip             port
-- |     192.168.0.1    3260/tcp
-- |     192.168.0.2    3260/tcp
-- |   iSCSI Nodes
-- |     node                                              type
-- |     iqn.2001-04.com.example:storage.disk2.sys1.xyz    Target
-- |     iqn.2001-05.com.example:storage.disk2.sys1.xyz    Target
-- |_    iqn.2001-04.a.com.example:storage.disk3.sys2.abc  Target
--

portrule = shortport.port_or_service(3205, 'isns')

author = "Patrik Karlsson"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"safe", "discovery"}

local function fail(err) return ("\n  ERROR: %s"):format(err or "") end

action = function(host, port)
	local helper = isns.Helper:new(host, port)
	if ( not(helper:connect()) ) then
		return fail("Failed to connect to server")
	end
	
	local status, portals = helper:listPortals()
	if ( not(status) ) then
		return
	end	

	local results = {}
	local restab = tab.new(2)
	tab.addrow(restab, "ip", "port")
	for _, portal in ipairs(portals) do
		tab.addrow(restab, portal.addr, ("%d/%s"):format(portal.port, portal.proto))
	end
	table.insert(results, { name = "Portal", tab.dump(restab) })	
	
	local status, nodes = helper:listISCINodes()
	if ( not(status) ) then
		return
	end	

	restab = tab.new(2)
	tab.addrow(restab, "node", "type")
	for _, portal in ipairs(nodes) do
		tab.addrow(restab, portal.name, portal.type)
	end
	table.insert(results, { name = "iSCSI Nodes", tab.dump(restab) })	

	return stdnse.format_output(true, results)
end

Youez - 2016 - github.com/yon3zu
LinuXploit