1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00

msftidy: only check send_request_cgi for vars_get

This commit is contained in:
Christian Mehlmauer 2014-04-22 19:24:06 +02:00
parent b864c4619d
commit 3f4e9ab18d
No known key found for this signature in database
GPG Key ID: BCFF4FA966BC32C7

View File

@ -496,18 +496,10 @@ class Msftidy
end
def check_vars_get
test = @source.scan(/(send_request_(cgi|raw)\s*\(\s*\{?\s*['"]uri['"]\s*=>\s*[^=})]*?\?[^,})]+)/im)
test = @source.scan(/send_request_cgi\s*\(\s*\{?\s*['"]uri['"]\s*=>\s*[^=})]*?\?[^,})]+/im)
unless test.empty?
test.each { |item|
case item[1]
when 'cgi'
info("Please use vars_get in send_request_cgi: #{item[0]}")
when 'raw'
# send_request_raw does not support vars_get
info("Please use vars_get and switch to send_request_cgi: #{item[0]}")
else
raise('Error in regex')
end
info("Please use vars_get in send_request_cgi: #{item}")
}
end
end