Micro Shield PHP script encryption expert PHP decryption algorithm _php tutorial

Source: Internet
Author: User
Copy CodeThe code is as follows:
/***********************************
* Shield PHP encryption expert decryption algorithm BY:NEEAO
*http://neeao.com
*2009-09-10
***********************************/

$filename = "play-js.php";//File to decrypt
$lines = file ($filename);//0,1,2 Line

First time Base64 decryption
$content = "";
if (Preg_match ("/o0o0000o0\ ('. * ')/", $lines [1], $y))
{
$content =str_replace ("O0o0000o0 ('", "", $y [0]);
$content =str_replace ("')", "" ", $content);
$content =base64_decode ($content);
}
Find key in Base64 decrypted content for the first time
$decode _key= "";
if (Preg_match ("/\), '. * ',/", $content, $k))
{
$decode _key=str_replace ("), '", "", $k [0]);
$decode _key=str_replace ("',", "", $decode _key);
}
Find the length of the string to intercept
$str _length= "";
if (Preg_match ("/,\d*\),/", $content, $k))
{
$str _length=str_replace ("),", "", $k [0]);
$str _length=str_replace (",", "", $str _length);
}
Ciphertext after intercepting file encryption
$Secret =substr ($lines [2], $str _length);
Echo $Secret;

Direct reduction of ciphertext output
echo " ";
?>

Micro-shield PHP script hack
Copy CodeThe 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 ("/o0o0000o0\ ('. * ')/", $Lines [1], $S)) {
$Content = Str_replace ("O0o0000o0 ('", "", $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\t". Eval_decode ($value). "\n\r
";
}
?>

http://www.bkjia.com/PHPjc/322493.html www.bkjia.com true http://www.bkjia.com/PHPjc/322493.html techarticle Copy the code as follows:? PHP/*********************************** * Shield PHP encryption expert decryption algorithm BY:NEEAO *http://neeao.com *2009-09-10 ******* ****************************...

  • 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.