[pitboss] phase 14: Track B — Java harness emitter shapes

This commit is contained in:
pitboss 2026-05-14 16:54:56 -05:00
parent 7628c48930
commit bd1bd0ce84
36 changed files with 1793 additions and 155 deletions

View file

@ -0,0 +1,27 @@
// Phase 14 Quarkus reactive route, benign.
// import io.quarkus.runtime.Quarkus;
import java.io.BufferedReader;
import java.io.InputStreamReader;
@Path("/run")
public class Benign {
@GET
public String run(String payload) throws Exception {
System.out.print("__NYX_SINK_HIT__\n");
if (payload == null) payload = "";
String[] cmd = {"/bin/sh", "-c", "echo hello"};
Process p = Runtime.getRuntime().exec(cmd);
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
StringBuilder out = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
out.append(line);
out.append('\n');
System.out.println(line);
}
p.waitFor();
return out.toString();
}
}