function waf($data){ if (is_array($data)){ die("Cannot transfer arrays"); } if (preg_match('/<\?|__HALT_COMPILER|get|Coral|Nimbus|Zephyr|Acheron|ctor|payload|php|filter|base64|rot13|read|data/i', $data)) { die("You can't do"); } }
class Coral{ public $pivot;
public function __set($k, $value) { $k = $this->pivot->ctor; echo new $k($value); } }
class Nimbus{ public $handle; public $ctor;
public function __destruct() { return $this->handle(); } public function __call($name, $arg){ $arg[1] = $this->handle->$name; } }
class Zephyr{ public $target; public $payload; public function __get($prop) { $this->target->$prop = $this->payload; } }
class Acheron { public $mode;
public function __destruct(){ $data = $_POST[0]; if ($this->mode == 'w') { waf($data); $filename = "/tmp/".md5(rand()).".phar"; file_put_contents($filename, $data); echo $filename; } else if ($this->mode == 'r') { waf($data); $f = include($data); if($f){ echo "It is file"; } else{ echo "You can look at the others"; } } } }