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:
parent
b864c4619d
commit
3f4e9ab18d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user