mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Played a round of nse_check_globals and fixed a bunch of reported problems.
This commit is contained in:
parent
38b26d0ccc
commit
bb359adaa1
7 changed files with 18 additions and 13 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue