mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Played a round of nse_check_globals and fixed a bunch of reported problems.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
local bin = require "bin"
|
||||
local packet = require "packet"
|
||||
local stdnse = require "stdnse"
|
||||
local tab = require "tab"
|
||||
local target = require "target"
|
||||
|
||||
local bin = require "bin"
|
||||
local packet = require "packet"
|
||||
local stdnse = require "stdnse"
|
||||
local tab = require "tab"
|
||||
local target = require "target"
|
||||
|
||||
--- The following file contains a list of decoders used by the
|
||||
-- broadcast-listener script. A decoder can be either "ethernet" based or IP
|
||||
-- based. As we're only monitoring broadcast traffic (ie. traffic not
|
||||
@@ -238,7 +238,7 @@ Decoders = {
|
||||
elseif ( route_type == 259 ) then
|
||||
-- external route, from a different routing protocol
|
||||
pos, size, nexthop = bin.unpack(">Si", data, pos)
|
||||
local orig_rtr_oct1, orig_rtr_oct2, orig_rtr_oct3, orig_rtr_oct4
|
||||
local orig_rtr_oct1, orig_rtr_oct2, orig_rtr_oct3, orig_rtr_oct4, ext_proto_id, ext_metric
|
||||
pos, orig_rtr_oct1, orig_rtr_oct2, orig_rtr_oct3, orig_rtr_oct4 = bin.unpack(">CCCC", data, pos)
|
||||
orig_router = orig_rtr_oct1 .. '.' .. orig_rtr_oct2 .. '.' .. orig_rtr_oct3 .. '.' .. orig_rtr_oct4
|
||||
pos, orig_as, arbtag, ext_metric = bin.unpack(">iii", data, pos)
|
||||
@@ -687,4 +687,4 @@ Decoders = {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ local coroutine = require "coroutine"
|
||||
local http = require "http"
|
||||
local nmap = require "nmap"
|
||||
local stdnse = require "stdnse"
|
||||
local string = require "string"
|
||||
local table = require "table"
|
||||
local url = require "url"
|
||||
_ENV = stdnse.module("httpspider", stdnse.seeall)
|
||||
|
||||
@@ -814,7 +814,7 @@ end
|
||||
-- data are undefined.
|
||||
function smb_read(smb, read_data)
|
||||
local status
|
||||
local pos, netbios_length, length, header, parameter_length, parameters, data_length, data
|
||||
local pos, netbios_data, netbios_length, length, header, parameter_length, parameters, data_length, data
|
||||
local attempts = 5
|
||||
|
||||
stdnse.print_debug(3, "SMB: Receiving SMB packet")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
local bin = require "bin"
|
||||
local bit = require "bit"
|
||||
local dns = require "dns"
|
||||
local ipOps = require "ipOps"
|
||||
@@ -299,13 +300,13 @@ local RD = {
|
||||
offset = offset + 4
|
||||
offset, lat, lon, alt = bin.unpack(">III", data, offset)
|
||||
lat = (lat-2^31)/3600000 --degrees
|
||||
latd = 'N'
|
||||
local latd = 'N'
|
||||
if lat < 0 then
|
||||
latd = 'S'
|
||||
lat = 0-lat
|
||||
end
|
||||
lon = (lon-2^31)/3600000 --degrees
|
||||
lond = 'E'
|
||||
local lond = 'E'
|
||||
if lon < 0 then
|
||||
lond = 'W'
|
||||
lon = 0-lon
|
||||
@@ -329,6 +330,7 @@ function get_rdata(data, offset, ttype)
|
||||
elseif RD[typetab[ttype]] then
|
||||
return RD[typetab[ttype]](data, offset)
|
||||
else
|
||||
local field
|
||||
offset, field = bin.unpack("A" .. bto16(data, offset-2), data, offset)
|
||||
return offset, ("hex: %s"):format(stdnse.tohex(field))
|
||||
end
|
||||
|
||||
@@ -64,10 +64,10 @@ Default installations of older versions of frontpage extensions allow anonymous
|
||||
|
||||
if data and data.status and data.status == 200 then
|
||||
--server does support frontpage extensions
|
||||
fp_version = string.match(data.body,"FPVersion=\"[%d%.]*\"")
|
||||
local fp_version = string.match(data.body,"FPVersion=\"[%d%.]*\"")
|
||||
if fp_version then
|
||||
-- do post request http://msdn.microsoft.com/en-us/library/ms446353
|
||||
postdata = "method=open+service:".. fp_version .."&service_name=/"
|
||||
local postdata = "method=open+service:".. fp_version .."&service_name=/"
|
||||
data = http.post(host,port,path .. "/_vti_bin/_vti_aut/author.dll",nil,nil,postdata)
|
||||
if data and data.status then
|
||||
if data.status == 200 then
|
||||
|
||||
@@ -2,6 +2,7 @@ local http = require "http"
|
||||
local stdnse = require "stdnse"
|
||||
local shortport = require "shortport"
|
||||
local string = require "string"
|
||||
local table = require "table"
|
||||
local url = require "url"
|
||||
|
||||
description = [[
|
||||
|
||||
@@ -67,6 +67,7 @@ local mysql = require "mysql"
|
||||
local nmap = require "nmap"
|
||||
local shortport = require "shortport"
|
||||
local stdnse = require "stdnse"
|
||||
local string = require "string"
|
||||
local table = require "table"
|
||||
local vulns = require "vulns"
|
||||
local openssl = stdnse.silent_require "openssl"
|
||||
|
||||
Reference in New Issue
Block a user