Micro-shield PHP script encryption expert php decryption algorithm

Source: Internet
Author: User

Copy codeThe Code is as follows: <? Php
/***********************************
* Wei shield PHP encryption expert decryption algorithm By: Neeao
* Http://Neeao.com
* 2009-09-10
***********************************/

$ Filename = "play-js.php"; // file to be decrypted
$ Lines = file ($ filename); // 0, 1, 2 rows

// The first base64 decryption
$ Content = "";
If (preg_match ("/o0o1_o0 \ ('. *' \)/", $ lines [1], $ y ))
{
$ Content = str_replace ("o0o1_o0 ('", "", $ y [0]);
$ Content = str_replace ("')", "", $ content );
$ Content = base64_decode ($ content );
}
// Search for the key in the content after the first base64 decryption
$ Decode_key = "";
If (preg_match ("/\), '. *',/", $ content, $ k ))
{
$ Decode_key = str_replace ("), '", "", $ k [0]);
$ Decode_key = str_replace ("',", "", $ decode_key );
}
// Search for the length of the string to be truncated
$ Str_length = "";
If (preg_match ("/, \ d * \),/", $ content, $ k ))
{
$ Str_length = str_replace ("),", "", $ k [0]);
$ Str_length = str_replace (",", "", $ str_length );
}
// Intercept the encrypted ciphertext of the file
$ Secret = substr ($ lines [2], $ str_length );
// Echo $ Secret;

// Directly restores the ciphertext output
Echo "<? Php \ n ". base64_decode (strtr ($ Secret, $ decode_key, 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789 +/')."?> ";
?>

Micro-shield PHP script crackingCopy codeThe Code is as follows: <? Php
Function get_filetree ($ path ){
$ Tree = array ();
Foreach (glob ($ path. '/*') as $ single ){
If (is_dir ($ single )){
$ Tree = array_merge ($ tree, get_filetree ($ single ));
} Else {
$ Tree [] = $ single;
}
}
Return $ tree;
}
Function eval_decode ($ File)
{
$ Lines = file ($ File );
$ Content;
If (preg_match ("/o0o1_o0 \ ('. *' \)/", $ Lines [1], $ S )){
$ Content = str_replace ("o0o1_o0 ('", "", $ S [0]);
$ Content = str_replace ("')", "", $ Content );
$ Content = base64_decode ($ Content );
} Else {
Return "file not encode! ";
}
$ Key;
If (preg_match ("/\), '. *',/", $ Content, $ K )){
$ Key = str_replace ("), '", "", $ K [0]);
$ Key = str_replace ("',", "", $ Key );
} Else {
Return "not decode key! ";
}
$ Length;
If (preg_match ("/, \ d * \),/", $ Content, $ K )){
$ Length = str_replace ("),", "", $ K [0]);
$ Length = str_replace (",", "", $ Length );
} Else {
Return "not decode base64 string! ";
}
$ Secret = substr ($ Lines [2], $ Length );
$ Decode = "<? Php ". base64_decode (strtr ($ Secret, $ Key, 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789 +/')."?> ";
File_put_contents ($ File, $ Decode );
Return "file decode success! ";
}

$ Filelist = get_filetree ("D:/PHPnow/htdocs/1 ");
Foreach ($ filelist as $ value ){
Echo $ value. ": \ t". eval_decode ($ value). "\ n \ r <br> ";
}
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.