Can someone please decode this nasty eval base64 encoded piece of code?

Discussion in 'PHP' started by fux0312, Sep 29, 2008.

  1. #1
    Hi there, i bought a script and now the code is decrypted with base64. But i want to see what the code is doing on my server, dont trust them..
    <?php defined("_VALID_MOS") or die("Restricted access"); eval(base64_decode('IGlmICghZnVuY3Rpb25fZXhpc3RzKCJJSUlJSUlJSUlJSUkiKSl7ZnVuY3Rpb24gSUlJSUlJSUlJSUlJKCRJSUlJSUlJSUlJSUksJElJSUlJSUlJSUlJbCwkSUlJSUlJSUlJSUkxPS0xKXskSUlJSUlJSUlJSWxJPSIiO2ZvcigkSUlJSUlJSUlJSWxsPTE7JElJSUlJSUlJSUlsbDw9c3RybGVuKCRJSUlJSUlJSUlJSUkpOyRJSUlJSUlJSUlJbGwrKyl7JElJSUlJSUlJSUlsMT1zdWJzdHIoJElJSUlJSUlJSUlJSSwkSUlJSUlJSUlJSWxsLTEsMSk7JElJSUlJSUlJSUkxST1zdWJzdHIoJElJSUlJSUlJSUlJbCwoJElJSUlJSUlJSUlsbCVzdHJsZW4oJElJSUlJSUlJSUlJbCkpLTEsMSk7JElJSUlJSUlJSUlsMT1jaHIob3JkKCRJSUlJSUlJSUlJbDEpLSgkSUlJSUlJSUlJSUkxKm9yZCgkSUlJSUlJSUlJSTFJKSkpOyRJSUlJSUlJSUlJbEkuPSRJSUlJSUlJSUlJbDE7fXJldHVybiAkSUlJSUlJSUlJSWxJO319IC8qIFdBUk5JTkc6IFRoaXMgZmlsZSBpcyBwcm90ZWN0ZWQgYnkgY29weXJpZ2h0IGxhdy4gVG8gcmV2ZXJzZSBlbmdpbmVlciBvciBkZWNvZGUgdGhpcyBmaWxlIGlzIHN0cmljdGx5IHByb2hpYml0ZWQuICovICBpZiAoIWZ1bmN0aW9uX2V4aXN0cygiSUlJSUlJSUlJSUlJbDFsIikpeyBmdW5jdGlvbiBJSUlJSUlJSUlJSUlsMWwoJElJSUlJSUlJSUlJSSl7ICRJSUlJSUlJSUlJSWwgPSBzcGxpdC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XopdPPxtnG2sjZ09znjdjK3+aJitnM4MbhoY2gcbGf'), $error_op12, 1)); ?>
    PHP:
    i tryed to decrypt but didnt works for me.. can you help me please..
     
    fux0312, Sep 29, 2008 IP
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    seems to be out of context. initially:
    if (!function_exists("IIIIIIIIIIII")) {
        function IIIIIIIIIIII($IIIIIIIIIIII,$IIIIIIIIIIIl,$IIIIIIIIIII1=-1) {
            $IIIIIIIIIIlI="";
            for($IIIIIIIIIIll=1;$IIIIIIIIIIll<=strlen($IIIIIIIIIIII);$IIIIIIIIIIll++) {
                $IIIIIIIIIIl1 = substr($IIIIIIIIIIII,$IIIIIIIIIIll-1,1);
                $IIIIIIIIII1I = substr($IIIIIIIIIIIl,($IIIIIIIIIIll%strlen($IIIIIIIIIIIl))-1,1);
                $IIIIIIIIIIl1 = chr(ord($IIIIIIIIIIl1)-($IIIIIIIIIII1*ord($IIIIIIIIII1I)));
                $IIIIIIIIIIlI.= $IIIIIIIIIIl1;
            }
            return $IIIIIIIIIIlI;
        }
    } /* WARNING: This file is protected by copyright law. To reverse engineer or decode this file is strictly prohibited. */ 
    if (!function_exists("IIIIIIIIIIIIl1l")) { 
        function IIIIIIIIIIIIl1l($IIIIIIIIIIII) { 
            $IIIIIIIIIIIl = split ('\.', $IIIIIIIIIIII); 
            if( count($IIIIIIIIIIIl) == 4 ) { 
                if( is_numeric($IIIIIIIIIIIl[0]) && is_numeric($IIIIIIIIIIIl[1]) && is_numeric($IIIIIIIIIIIl[2]) && is_numeric($IIIIIIIIIIIl[3])) 
                return 1; 
            } 
            return 0; 
        }
    }
    
    PHP:
    the second eval does not evaluate to anything for me:
    echo base64_decode('JGVycm9yX29wMTIgPSAiZ3JhZmlrbmV0LmRlIjsgJGVycm9yX2lkPTU4ODs='));

    and the third is some data that is being manipulated by the function defined above as IIIIIIIIIIII, but it needs a key in $error_op12 (probably).

    anyway, since they say it's illegal to reverse engineer, i am going to tell you to do this:

    define a function:
    
    function printEval($what) {
        echo "<hr>$what<hr>";
    }
    
    PHP:
    search and replace any eval( on here) with printEval instead. i'd do the bit where they go eval(iiiiiiii(base... as separate debug bits.

    good luck.
     
    dimitar christoff, Sep 29, 2008 IP
  3. pietjepel

    pietjepel Peon

    Messages:
    3
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    1.) Install Xampp
    2.) Make directory "test" in htdocs
    3.) copy the file to decode to directory test, rename to index.php and open it
    4.) Replace eval(IIII........ to highlight_string(IIII........ ", this is the last eval() function"
    5.) save the file
    6.) Browse to the file, in my case http://localhost/test/index.php
    7.) Copy the code to replace the original code

    Thats all.
     
    pietjepel, Dec 1, 2008 IP
    vic_msn likes this.
  4. pietjepel

    pietjepel Peon

    Messages:
    3
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Forgot to say, delete the first line defined("_VALID_MOS") or die("Restricted access"); else you get "Restricted access"
     
    pietjepel, Dec 1, 2008 IP
  5. pietjepel

    pietjepel Peon

    Messages:
    3
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    output without the first line, you don't need it:
     
    pietjepel, Dec 1, 2008 IP
  6. elias_sorensen

    elias_sorensen Well-Known Member

    Messages:
    852
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    110
    #6
    There you go:

    
    <?
    $check_passed = true;
    if (strpos($_SERVER["HTTP_HOST"], $error_op12) === false && strpos($_SERVER["HTTP_HOST"], ".")!== false && IIIIIIIIIIIIl1l($_SERVER["HTTP_HOST"])==false ){
    $check_passed = false; 
    }
    if (!$check_passed) { 
    echo 'Usage of this copy of 2jnslider do not allowed on this '.$_SERVER["HTTP_HOST"].' domain'; return ; 
    }
    ?>
    <?php
    // no direct access
    defined( '_VALID_MOS' ) or die( 'Restricted access' );
    
    if (!function_exists( 'output_twoj_newsflash_plugin' )) {
        echo 'Please publish "2J News Slide Mambot"';
        return '';
    }
    echo twoj_get_news_text($params);
    ?>
    
    PHP:
     
    elias_sorensen, Dec 1, 2008 IP