jnck

Simple PHP Obfuscator

Jul 7th, 2018
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.14 KB | None | 0 0
  1. <title>Simple PHP Obfuscator</title>
  2. <center>
  3.     <form method="POST">
  4.         <br>
  5.         <textarea name="code" style="width: 615px; height: 141px;"></textarea>
  6.         <br><br>
  7.         <input type="submit" name="enc" value="Encode">
  8.         <input type="submit" name="dec" value="Decode">
  9.     </form>
  10.     <br><br>
  11. <?php
  12. error_reporting(0);
  13. set_time_limit(0);
  14.  
  15. if(isset($_POST['enc'])) {
  16.     if(isset($_POST['code']) && !empty($_POST['code'])) {
  17.         $obf = base64_encode(gzcompress($_POST['code']));
  18.         echo "<textarea style=\"width: 615px; height: 141px;\" readonly><?=eval(\"?>\".gzuncompress(base64_decode(\"".$obf."\"))); __halt_compiler();?></textarea>";
  19.         echo "</center>";
  20.     }
  21. }
  22.  
  23. if(isset($_POST['dec'])) {
  24.     if(isset($_POST['code']) && !empty($_POST['code'])) {
  25.         $kode = explode("decode(\"", $_POST['code'])[1];
  26.         $kode = explode("\")", $kode)[0];
  27.         $unobf = ($kode) ? gzuncompress(base64_decode($kode)) : gzuncompress(base64_decode($_POST['code']));
  28.         echo "<textarea style=\"width: 615px; height: 141px;\" readonly>".htmlentities($unobf)."</textarea>";
  29.         echo "</center>";
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment