跳至主要內容

Free Online PHP encryption, decryption, confused source tools -toolfk online Programmer toolbox

      This paper to recommend [ToolFk] is a programmers often use a free online test kit, ToolFk feature is focused on everyday programmer development tools, without having to install any software, as long as the content execution affixed by a button, able to obtain the contents of the desired results.ToolFk also supports   BarCode Barcode generated online ,  QueryList collector ,  PHP code is run online ,  PHP confusion, encryption, decryption ,  Python code is run online JavaScript online operation ,YAML formatting tools , HTTP simulation query tool HTML online toolbox JavaScript online Toolbox ,CSS online toolbox JSON online toolbox unixtime timestamp conversion Base64 / the URL of / native2ascii conversion CSV conversion kit XML online toolbox the WebSocket online tools Markdown online toolbox Htaccess2nginx conversionHex conversion online online encryption toolkit ,online pseudo-original tools online APK decompile online web screenshot tool online random password generation online generate two-dimensional code qrcode online Crontab Expression Builder ,the online short URL Generator Online calculator tool And more than 20 daily programmer development tools, can be considered a very comprehensive website programmer's toolbox.
Site name: ToolFk
website links: https://www.toolfk.com/
Tools link: https://www.toolfk.com/tool-convert-php

 Teaching Code

This code [online PHP encryption, decryption, confused source tools] CSDN rely on a friend's code base? Since long before the draw over. So not remember his blog link. In this sorry. PHP code to achieve the following
STEP 1

STEP 2
?? IS DEPENDENT ON THE PHP CLASS. USE A NEW DIRECT OBJECT, CALL ITS METHODS ON THE LINE.THANKS AGAIN FOR THE AUTHOR'S FREELY AVAILABLE.
class PhpEncode
{
    function is_cli ()
    {
        return php_sapi_name () == 'cli' 1:? 0;
    }

    function rstr () // Random String Function
    {
        $ Len = rand (3, 6);
        $ Chr = '';
        for ($ i = 1; $ i <= $ len; $ i ++) {
            . $ Chr = rand (0, 1) chr (rand (65, 90)):? Chr (rand (97, 122));
        }
        return $ chr;
    }

    function enjumble ($ data) // Custom Encoding + Base64 + gzinflate ()
    {
        for ($ i = 0; $ i <strlen ($ data); $ i ++) {
            $ Data [$ i] = chr (ord ($ data [$ i]) + 1);
        }
        return base64_encode (gzdeflate ($ data, 9));
    }

    function striptag ($ in) // Remove '<? php' from initial code
    {
        $ Pos = strpos ($ in, "? <Php"); // to do: add support for short_tags
        if (is_numeric ($ pos)) {
            for ($ i = $ pos; $ i <= $ pos + 4 && strlen ($ in)> = 5; $ i ++) {
                $ In [$ i] = '';
            }
            return $ in;
        } Else {
            return $ in;
        }
    }

