Micro Shield PHP scripting encryption expert PHP decryption algorithm

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

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

The 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 the key in the first Base64 decrypted content
$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);
}
Encrypted ciphertext after intercepting the file
$Secret =substr ($lines [2], $str _length);
Echo $Secret;

Direct Restore ciphertext output
echo "<?php\n". Base64_decode (Strtr ($Secret, $decode _key, ' abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/')). "? > ";
?>


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.