diff --git a/scripts/lua/get_as_data.lua b/scripts/lua/get_as_data.lua
index ea02f7fe..8e36a34e 100644
--- a/scripts/lua/get_as_data.lua
+++ b/scripts/lua/get_as_data.lua
@@ -130,7 +130,7 @@ function print_single_as(value)
end
print('", ')
- print("\"column_name\" : \""..value["name"])
+ print("\"column_name\" : \""..printASN(tonumber(value["id"]), value["name"]))
if((value["country"] ~= nil) and (value["country"] ~= "")) then
print(" ")
end
diff --git a/scripts/lua/get_hosts_data.lua b/scripts/lua/get_hosts_data.lua
index cbf88df0..cc2168e0 100644
--- a/scripts/lua/get_hosts_data.lua
+++ b/scripts/lua/get_hosts_data.lua
@@ -357,7 +357,7 @@ for _key, _value in pairsByKeys(vals, funct) do
if(value["asn"] == 0) then
print(", \"column_asn\" : 0")
else
- print(", \"column_asn\" : \"" .. printASN(value["asn"], value["asname"]) .."\"")
+ print(", \"column_asn\" : \""..value["asname"].."\"")
end
end
diff --git a/scripts/lua/host_details.lua b/scripts/lua/host_details.lua
index c401a97c..90079aa1 100644
--- a/scripts/lua/host_details.lua
+++ b/scripts/lua/host_details.lua
@@ -375,10 +375,14 @@ print [[
print("
"..host["vlan"].." | \n")
end
if(host["os"] ~= "") then print("OS | " .. mapOS2Icon(host["os"]) .. " |
\n") end
- if((host["asn"] ~= nil) and (host["asn"] > 0)) then print("ASN | ".. printASN(host["asn"], host.asname) .. " [ " .. host.asname .. " ] | ")
+ if((host["asn"] ~= nil) and (host["asn"] > 0)) then
+ print("
---|
ASN | ")
- print(' | Whois Lookup | ')
- print("
\n") end
+
+ print(""..host.asname.." (ASN ".. host.asn..")")
+ print('Whois Lookup | ')
+ print("\n")
+ end
if((host["category"] ~= nil) and (host["category"] ~= "")) then
cat = getCategory(host["category"])
diff --git a/scripts/lua/hosts_stats.lua b/scripts/lua/hosts_stats.lua
index e8e34a80..ee217e98 100644
--- a/scripts/lua/hosts_stats.lua
+++ b/scripts/lua/hosts_stats.lua
@@ -68,14 +68,16 @@ print [[
if(protocol == nil) then protocol = "" end
+if(_GET["asn"] ~= nil) then asn = " for AS ".._GET["asn"] else asn = "" end
+
if(mode == "all") then
- print('title: "All '..protocol..' Hosts",\n')
+ print('title: "All '..protocol..' Hosts'..asn..'",\n')
elseif(mode == "local") then
- print('title: "Local '..protocol..' Hosts",\n')
+ print('title: "Local '..protocol..' Hosts'..asn..'",\n')
elseif(mode == "remote") then
- print('title: "Remote '..protocol..' Hosts",\n')
+ print('title: "Remote '..protocol..' Hosts'..asn..'",\n')
else
- print('title: "Local Networks",\n')
+ print('title: "Local Networks'..asn..'",\n')
end
print ('rowCallback: function ( row ) { return host_table_setID(row); },')
@@ -97,7 +99,8 @@ print [[/lua/hosts_stats.lua?mode=local">Local OnlyRemote Only Local Networks ' ],
+print [[/lua/hosts_stats.lua?mode=network">Local Networks]]
+print [[' ],
columns: [
{
title: "Key",
diff --git a/scripts/lua/modules/lua_utils.lua b/scripts/lua/modules/lua_utils.lua
index 45441181..38f74ea7 100644
--- a/scripts/lua/modules/lua_utils.lua
+++ b/scripts/lua/modules/lua_utils.lua
@@ -154,9 +154,9 @@ end
function printASN(asn, asname)
if(asn > 0) then
- return(""..asn.." ")
+ return(""..asname.." ")
else
- return("")
+ return(asname)
end
end