    function makeoutfile ($ str)
    {
        $ Funcname = $ this-> rstr ();
        . $ Varname = '$' $ this-> rstr ();
        $ Template = "<? Php function". $ Funcname. "($ Varname)
$ Varname = gzinflate (base64_decode ($ varname));
 for (\ $ i = 0; \ $ i <strlen ($ varname); \ $ i ++)
 {
". $ Varname." [\ $ I] = chr (ord ([\ $ i]) - 1 "$ varname..");
 }
 return $ varname;
 } Eval ($ funcname (\ "";
        $ Str = $ this-> enjumble ($ str);
        $ Template = $ template $ str "\"));..?> ";
        return $ template;
    }

    function confound ($ input)
    {
        return $ this-> makeoutfile ($ this-> striptag ($ input));
    }


    // ===== encode 2
    private $ c = ''; // store ciphertext
    private $ s = '', $ q1, $ q2, $ q3, $ q4, $ q5, $ q6; // store the generated encrypted content file
    // If you do not set a value, isset means that there will be;
    private $ file = ''; // read file path
    private $ source = '', $ target = '';
    // constructor calls an initialization global variable instantiation;
    public function __construct () {
        // Initialize global variables
        $ This-> initialVar ();
        // echo "hello \ n";
    }
    / *
    * @ Input $ property_name, $ value
    * @ Output
    * Magic method, set values ​​of variables; may be treated according to the needs. If removed directly determines if any value is represented by the set of properties, including properties not present;
    * /
    public function __set ($ property_name, $ value) {
        // define variables off;
        if (isset ($ this -> $ property_name)) {
            $ This -> $ property_name = $ value;
        } Else {
            // exception handling, processing undeclared variable assignment; it can be processed according to the needs.
            throw new Exception ( "property does not exist");
        }
    }
    // remove the magic value of the variable method;
    public function __get ($ property_name) {
        if (isset ($ this -> $ property_name)) {
            return $ this -> $ property_name;
        } Else {
            // throw new Exception ( "property does not exist");
            return NULL;
        }
    }
    // get random order
    private function RandAbc ($ length = "") {// retrieve random ordering
        $ Str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
        return str_shuffle ($ str);
    }
    // encrypt the plaintext content
    private function ciphertext ($ input) {
        //$filename='index.php ';
        $ T_k1 = $ this-> RandAbc ();
        $ T_k2 = $ this-> RandAbc ();
        $ V1 = base64_encode ($ input);
        $ C = strtr ($ v1, $ T_k1, $ T_k2);
        .. $ This-> c = $ T_k1 $ T_k2 $ c;
        return $ this;
    }
    //Initialize variables
    private function initialVar () {
        $ This-> q1 = "O00O0O"; // base64_decode
        $ This-> q2 = "O0O000"; // $ c (ciphertext through the description strtr replaced by the replacement character object character + + the base64_encode ( 'original language') constituted)
        $ This-> q3 = "O0OO00"; // strtr
        $ This-> q4 = "OO0O00"; // substr
        $ This-> q5 = "OO0000"; // 52
        $ This-> q6 = "O00OO0"; // urldecode parsed string (n1zb / ma5 \ vt0i28-pxuqy * 6% 6Crkdg9_ehcswo4 + f37j)

    }
    // generate a template (complex version) encrypted;
    private function model () {
        // $ c = $ this-> c;
        // $ this-> initialVar ();
        $ This-> s = '<? Php $'. $ This-> q6. '= Urldecode ( "% 6E1% 7A% 62% 2F% 6D% 615% 5C% 76% 740% 6928% 2D% 70% 78 % 75% 71% 79% 2A6% 6C% 72% 6B% 64% 679% 5F% 65% 68% 63% 73% 77% 6F4% 2B% 6637% 6A "); $ '.
            $ This-> q1. '= $'. $ This-> q6. '{3}. $'. $ This-> q6. '{6}. $'. $ This-> q6. '{33}. $ '. $ this-> q6.' {30}; $ '.. $ this-> q3' = $ '. $ this-> q6.' {33} $ '$ this-> q6..' {. 10}. $ '
            .. $ This-> q6 '. {24} $' $ this-> q6 '{10} $.' $ This-> q6..... '{24}; $' $ this-> q4 '. = $ '. $ this-> q3.' {0}. $ '. $ this-> q6.' {18}. $ '. $ this-> q6.' {3}. $ '. $ this-> q3. '{0}    
        .. $ '.. $ This-> q3' {1} $ '$ this-> q6..' {24}; '. $ This-> q5.' $ = $ '$ This-> q6..' . {7} $ '. $ this-> q6.' {13}; $ = $ '$ this-> q6..' {22} $ '$ this-' $ this-> q1.. '... > q6. '{36}    
        . $ '. $ This-> q6.' {29}. $ '. $ This-> q6.' {26}. $ '. $ This-> q6.' {30}. $ '. $ This-> .. q6 '. {32} $' $ this-> q6 '{35} $.' $ this-> q6 '{26} $.' $ this-> q6 '{30}.....;    
        eval ($ '.. $ this-> q1' ( " '. base64_encode (' $ '$ this-> q2..' =" " '$ this-> c..';  
        eval (\ '?> \'. $ '. $ this-> q1.' ($ '. $ this-> q3.' ($ '. $ this-> q4.' ($ '. $ this-> q2 . ', $'. $ this-> q5. '* 2), $'. $ this-> q4. '($'. $ this-> q2. ', $'. $ this-> q5. ', $ '. $ this-> q5.'),    
        $ '.. $ This-> q4' ($ '.. $ This-> q2', 0, $ '. $ This-> q5.')))); ').' "));?> ' ;
        return $ this;
    }
    // Create an encrypted file
    private function build ($ target) {
        //$this->encodes("./index.php ");
        // $ this-> model ();
        $ Fpp1 = fopen ($ target, 'w');
        fwrite ($ fpp1, $ this-> s) or die ( 'write failure!');
        fclose ($ fpp1);
        return $ this;
    }
    // operations encryption process consistent
    public function encode ($ input) {
        // $ file = "index.php";
        // coherent operation is actually using the function itself returns after treatment
        return $ this-> ciphertext ($ input) -> model () -> s;
    }
    // decryption
    public function decode ($ out) {
        // read the file you want to decrypt
        try {
            return @ $ this-> decodeMode ($ out) -> s;
        } Catch (FatalThrowableError $ e) {
            return "decode error";
        }
    }
    // decryption template to obtain the decrypted text
    private function decodeMode ($ fpp1) {
        // mark as taken in eval array, replace the first part of the ciphertext function name out of the second half ciphertext
        $ M = explode ( 'eval', $ fpp1);
        // replacement portion of system functions for execution, the system variables to give
        $ VarStr = substr ($ m [0], strpos ($ m [0], '$'));
        // After the execution, the subsequent use of the system can replace the function name
        eval ($ varStr);
        // determine whether ciphertext
        if (! isset ($ m [1])) {
            return $ this;
        }

        // ciphertext taken {$ this-> q4} substr
        $ Star = strripos ($ m [1], '(');
        $ End = strpos ($ m [1], ')');
        $ Str = $ {$ this-> q4} ($ m [1], $ star, $ end);
        // decrypt a ciphertext {$ this-> q1} base64_decode
        $ Str = $ {$ this-> q1} ($ str);
        // core taken out of the decrypted ciphertext
        $ Evallen = strpos ($ str, 'eval');
        $ Str = substr ($ str, 0, $ evallen);
        // execute the ciphertext core system variable is assigned a value $ O0O000
        eval ($ str);
        // can not package the following section, because $ {$ this-> qn} and can not function at full
        $ This-> s = $ {$ this-> q1} (
            $ {$ This-> q3} (
                $ {$ This-> q4} (
                    $ {$ This-> q2}, $ {$ this-> q5} * 2
                ),
                $ {$ This-> q4} (
                    $ {$ This-> q2}, $ {$ this-> q5}, $ {$ this-> q5}
                ),
                $ {$ This-> q4} (
                    $ {$ This-> q2}, 0, $ {$ this-> q5}
                )
            )
        );
        return $ this;
    }
    // recursive read and create the target directory structure
    private function targetDir ($ target) {
        if (! empty ($ target)) {
            if (! file_exists ($ target)) {
                mkdir ($ target, 0777, true);
            } Else {
                chmod ($ target, 0777);
            }

        }
    }

    // recursive decryption under the specified folder php file decryption
    public function decodeDir ($ source, $ target = "") {
        if (is_dir ($ source)) {
            $ This-> targetDir ($ target);
            $ Dir = opendir ($ source);
            while (false! = $ file = readdir ($ dir))
            {
                // list all the files and remove the '.' And '..' is used here as an example thinkphp framework, so the default rule out in Thinkphp directory, users can set their own needs
                if ($ file! = '.' && $ file! = '..' && $ file! = 'ThinkPHP')
                {
                    . $ Path = $ target.DIRECTORY_SEPARATOR $ file;
                    . $ SourcePath = $ source.DIRECTORY_SEPARATOR $ file;
                    $ This-> decodeDir ($ sourcePath, $ path);
                }
            }

        } Else if (is_file ($ source)) {
            $ Extension = substr ( '.' $ Source, strrpos ($ source,) + 1);
            if (strtolower ($ extension) == 'php') {
                $ This-> decode ($ source, $ target);
            } Else {
                // not a php file does not deal with
                copy ($ source, $ target);
            }
            // return;
        }
    }
    Php // recursive encryption of files in the specified folder encryption
    public function encodeDir ($ source, $ target) {
        if (is_dir ($ source)) {
            $ This-> targetDir ($ target);
            $ Dir = opendir ($ source);
            while (false! = $ file = readdir ($ dir))
            {
                // list of all files and remove and '.' '..'
                if ($ file! = '.' && $ file! = '..' && $ file! = 'ThinkPHP')
                {
                    . $ Path = $ target.DIRECTORY_SEPARATOR $ file;
                    . $ SourcePath = $ source.DIRECTORY_SEPARATOR $ file;
                    $ This-> encodeDir ($ sourcePath, $ path);
                }
            }

        } Else if (is_file ($ source)) {
            $ Extension = substr ( '.' $ Source, strrpos ($ source,) + 1);
            if (strtolower ($ extension) == 'php') {
                $ This-> encode ($ source, $ target);
            } Else {
                copy ($ source, $ target);
            }
        }
    }
}

It is worth a try for three reasons:

