Skip to content

Commit b8225ae

Browse files
committed
Remove unnecessary ||= and ivars.
1 parent e0389df commit b8225ae

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

modules/auxiliary/gather/flash_rosetta_jsonp_url_disclosure.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def run
6565
end
6666

6767
def check
68+
test_string = Rex::Text.rand_text_alphanumeric(encoded_swf.length)
6869
io = open(exploit_url(test_string))
6970
if io.read.start_with? test_string
7071
Msf::Exploit::CheckCode::Vulnerable
@@ -92,12 +93,6 @@ def on_request_uri(cli, request)
9293
end
9394
end
9495

95-
# Generates an alphanumeric test string for checking that the JSONP endpoint
96-
# allows for long enough callback function names.
97-
def test_string
98-
@test_string ||= Rex::Text.rand_text_alphanumeric(encoded_swf.length)
99-
end
100-
10196
def exploit_url(data_payload)
10297
delimiter = if datastore['JSONP_URL'].include?('?') then '&' else '?' end
10398
"#{datastore['JSONP_URL']}#{delimiter}#{datastore['CALLBACK']}=#{data_payload}"

0 commit comments

Comments
 (0)