The script was checking the returned data, but not the status. When
status is false, data is actually an error message. So in case of a
timeout, the script was receiving nil, "TIMEOUT" and interpreting
"TIMEOUT" as a response from the server. It looked like this:
Discovered open port 1434/udp on 127.0.0.1
NSE: rpc-grind: RPC checking function response data is not RPC.
NSE: Target port 1434 is not a RPC port.
This was reported by Christopher Clements.
http://seclists.org/nmap-dev/2012/q3/685
NSE: rpc-grind Connect(): RPC library does not support: nil protocol
NSE: rpc-grind Connect(): RPC library does not support: rpcbind version
81578896
These errors caused by ChkProgram and ChkVersion called from
rpc.Comm.Connect. Added a dummy program in rpc-grind and a check for
self.checkprogver in ChkVersion, and everything works great.
Also fixed portrule to only fail if the non-rpcbind service name was not
the result of table lookup. Was failing on port 2049 (in nmap-services
as "nfs") without -sV.