Nmap Development mailing list archives

[NSEDOC] creation of possibly unwanted hyperlinks


From: jah <jah () zadkiel plus com>
Date: Sun, 19 Oct 2008 00:44:27 +0100

Hi,

The attached patch comments-out some patterns from
nsedoc/src/luadoc/doclet/html.lua and which prevents hyperlinking for
strings matching those patterns, for example email addresses,
ipOps.compare_ip, several domain and dns zone names.  These things were
probably not intended to be hyperlinked and those things that were,
still are.

I've attached a comparison of log outputs from nsedoc creation before
and after this change which goes some way to help confirm this (doc
generation wasn't done in the same order both times so it's a bit messy).

Regards,

jah

Attachment: nsedoc_log_comparison.txt.gz
Description:

--- html.lua.orig       2008-10-18 23:58:58.828125000 +0100
+++ html.lua    2008-10-18 23:59:52.968750000 +0100
@@ -58,21 +58,21 @@
 
   local link_esc = {
     "(http)(://%S-)(%p?%s)", -- '<a href="%1\0%2">%1\0%2</a>%3'
-    "(http)(://%S-)(%p?)$", -- '<a href="%1\0%2">%1\0%2</a>%3'
+    "(http)(://%S-)(%p?)$", --[[ '<a href="%1\0%2">%1\0%2</a>%3'
     "([%s(<[])([^%s%z]*%.com%S-)(%p?%s)",
     "([%s(<[])([^%s%z]*%.com%S-)(%p?)$",
     "([%s(<[])([^%s%z]*%.org%S-)(%p?%s)",
     "([%s(<[])([^%s%z]*%.org%S-)(%p?)$",
     "([%s(<[])([^%s%z]*%.net%S-)(%p?%s)",
-    "([%s(<[])([^%s%z]*%.net%S-)(%p?)$",
+    "([%s(<[])([^%s%z]*%.net%S-)(%p?)$",--]]
     ["(http)(://%S-)(%p?)$"] = '<a href="%1\0%2">%1\0%2</a>%3',
-    ["(http)(://%S-)(%p?%s)"] = '<a href="%1\0%2">%1\0%2</a>%3',
+    ["(http)(://%S-)(%p?%s)"] = '<a href="%1\0%2">%1\0%2</a>%3',--[[
     ["([%s(<[])([^%s%z]*%.com%S-)(%p?)$"] = '%1<a href="http\0://%2">%2</a>%3',
     ["([%s(<[])([^%s%z]*%.com%S-)(%p?%s)"] = '%1<a href="http\0://%2">%2</a>%3',
     ["([%s(<[])([^%s%z]*%.org%S-)(%p?)$"] = '%1<a href="http\0://%2">%2</a>%3',
     ["([%s(<[])([^%s%z]*%.org%S-)(%p?%s)"] = '%1<a href="http\0://%2">%2</a>%3',
     ["([%s(<[])([^%s%z]*%.net%S-)(%p?)$"] = '%1<a href="http\0://%2">%2</a>%3',
-    ["([%s(<[])([^%s%z]*%.net%S-)(%p?%s)"] = '%1<a href="http\0://%2">%2</a>%3',
+    ["([%s(<[])([^%s%z]*%.net%S-)(%p?%s)"] = '%1<a href="http\0://%2">%2</a>%3',--]]
   };
 
   local nse_esc = {

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: