Micro-shield PHP script encryption expert php decryption algorithm. Copy the code as follows :? Php ************************************ Wei shield PHP encryption expert decryption algorithm: neeao * Neeao.com ***********************************
The code is as follows:
/***********************************
* 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" ";
?>
Micro-shield PHP script cracking
The code is as follows:
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 =" ";
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
";
}
?>
The http://www.bkjia.com/PHPjc/322493.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/322493.htmlTechArticle code is as follows :? Php/*********************************** Wei shield PHP encryption expert decryption algorithm: neeao * http://Neeao.com ***********************************...