Skip to content

Instantly share code, notes, and snippets.

@IMSoP
Created October 11, 2014 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IMSoP/368a6819b07458912b8a to your computer and use it in GitHub Desktop.
Save IMSoP/368a6819b07458912b8a to your computer and use it in GitHub Desktop.
<?php
$source = 'echo "Hello World!\\n";';
$gz = addslashes(gzdeflate($source,9));
$a = "<?php \$var='"; $b = "'; eval(gzinflate(stripslashes(\$var)));";
$result = $a.$gz.$b;
$fp = fopen('so-26316521-out.php', 'wb');
fwrite($fp, $result);
fclose($fp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment