From 9a67069869f2689a983cc360a9863393d22071fd Mon Sep 17 00:00:00 2001 From: fyodor Date: Tue, 27 Mar 2012 21:51:54 +0000 Subject: [PATCH] Rename asn-to-prefix script to targets-asn --- scripts/script.db | 2 +- .../{asn-to-prefix.nse => targets-asn.nse} | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) rename scripts/{asn-to-prefix.nse => targets-asn.nse} (71%) diff --git a/scripts/script.db b/scripts/script.db index 0d1f7f897..86bc09c07 100644 --- a/scripts/script.db +++ b/scripts/script.db @@ -7,7 +7,6 @@ Entry { filename = "afp-serverinfo.nse", categories = { "default", "discovery", Entry { filename = "afp-showmount.nse", categories = { "discovery", "safe", } } Entry { filename = "amqp-info.nse", categories = { "default", "discovery", "safe", "version", } } Entry { filename = "asn-query.nse", categories = { "discovery", "external", "safe", } } -Entry { filename = "asn-to-prefix.nse", categories = { "discovery", "external", "safe", } } Entry { filename = "auth-owners.nse", categories = { "default", "safe", } } Entry { filename = "auth-spoof.nse", categories = { "malware", "safe", } } Entry { filename = "backorifice-brute.nse", categories = { "brute", "intrusive", } } @@ -320,6 +319,7 @@ Entry { filename = "stun-info.nse", categories = { "discovery", "safe", } } Entry { filename = "stun-version.nse", categories = { "version", } } Entry { filename = "stuxnet-detect.nse", categories = { "discovery", "intrusive", } } Entry { filename = "svn-brute.nse", categories = { "brute", "intrusive", } } +Entry { filename = "targets-asn.nse", categories = { "discovery", "external", "safe", } } Entry { filename = "targets-ipv6-multicast-echo.nse", categories = { "broadcast", "discovery", } } Entry { filename = "targets-ipv6-multicast-invalid-dst.nse", categories = { "broadcast", "discovery", } } Entry { filename = "targets-ipv6-multicast-slaac.nse", categories = { "broadcast", "discovery", } } diff --git a/scripts/asn-to-prefix.nse b/scripts/targets-asn.nse similarity index 71% rename from scripts/asn-to-prefix.nse rename to scripts/targets-asn.nse index d5649eed7..643b2bb42 100644 --- a/scripts/asn-to-prefix.nse +++ b/scripts/targets-asn.nse @@ -13,17 +13,17 @@ http://www.shadowserver.org/wiki/pmwiki.php/Services/IP-BGP ]] --- --- @args asn-to-prefix.asn The ASN to search. --- @args asn-to-prefix.whois_server The whois server to use. Default: asn.shadowserver.org. --- @args asn-to-prefix.whois_port The whois port to use. Default: 43. +-- @args targets-asn.asn The ASN to search. +-- @args targets-asn.whois_server The whois server to use. Default: asn.shadowserver.org. +-- @args targets-asn.whois_port The whois port to use. Default: 43. -- @args newtargets Add discovered targets to Nmap scan queue. -- -- @usage --- nmap --script asn-to-prefix --script-args asn-to-prefix.asn=32 +-- nmap --script targets-asn --script-args targets-asn.asn=32 -- -- @output -- 53/udp open domain udp-response --- | asn-to-prefix: +-- | targets-asn: -- | 32 -- | 128.12.0.0/16 -- |_ 171.64.0.0/14 @@ -45,13 +45,13 @@ action = function(host, port) local asns, whois_server, whois_port, err, status local results = {} - asns = stdnse.get_script_args('asn-to-prefix.asn') - whois_server = stdnse.get_script_args('asn-to-prefix.whois_server') - whois_port = stdnse.get_script_args('asn-to-prefix.whois_port') - newtargets = stdnse.get_script_args('asn-to-prefix.newtargets') + asns = stdnse.get_script_args('targets-asn.asn') or stdnse.get_script_args('asn-to-prefix.asn') + whois_server = stdnse.get_script_args('targets-asn.whois_server') or stdnse.get_script_args('asn-to-prefix.whois_server') + whois_port = stdnse.get_script_args('targets-asn.whois_port') or stdnse.get_script_args('asn-to-prefix.whois_port') + newtargets = stdnse.get_script_args('targets-asn.newtargets') or stdnse.get_script_args('asn-to-prefix.newtargets') if not asns then - return stdnse.format_output(true, "asn-to-prefix.asn is a mandatory parameter") + return stdnse.format_output(true, "targets-asn.asn is a mandatory parameter") end if not whois_server then whois_server = "asn.shadowserver.org"