  1. Integrate various programmers often used in development and testing tools.
  2. Simple and beautiful atmosphere of the site pages
  3. Online support formatting code execution, APK online decompile, online high-strength password generator, two dozen screenshots online web tools service
  4. Also recommend its sister network  www.videofk.com  video download Toolbox 

    

留言

此網誌的熱門文章

TOOLFK Tool-Online Chinese / Letter / RMB / Simplified and Traditional Conversion Tool

The [TOOLFK] online Chinese character / letter / RMB / Simplified and Traditional Chinese conversion tool to be recommended in this article provides online daily use tools for Simplified and Traditional Chinese online conversion, RMB capitalization conversion, letter case conversion, and Chinese to Pinyin conversion. Website name: ToolFk website link:  https://www.toolfk.com/Tool link:  https://www.toolfk.com/tool-online-convert Code teaching This tool [online Chinese character / letter / RMB / Simplified and Traditional Chinese conversion tool] depends on the code base (you can view the TOOLFK website source code to view) http: //www.toollibs.com/togglecase transverter.js / pinyin_dict_withtone.js / pinyin_dict_polyph / rmb.js / ec- do .js STEP 1 Online Chinese to Pinyin tool STEP 2 Online Simplified and Traditional Online Conversion Tool STEP 3 Online RMB capital conversion tool STEP4 online letter case conversion tool STEP5 The core code of ...

HTML online for code formatting, beautification, encryption, decryption, compression, turn a key tool -toolfk online Programmer toolbox

