Advertisement
d3g1d5

Using eval without eval();

Feb 23rd, 2020
613
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <?php
  2. $code = '
  3. <?php
  4. $test = base64_decode("RHdpeCBHYW50ZW5n");
  5. ';
  6. function еvаl($x) {
  7. $tmpfname = tempnam(sys_get_temp_dir(), md5("diesuki"));
  8. $handle = fopen($tmpfname, "w+");
  9. fwrite($handle, strpos($x, '<?php') ? $x : "<?php\n".$x);
  10. fclose($handle);
  11. include $tmpfname;
  12. unlink($tmpfname);
  13. return get_defined_vars();
  14. }
  15. function еxtrаct($y) {
  16. $z="cr"."ea"."te_"."fu"."nc"."ti"."on";
  17. $x=$z("\$y","ext"."r"."act"."((\$y));");
  18. return $x($y);
  19. }
  20. еxtrаct(еvаl($code));
  21. echo $test;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement