Home > Backend Development > PHP Problem > How to decrypt php files

How to decrypt php files

爱喝马黛茶的安东尼
Release: 2023-02-25 06:48:02
Original
6653 people have browsed it

How to decrypt php files

Related recommendations: What is the encryption and decryption method of php

The so-called PHP file encryption, There are generally two methods, one is ZEND compilation, and the other is encoding such as BASE64. In theory, neither is encryption. Let’s talk about how to restore it respectively.

For the code compiled by ZEND, when opened with Notepad, it is completely garbled. Except for the very small header in the front, there are no visible ASCII characters in the back. It is a bit like opening an EXE file and cannot be read. . This type of processed files is generally considered irrecoverable. There is a DEZEND tool on the Internet. You can download it and try it. It can restore the code compiled by the earlier ZEND version.

Related recommendations: "php tutorial"

For PHP files encoded using BASE64 and other encodings, you can use Notepad to open and view them. All characters are visible ASCII characters. Generally, two methods are used to make reading more difficult: First, variables such as $ll111 and $ooo000 are used. The lowercase letter L is mixed with 1, and the lowercase letter O is mixed with the number 0, making it difficult to distinguish the variable names. The second is to use BASE64 encoding to convert the original code, and finally use eval for processing. Often the two methods are combined.

The code processed in the second method is easy to restore. The method is to replace eval with exit. Executing it under the CLI (command prompt) will display the equivalent code corresponding to the eval statement. Just replace the original statement. Sometimes the eval statement is still there after restoring once, so it needs to be processed repeatedly in the same way.

The above is the detailed content of How to decrypt php files. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template