Building a string with var = var .. "something" has miserable time
complexities. This commit cleans up a lot of that in scripts, focusing
on packing of data with bin.pack and concatenations within loops.
Additionally, a few instances were replaced with string.rep
NSE already escapes output everywhere. More importantly, the call to
gsub returns two values, which were being treated as structured output
and unstructured output. The second return value is an integer count of
substitutions, so what you would see in normal output was
|_http-git: 0
while what used to be normal output was going to XML.
Alex Weber noticed that the script was not working.
http://seclists.org/nmap-dev/2012/q4/397
Show the uninterpreted remote URLs in every case. When matching specific
services, show the guesses about where the source might be hosted, but
remove verbose interpretation like "accessed over SSH".
Before:
| Remote: git@github.com:skullspace/breachdb.git
| GitHub remote: skullspace/breachdb (accessed over SSH)
|_ -> Source might be at https://github.com/skullspace/breachdb
After:
| Remote: git@github.com:skullspace/breachdb.git
|_ -> Source might be at https://github.com/skullspace/breachdb