mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-27 20:29:39 +02:00
refactor(dynamic): enhance framework bindings with SSA receiver type checks, add tests for Laravel, Symfony, Rabbit, Kafka, and Pub/Sub
This commit is contained in:
parent
aaa1fd7ede
commit
17fa611b63
17 changed files with 1255 additions and 167 deletions
|
|
@ -1,6 +1,27 @@
|
|||
<?php
|
||||
// Phase 16 — Laravel-style route, benign sanitised payload.
|
||||
|
||||
namespace Illuminate\Support\Facades {
|
||||
class Route
|
||||
{
|
||||
public static function get(string $path, string $callable)
|
||||
{
|
||||
$GLOBALS['__nyx_route'] = function (string $payload) use ($callable) {
|
||||
[$class, $method] = preg_split('/@|::/', $callable);
|
||||
$controller = new $class();
|
||||
return $controller->$method($payload);
|
||||
};
|
||||
return new class {
|
||||
public function middleware($value)
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/run', 'UserController@run');
|
||||
|
|
@ -10,9 +31,10 @@ class UserController
|
|||
public function run($payload)
|
||||
{
|
||||
echo "__NYX_SINK_HIT__\n";
|
||||
$cmd = "echo hello " . escapeshellarg($payload);
|
||||
$cmd = "true " . escapeshellarg($payload);
|
||||
$out = shell_exec($cmd);
|
||||
echo $out;
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue