mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
13 lines
278 B
Ruby
13 lines
278 B
Ruby
# Phase 15 — Sinatra route, benign.
|
|
# Validates payload then runs a fixed echo.
|
|
|
|
# nyx-shape: sinatra
|
|
get '/run' do |payload|
|
|
unless payload =~ /\A[A-Za-z0-9]{1,32}\z/
|
|
STDOUT.print("invalid\n")
|
|
next "invalid"
|
|
end
|
|
out = `echo hello`
|
|
STDOUT.print(out)
|
|
out
|
|
end
|