    This paper to recommend [ToolFk] is a programmers often use a free online test kit, ToolFk feature is focused on everyday programmer development tools, without having to install any software, as long as the content execution affixed by a button, able to obtain the contents of the desired results. ToolFk also supports    BarCode Barcode generated online  ,   QueryList collector  ,   PHP code is run online  ,   PHP confusion, encryption, decryption  ,   Python code is run online  ,  JavaScript online operation  , YAML formatting tools  ,  HTTP simulation query tool  ,  HTML online toolbox  ,  JavaScript online Toolbox  , CSS online toolbox  ,  JSON online toolbox  ,  unixtime timestamp conversion  ,  Base64 / the URL of / native2ascii conversion  ,  CSV conversion kit  ,  XML online toolbox  ,...

How to Download tencent video online for free? tencent Video Downloader -VideoFK

In line to see some friends in the query how to download tencent video on the computer, and this article will be introduced "  Videofk.com  " is a free tencent video online video download site, download method is very simple, just copy the video link, paste it into the query box, click on the search button, then you can quickly save mp4 videos to your PC or mobile phone. Visit website link:  https://www.videofk.com/weishi-video-download Tutorial STEP 1 Open   Videofk   website, you need to download the tencent video link to copy and paste it into the bottom, click on the search button below to obtain cover art and movie download button. STEP 2 In  Videofk  After parsing the video?, Are the following methods for you to download? Choose. 1, click on the top cover map of the "  Download  " button to quickly download videos to the local. 2, click on the cover drawing any position, a window will pop up, w...