1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00

o [NSE] Modified the sql-injection script to use the httpspider library.

[Lauri Kokkonen]
This commit is contained in:
patrik
2012-02-05 13:47:31 +00:00
parent 908ac61fb0
commit 557874588f
3 changed files with 39 additions and 121 deletions

View File

@@ -81,15 +81,15 @@ Options = {
if ( ( o.base_url:getProto() == 'https' and o.base_url:getPort() == 443 ) or
( o.base_url:getProto() == 'http' and o.base_url:getPort() == 80 ) ) then
if ( o.withinhost ) then
host_match = ("%s://%s"):format(o.base_url:getProto(), o.base_url:getHost())
host_match = ("^%s://%s"):format(o.base_url:getProto(), o.base_url:getHost())
elseif ( o.withindomain ) then
domain_match = ("%s://.*%s/"):format(o.base_url:getProto(), o.base_url:getDomain())
domain_match = ("^%s://.*%s/"):format(o.base_url:getProto(), o.base_url:getDomain())
end
else
if ( o.withinhost ) then
host_match = ("%s://%s:%d"):format(o.base_url:getProto(), o.base_url:getHost(), o.base_url:getPort() )
host_match = ("^%s://%s:%d"):format(o.base_url:getProto(), o.base_url:getHost(), o.base_url:getPort() )
elseif( o.withindomain ) then
domain_match = ("%s://.*%s/"):format(o.base_url:getProto(), o.base_url:getDomain() )
domain_match = ("^%s://.*%s/"):format(o.base_url:getProto(), o.base_url:getDomain() )
end
end
-- set up the appropriate matching functions