mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-15 20:05:13 +02:00
23 lines
534 B
Ruby
23 lines
534 B
Ruby
# Phase 15 — Rails-style controller action, vulnerable.
|
|
# Controller inherits the conventional ApplicationController name so
|
|
# RubyShape::detect picks RailsAction.
|
|
|
|
class ApplicationController
|
|
def initialize; end
|
|
end
|
|
|
|
class UsersController < ApplicationController
|
|
def initialize
|
|
super
|
|
@__nyx_payload = nil
|
|
@__nyx_request = nil
|
|
end
|
|
|
|
def index
|
|
STDOUT.print("__NYX_SINK_HIT__\n")
|
|
payload = @__nyx_payload || ENV['NYX_PAYLOAD'] || ''
|
|
out = `echo hello #{payload}`
|
|
STDOUT.print(out)
|
|
out
|
|
end
|
|
end
|