教你如何解密 “ PHP 神盾解密工具 ”
其实对神盾解密并没有那么感兴趣,只是看到了作者把工具又加密了,感觉不爽。研究了一下,其实解密没那么复杂。
利用php_apd扩展很轻松地就这把这搞定了。只有四句代码。
<?php rename_function('gzuncompress','new_gzuncompress'); override_function('gzuncompress', '$arg', 'print(new_gzuncompress($arg)); return new_gzuncompress($arg);'); require_once 'decryption.php'; decryption('decryption.php');
该工具的核心代码:decryption.php
<?php function decryption($fileName) { /** * 解码函数 * @param string $str 待解码字符串 * @param string $flg 是否解析后解码 * @return string 已解码字符串 */ function decode($str, $flg = '') { if($flg === '') { $ret = $str; } else { $ret = 'ۯ'; $i = 0; $l = strlen($str); while($i++ < $l) { $c = ord($str[$i-1]); $ret .= $c<245 ? ( $c>136 ? chr($c/2) : $str[$i-1] ) : ""; } } return base64_decode($ret); } $err = '解码遇到错误,请联系教主处理该文件!'; $str = file_get_contents($fileName); $path = pathinfo($fileName); $dirname = $path['dirname']; // 文件所在目录 $baseName = $path['filename']; // 文件名 if (preg_match('|IN_DECODE_(\w{32})|s', $str, $arr)) { // 防止解密自己,其实方法都已经告诉你了,自己动手解码才快乐 $arr[1] === '761b5f52db6dff7ce91344e99dcedab7' && die("err: [-1] - 请勿试图用本工具解密本工具!"); } else { die("err: [-1] - 没有发现神盾特征,你确定这是神盾加密?"); } // 匹配代码主题部分 // '';@\$[\x00-\xff]+\(\\'([\x00-\xff]+?)\\'\.\( preg_match('|\'\';@\$[\x00-\xff]+\(\\\\\'([\x00-\xff]+?)\\\\\'\.\(|s', $str, $arr) || die("err: [0] - ".$err); $code = $arr[1]; // 匹配中间加密部分 preg_match('|\(\'([\x00-\xff]+)\',\'|s', $code, $arr) || die("err: [1] - ".$err); $key = base64_decode(decode($arr[1], "decode")); $code = preg_replace('|\'\.[\x00-\xff]+\'\)\)\.\'|s', $key, $code); // 匹配尾部被加密代码 preg_match('|=\'(x[\x00-\xff]+)\'\)\);|s', $str, $arr) || die("err: [2] - ".$err); $core = $arr[1]; // 匹配验证key preg_match('|[\w+/=]{59}=|s', $arr[1], $arr) || die("err: [3] - ".$err); $key = $arr[0]; $core = str_replace($key, '', $core); // 去除key $suffix = gzuncompress($core); // 得到 base64 的末尾部分 // 解码 $code = gzuncompress(base64_decode($code . $suffix)); // 匹配干净的代码 if (preg_match('|<!--<\?php endif;\?>(<\?php[\r\n]{1,2}[\x00-\xff]+\?>)<\?php \$GLOBALS\[|s', $code, $arr)) { $code = $arr[1]; } // 写到文件 $source = $dirname . DIRECTORY_SEPARATOR . $baseName . "_source.php"; file_put_contents($source, $code); die("解密成功,已经保存为: " . $source); }

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Decrypting HTTP status code 460: Why does this error occur? Introduction: In daily network use, we often encounter various error prompts, including HTTP status codes. These status codes are a mechanism defined by the HTTP protocol to indicate the processing of a request. Among these status codes, there is a relatively rare error code, namely 460. This article will delve into this error code and explain why this error occurs. Definition of HTTP status code 460: First, we need to understand the basics of HTTP status code

ThinkPHP6 Data Encryption and Decryption: Protecting Sensitive Data Security Overview: With the rapid development of the Internet, data security issues are becoming more and more important. Especially in network application development, the protection of some sensitive data is crucial. The ThinkPHP6 framework provides a powerful data encryption and decryption mechanism, which can effectively improve data security by encrypting sensitive data. Using the encryption functions of ThinkPHP6 The ThinkPHP6 framework has a variety of built-in encryption functions, which can be used as needed.

In today's work environment, everyone's awareness of confidentiality is getting stronger and stronger, and encryption operations are often performed to protect files when using software. Especially for key documents, the awareness of confidentiality should be increased, and the security of documents should be given top priority at all times. So I don’t know how well everyone understands word decryption. How to operate it specifically? Today we will actually show you the process of word decryption through the explanation below. Friends who need to learn word decryption knowledge should not miss today's course. A decryption operation is first required to protect the file, which means that the file is processed as a protective document. After doing this to a file, a prompt pops up when you open the file again. The way to decrypt the file is to enter the password, so you can directly

Complete list of PHP encryption and decryption functions: safe application methods of md5, sha1, base64_encode and other functions, requiring specific code examples. In the development of network applications, data encryption and decryption is very important. As a popular server-side scripting language, PHP provides a variety of encryption and decryption functions. This article will introduce commonly used functions and their secure application methods, and provide specific code examples. md5 function The md5 function is the most common encryption function that can convert a string of any length into 32 bits

Java development skills revealed: Implementing data encryption and decryption functions In the current information age, data security has become a very important issue. In order to protect the security of sensitive data, many applications use encryption algorithms to encrypt the data. As a very popular programming language, Java also provides a rich library of encryption technologies and tools. This article will reveal some techniques for implementing data encryption and decryption functions in Java development to help developers better protect data security. 1. Selection of data encryption algorithm Java supports many

Decrypting the tricks added by the PyCharm interpreter PyCharm is the integrated development environment (IDE) preferred by many Python developers, and it provides many powerful features to improve development efficiency. Among them, the setting of the interpreter is an important part of PyCharm. Correctly setting the interpreter can help developers run the code smoothly and debug the program. This article will introduce some techniques for decrypting the PyCharm interpreter additions, and combine it with specific code examples to show how to correctly configure the interpreter. Adding and selecting interpreters in Py

CentOS uses vim/vi to encrypt and decrypt files 1. Use vim/vi to encrypt: Advantages: After encryption, if you don’t know the password, you cannot see the plain text, including root users; Disadvantages: It is obvious that others know the encryption , it is easy for others to destroy encrypted files, including content destruction and deletion; I believe everyone is familiar with the vi editor. There is a command in vi to encrypt files. For example: 1) First, in the root master Create an experimental file text.txt under the directory /root/: [root@www~]#vim/vitext.txt2) Enter the editing mode, press ESC after entering the content, and then enter: X (note the capital X), Enter; 3)

PHP and XML: How to Encrypt and Decrypt Data Introduction: In the modern Internet era, data security has received more and more attention. Among them, encryption and decryption of sensitive data have become one of the important means to protect data security. This article will implement data encryption and decryption using PHP and XML, and provide relevant code examples. The implementation of encrypted data uses PHP's encryption function, which can easily encrypt data. The following is a sample code that uses the AES encryption algorithm to encrypt data: //To be encrypted
