oracle-tns-version.nse
oracle 19c response is : \x00g\x00\x00\x04\x00\x00\x00"\x00\x00[(DESCRIPTION=(TMP=)(VSNNUM=318767104)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
VSNNUM 318767104 to hex is 13000000
local function decode_vsnnum (vsnnum)
local hex = stdnse.tohex(tonumber(vsnnum))
local maj, min, a, b, c = string.unpack("c1 c1 c2 c1 c2", hex)
return string.format("%d.%d.%d.%d.%d",
tonumber(maj, 16),
tonumber(min, 16),
tonumber(a, 16),
tonumber(b, 16),
tonumber(c, 16)
)
end
it will be 1.3.0.0.0
changed to:
local function decode_vsnnum (vsnnum)
local version = tonumber(vsnnum)
return string.format("%d.%d.%d.%d",
version >> 24,
version >> 16 & 0xf,
version >> 12 & 0xff,
version >> 8 & 0xf
)
end
it will be 19.0.0.0
the same as 21c of oracle
The text was updated successfully, but these errors were encountered:
linholmes
changed the title
oracle-tns-version.nse cannot get oracle version of 19c or 21c
oracle-tns-version.nse cannot get the oracle 19c or 21c of version
Jun 29, 2021
dvas0004
added a commit
to dvas0004/nmap
that referenced
this issue
Apr 27, 2022
oracle-tns-version.nse
oracle 19c response is : \x00g\x00\x00\x04\x00\x00\x00"\x00\x00[(DESCRIPTION=(TMP=)(VSNNUM=318767104)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
VSNNUM 318767104 to hex is 13000000
local function decode_vsnnum (vsnnum)
local hex = stdnse.tohex(tonumber(vsnnum))
local maj, min, a, b, c = string.unpack("c1 c1 c2 c1 c2", hex)
return string.format("%d.%d.%d.%d.%d",
tonumber(maj, 16),
tonumber(min, 16),
tonumber(a, 16),
tonumber(b, 16),
tonumber(c, 16)
)
end
it will be 1.3.0.0.0
changed to:
local function decode_vsnnum (vsnnum)
local version = tonumber(vsnnum)
return string.format("%d.%d.%d.%d",
version >> 24,
version >> 16 & 0xf,
version >> 12 & 0xff,
version >> 8 & 0xf
)
end
it will be 19.0.0.0
the same as 21c of oracle
The text was updated successfully, but these errors were encountered: