Learn WordPress
Home » Programming

Decoding Eval Base 64


I think if you try to learn a programming language as PHP but you found the creator of the script protect the original source with encryption? This is sometimes useful way to protect a source PHP script for not stolen by other developers. But on the other side it is very annoying especially for those who want to learn about a script.

silau man!

This article will give some examples of how I decrypt from a source in encrypted. This technique is actually illegal I’ve used this way since a few years ago to study the scripts in encryption, but only today I want to share into my blog.


  1. A hosting account with PHP + Linux-based operating system (can also use the local PC with linux OS)
  2. Meticulous in doing the configuration.
  3. a little knowledge.
    1. The first step: prepare the 2 files. Give name and decoded.txt coded.txt, then copy the entire contents of part of the script that were encrypted into coded.txt file.

      Create a file with extension. PHP and fill with the following code:


      echo “1. Reading coded.txt\n”;
      $fp1 = fopen (“coded.txt”, “r”);
      $contents = fread ($fp1, filesize (“coded.txt”));

      echo “2. Decoding\n”;
      while (preg_match(“/eval\(gzinflate/”,$contents)) {
      $contents=preg_replace(“/<\?|\?>/”, “”, $contents);
      eval(preg_replace(“/eval/”, “\$contents=”, $contents));

      echo “3. Writing decoded.txt\n”;
      $fp2 = fopen(“decoded.txt”,”w”);
      fwrite($fp2, trim($contents));


      Step two: Upload the three files (coded.txt, decoded.txt, and your.php) into a folder. Then put the file access permissions 777 decoded.txt and coded.txt, after all, open your.php use a web browser. Decoding results produced will be in getting inside the decoded.txt file like the following example:

      Decoding Eval Base 64 php Based Byterun

      Done! and have a nice day! You can try my byterun decoder and just download the result as .txt file. mawar


  • Parsa says:

    Hi, nice but not work for me ? I see This after run my file 1. Reading coded.txt 2. Decoding 3. Writing decoded.txt But all coded.txt content copy in to decoded.txt without decoded .

    please help me ! thanks

  • Amming says:

    knows your basic encrypted code, it works on eval base 64 only

FREE Cloud Storage