Advertisement
jnck

FOPO Decoder

Jul 8th, 2018
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.30 KB | None | 0 0
  1. <title>FOPO Decoder</title>
  2. <center>
  3.     <h1>FOPO Decoder</h1>
  4.     <form method="POST">
  5.         <br />
  6.         <textarea name="contents" style="width: 615px; height: 141px;"></textarea>
  7.         <br /><br />
  8.         <input type="submit" name="dec" value="Decode">
  9.     </form>
  10.     <br /><br />
  11. <?php
  12. /*
  13. FOPO PHP Deobfuscator script
  14. Description: Deobfuscator script for FOPO PHP obfuscated files
  15. Author: Antelox
  16. Version: 0.22
  17. Date: 05/04/2017
  18. Coded by Antelox
  19. Twitter: @Antelox
  20. UIC R.E. Academy - quequero.org
  21. Copyright (C) 2017 - MIT License
  22. *PHP script version*
  23. Online version: https://glot.io/snippets/efruafhnez
  24. This is the updated version after that FOPO PHP Obfuscator's author has updated
  25. his obfuscation algorithm
  26. If it doesn't work in the future, please send me an email at
  27. anteloxrce(at)gmail(dot)com
  28. and I'll will try to update the script quickly. Otherwise, fork it
  29. and make appropriate changes. =)
  30. */
  31. set_time_limit(0);
  32.  
  33. if (isset($_POST['dec'])) {
  34.     $contents = (isset($_POST['contents']) && !empty($_POST['contents'])) ? $_POST['contents'] : null;
  35.     if (!is_null($contents)) {
  36.         if (preg_match('/Obfuscation provided by FOPO - Free Online PHP Obfuscator:/', $contents) === 0)
  37.             die("*ERROR: Provided a PHP script not obfuscated with FOPO PHP Obfuscator!");
  38.         else{
  39.         $contents = preg_replace('/\/\/?\s*\*[\s\S]*?\*\s*\/\/?/', '', $contents);
  40.         $eval = explode('(', $contents);
  41.         $base64 = explode('"', $eval[2]);
  42.         $i1 = explode("eval", base64_decode($base64[1]));
  43.         $i2 = explode(":", $i1[1]);
  44.         $i3 = explode("\"", $i2[1]);
  45.         $encodedlayer = gzinflate(base64_decode(str_rot13($i3[1])));
  46.         while (!preg_match('/\?\>/', $encodedlayer)) {
  47.             $dl = explode("\"", $encodedlayer);
  48.             if (sizeof($dl) > 7) {
  49.                 $nextlayer = gzinflate(base64_decode(str_rot13($dl[7])));
  50.                 $encodedlayer = $nextlayer;
  51.             }else{
  52.                 $nextlayer = gzinflate(base64_decode($dl[5]));
  53.                 $encodedlayer = $nextlayer;
  54.             }
  55.         }
  56.  
  57.         $decoded = substr($encodedlayer, strpos($encodedlayer, '?>') + 2, strlen($encodedlayer));
  58.         echo "<textarea style=\"width: 615px; height: 141px;\" readonly>" . htmlentities($decoded) . "</textarea>";
  59.     }
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement