Home php教程 php手册 PHP eval加密的破解方法

PHP eval加密的破解方法

Jun 13, 2016 am 11:11 AM
eval php one time learn encryption us method concept go deep of crack language illustrate

今天我们来深入的了解一下PHP语言的深层次概念。

特别说明:此PHP eval加密解密程序好像一定得在PHP5上面使用,

我在PHP4上面测试eval(gzinflate(base64_decode("codes")))内加密的代码始终无法正常解密

以下是PHP eval加密破解的代码:

  1.  ?php  
  2. /*  
  3. Taken from http://www.php.net/manual/
    de/function.eval.php#59862  
  4. Directions:  
  5. 1. Save this snippet as decrypt.php  
  6. 2. Save encoded PHP code in coded.txt  
  7. 3. Create a blank file called decoded.txt 
    (from shell do CHMOD 0666 decoded.txt)  
  8. 4. Execute this script (visit decrypt.php in 
    a web browser or do php decrypt.php in the shell)  
  9. 5. Open decoded.txt, the PHP should be decrypted 
    if not post the code on http://www.ariadoss.
    com/forums/web-development/lamp  
  10.  
  11. gzinflate执行PHP eval加密代码的解密方法翻译为中文后的文字
    (此段汉字原始文件里面可没.嘿)  
  12. 1. 把这整段脚本保存为decrypt.php  
  13. 2. 把需要解密的代码保存为coded.txt并且和decrypt.php在同一目录.  
  14. 3. 创建一个空白文件命名为 decoded.txt (必须把 decoded.
    txt 的权限设置为CHMOD 0666,也就是可以写入的.当然,你可以
    不创建文件文件.只要文件夹有写入权限,脚本便会自动创建一个
    名为decoded.txt的文档. )  
  15. 4. 运行PHP eval加密解密脚本 (浏览器中运行decrypt.php 即访问 http:
    //您的域名/存放目录/decrypt.php)  
  16. 5. 打开 decoded.txt, 代码应该已经解密完成,如果出现错误请
    把代码发送到 http://www.ariadoss.com/forums/web-
    development/lamp  
  17. */  
  18. echo "nDECODE nested eval(gzinflate()) by DEBO 
    Jurgen 
    mailto:jurgen@person.benn";  
  19. echo "1. Reading coded.txtn";  
  20. $fp1 = fopen ("coded.txt", "r");  
  21. $contents = fread ($fp1, filesize ("coded.txt"));  
  22. fclose($fp1);  
  23. echo "2. Decodingn";  
  24. while (preg_match("/eval(gzinflate/",$contents)) {  
  25. $contents=preg_replace("/?|?>/", "", $contents);
     eval(preg_replace("/eval/", "$
    contents=", 
    $contents)); } echo "
    3. Writing decoded.txtn"; 
    $
    fp2 = fopen("decoded.txt","w"); fwrite($fp2, 
    trim($contents)); fclose($fp2);  
  26. ?> 

再简单的说下gzinflate,eval(gzinflate(base64_decode("codes")));decoding-eval-gzinflate-base64_decode的使用方法.
保存上面的程序文件decrypt.php,当然文件名可以自己设置.

在此文件的同一目录建立一个coded.txt,这个里面放的是PHP eval加密过的代码,也就是eval(gzinflate(base64_decode("codes")))当中的codes;

再说明白点就是是要解密的eval(gzinflate(base64_decode("codes")))里面执行的密原文.执行保存过的文件decrypt.php,这样便会在同一目录生成一个decoded.txt的txt文档,打开此文档.里面就是那些PHP eval加密的原始代码.


Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP Quick Guide CakePHP Quick Guide Sep 10, 2024 pm 05:27 PM

CakePHP is an open source MVC framework. It makes developing, deploying and maintaining applications much easier. CakePHP has a number of libraries to reduce the overload of most common tasks.

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

See all articles