Browse Source

decompiler: fix handling of stdin. support of exported dasm result

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@819 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 10 years ago
parent
commit
c667b51f43
  1. 5
      Decompiler.class.php
  2. 7
      phpdc.phpr

5
Decompiler.class.php

@ -2574,6 +2574,11 @@ class Decompiler
}
}
// }}}
function decompileDasm($content) // {{{
{
$this->dc = $content;
}
// }}}
function output() // {{{
{
echo "<?". "php\n\n";

7
phpdc.phpr

@ -13,7 +13,10 @@ if (!isset($argv)) {
}
$dc = new Decompiler();
if (isset($argv[1])) {
if (isset($argv[2])) {
eval('$dc->dc = ' . file_get_contents($argv[2]) . ';');
}
else if (isset($argv[1])) {
$dc->decompileFile($argv[1]);
}
else {
@ -24,7 +27,7 @@ else {
while (!feof(stdin)) {
$phpcode .= fgets(stdin);
}
$dc->decompileFile($phpcode);
$dc->decompileString($phpcode);
}
$dc->output();
Loading…
Cancel
Save