mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01:29 +00:00
Correct RPC reserved port range is 512-1023
Some RPC services are strict about this and reject calls when the source port is outside this range, causing nmap RPC calls to fail 50% of the time.
This commit is contained in:
@@ -48,6 +48,9 @@ o [NSE][GH#1838] Scripts dhcp-discover and broadcast-dhcp-discover now support
|
|||||||
o [NSE] Code improvements in RPC Dump, benefitting NFS-related scripts
|
o [NSE] Code improvements in RPC Dump, benefitting NFS-related scripts
|
||||||
[nnposter]
|
[nnposter]
|
||||||
|
|
||||||
|
o [NSE] RPC code was using incorrect port range, which was causing some calls,
|
||||||
|
such as NFS mountd, to fail intermittently [nnposter]
|
||||||
|
|
||||||
o [NSE][GH#1876] XML output from script ssl-cert now includes RSA key modulus
|
o [NSE][GH#1876] XML output from script ssl-cert now includes RSA key modulus
|
||||||
and exponent [nnposter]
|
and exponent [nnposter]
|
||||||
|
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ Comm = {
|
|||||||
if nmap.is_privileged() then
|
if nmap.is_privileged() then
|
||||||
-- Try to bind to a reserved port
|
-- Try to bind to a reserved port
|
||||||
for i = 1, 10, 1 do
|
for i = 1, 10, 1 do
|
||||||
local resvport = math.random(1, 1024)
|
local resvport = math.random(512, 1023)
|
||||||
socket = new_socket()
|
socket = new_socket()
|
||||||
status, err = socket:bind(nil, resvport)
|
status, err = socket:bind(nil, resvport)
|
||||||
if status then
|
if status then
|
||||||
@@ -189,7 +189,7 @@ Comm = {
|
|||||||
if nmap.is_privileged() then
|
if nmap.is_privileged() then
|
||||||
-- Try to bind to a reserved port
|
-- Try to bind to a reserved port
|
||||||
for i = 1, 10, 1 do
|
for i = 1, 10, 1 do
|
||||||
local resvport = math.random(1, 1024)
|
local resvport = math.random(512, 1023)
|
||||||
socket = new_socket("udp")
|
socket = new_socket("udp")
|
||||||
status, err = socket:bind(nil, resvport)
|
status, err = socket:bind(nil, resvport)
|
||||||
if status then
|
if status then
|
||||||
|
|||||||
Reference in New Issue
Block a user