31 lines
561 B
Plaintext
31 lines
561 B
Plaintext
![]() |
#!/usr/bin/php -dopen_basedir=
|
||
|
<?php
|
||
|
|
||
|
$srcdir = dirname(__FILE__);
|
||
|
require_once("$srcdir/Decompiler.class.php");
|
||
|
if (file_exists("$srcdir/phpdc.debug.php")) {
|
||
|
include("$srcdir/phpdc.debug.php");
|
||
|
}
|
||
|
|
||
|
if (!isset($argv)) {
|
||
|
$argv = $_SERVER['argv'];
|
||
|
$argc = $_SERVER['argc'];
|
||
|
}
|
||
|
|
||
|
$dc = &new Decompiler();
|
||
|
if (isset($argv[1])) {
|
||
|
$dc->decompileFile($argv[1]);
|
||
|
}
|
||
|
else {
|
||
|
$phpcode = '';
|
||
|
if (!defined('stdin')) {
|
||
|
define('stdin', fopen('php://stdin', 'rb'));
|
||
|
}
|
||
|
while (!feof(stdin)) {
|
||
|
$phpcode .= fgets(stdin);
|
||
|
}
|
||
|
$dc->decompileFile($phpcode);
|
||
|
}
|
||
|
$dc->output();
|
||
|
|