| 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 bin = require "bin"
local ipOps = require "ipOps"
local srvloc = require "srvloc"
local stdnse = require "stdnse"
local table = require "table"
description = [[
Attempts to use the Service Location Protocol to discover Novell NetWare Core Protocol (NCP) servers.
]]
---
--
--@output
-- Pre-scan script results:
-- | broadcast-novell-locate:
-- | Tree name: CQURE-LABTREE
-- | Server name: linux-l84t
-- | Addresses
-- |_ 192.168.56.33
--
--
-- Version 0.1
-- Created 04/26/2011 - v0.1 - created by Patrik Karlsson
author = "Patrik Karlsson"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"broadcast", "safe"}
prerule = function() return true end
function action()
local helper = srvloc.Helper:new()
local status, bindery = helper:ServiceRequest("bindery.novell", "DEFAULT")
if ( not(status) or not(bindery) ) then
helper:close()
return
end
bindery = bindery[1]
local srvname = bindery:match("%/%/%/(.*)$")
local status, attrib = helper:AttributeRequest(bindery, "DEFAULT", "svcaddr-ws")
helper:close()
attrib = attrib:match("^%(svcaddr%-ws=(.*)%)$")
if ( not(attrib) ) then return end
local attribs = stdnse.strsplit(",", attrib)
if ( not(attribs) ) then return end
local addrs = { name = "Addresses"}
local ips = {}
for _, attr in ipairs(attribs) do
local addr = attr:match("^%d*%-%d*%-%d*%-(........)")
if ( addr ) then
local pos, dw_addr = bin.unpack( "<I", bin.pack("H", addr) )
local ip = ipOps.fromdword(dw_addr)
if ( not(ips[ip]) ) then
table.insert(addrs, ip)
ips[ip] = ip
end
end
end
local output = {}
local status, treename = helper:ServiceRequest("ndap.novell", "DEFAULT")
if ( status ) then
treename = treename[1]
treename = treename:match("%/%/%/(.*)%.$")
table.insert(output, ("Tree name: %s"):format(treename))
end
table.insert(output, ("Server name: %s"):format(srvname))
table.insert(output, addrs)
return stdnse.format_output(true, output)
end