Previously, if a host had not domain set, the script would crash when
trying to get the domain portion of the reverse-DNS name. Now, it adds
the blank string and tries to resolve the bare hostname "wpad".
Lua operator 'not' has higher precedence than '==', so the statement
not x == "something"
is equivalent to:
(not x) == "something"
which will always be false, since the value of 'not x' will be either
'true' or 'false' and the string "something" is not the boolean 'true'
or 'false'. This is usually resolved by using the '~=' operator.
Sometimes (e.g. when using an external API), a script wants to connect
by name to a server and doesn't care whether IPv4 or IPv6 is used. By
passing the "any_af" option, the first resolved address of any address
family will be used, allowing external-category scripts which used to
fail with -6 to succeed.
The rpcinfo script can now set version info just like rpc-grind. Since
this requires considerably less traffic than rpc-grind, I made rpc-grind
depend on rpcinfo so that it will avoid running if we can get the
version information this way instead.
Also changed rpcinfo to only run on port 111, not on "rpcbind" service
since that's what -sV labels any detected RPC service.
so that whois-ip will not make HTTP requests to iana.org unless it is
permitted to write the remote resources to a local file and to
subsequently read from the local file.
A problem encountered while obtaining or locally caching a remote IANA
assignment file for one address family will not prevent the use of an
assignment file corresponding to a different address family.
Instead of hard-coding the many-years-invalid IP address of
scanme.nmap.org, look it up via DNS. Even better, you can override the
host used for this purpose, in case you don't want to tip your hand.