1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need help decode this Php code

Discussion in 'PHP' started by indoforum, Jun 11, 2010.

  1. #1
    Please help me to decode this 64 base encoder. Thanks.

    <?php    if (!function_exists("T7FC56270E7A70FA81A5935B72EACBE29"))  {   function T7FC56270E7A70FA81A5935B72EACBE29($TF186217753C37B9B9F958D906208506E)   {    $TF186217753C37B9B9F958D906208506E = base64_decode($TF186217753C37B9B9F958D906208506E);    $T7FC56270E7A70FA81A5935B72EACBE29 = 0;    $T9D5ED678FE57BCCA610140957AFAB571 = 0;    $T0D61F8370CAD1D412F80B84D143E1257 = 0;    $TF623E75AF30E62BBD73D6DF5B50BB7B5 = (ord($TF186217753C37B9B9F958D906208506E[1]) << 8) + ord($TF186217753C37B9B9F958D906208506E[2]);    $T3A3EA00CFC35332CEDF6E5E9A32E94DA = 3;    $T800618943025315F869E4E1F09471012 = 0;    $TDFCF28D0734569A6A693BC8194DE62BF = 16;    $TC1D9F50F86825A1A2302EC2449C17196 = "";    $TDD7536794B63BF90ECCFD37F9B147D7F = strlen($TF186217753C37B9B9F958D906208506E);    $TFF44570ACA8241914870AFBC310CDB85 = __FILE__;    $TFF44570ACA8241914870AFBC310CDB85 = file_get_contents($TFF44570ACA8241914870AFBC310CDB85);    $TA5F3C6A11B03839D46AF9FB43C97C188 = 0;    preg_match(base64_decode("LyhwcmludHxzcHJpbnR8ZWNobykv"), $TFF44570ACA8241914870AFBC310CDB85, $TA5F3C6A11B03839D46AF9FB43C97C188);    for (;$T3A3EA00CFC35332CEDF6E5E9A32E94DA<$TDD7536794B63BF90ECCFD37F9B147D7F;)    {     if (count($TA5F3C6A11B03839D46AF9FB43C97C188)) exit;     if ($TDFCF28D0734569A6A693BC8194DE62BF == 0)     {      $TF623E75AF30E62BBD73D6DF5B50BB7B5 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) << 8);      $TF623E75AF30E62BBD73D6DF5B50BB7B5 += ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]);      $TDFCF28D0734569A6A693BC8194DE62BF = 16;     }     if ($TF623E75AF30E62BBD73D6DF5B50BB7B5 & 0x8000)     {      $T7FC56270E7A70FA81A5935B72EACBE29 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) << 4);      $T7FC56270E7A70FA81A5935B72EACBE29 += (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA]) >> 4);      if ($T7FC56270E7A70FA81A5935B72EACBE29)      {       $T9D5ED678FE57BCCA610140957AFAB571 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) & 0x0F) + 3;       for ($T0D61F8370CAD1D412F80B84D143E1257 = 0; $T0D61F8370CAD1D412F80B84D143E1257 < $T9D5ED678FE57BCCA610140957AFAB571; $T0D61F8370CAD1D412F80B84D143E1257++)        $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012+$T0D61F8370CAD1D412F80B84D143E1257] = $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012-$T7FC56270E7A70FA81A5935B72EACBE29+$T0D61F8370CAD1D412F80B84D143E1257];       $T800618943025315F869E4E1F09471012 += $T9D5ED678FE57BCCA610140957AFAB571;      }      else      {       $T9D5ED678FE57BCCA610140957AFAB571 = (ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) << 8);       $T9D5ED678FE57BCCA610140957AFAB571 += ord($TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++]) + 16;       for ($T0D61F8370CAD1D412F80B84D143E1257 = 0; $T0D61F8370CAD1D412F80B84D143E1257 < $T9D5ED678FE57BCCA610140957AFAB571; $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012+$T0D61F8370CAD1D412F80B84D143E1257++] = $TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA]);       $T3A3EA00CFC35332CEDF6E5E9A32E94DA++; $T800618943025315F869E4E1F09471012 += $T9D5ED678FE57BCCA610140957AFAB571;      }     }     else $TC1D9F50F86825A1A2302EC2449C17196[$T800618943025315F869E4E1F09471012++] = $TF186217753C37B9B9F958D906208506E[$T3A3EA00CFC35332CEDF6E5E9A32E94DA++];     $TF623E75AF30E62BBD73D6DF5B50BB7B5 <<= 1;     $TDFCF28D0734569A6A693BC8194DE62BF--;     if ($T3A3EA00CFC35332CEDF6E5E9A32E94DA == $TDD7536794B63BF90ECCFD37F9B147D7F)     {      $TFF44570ACA8241914870AFBC310CDB85 = implode("", $TC1D9F50F86825A1A2302EC2449C17196);      $TFF44570ACA8241914870AFBC310CDB85 = "?".">".$TFF44570ACA8241914870AFBC310CDB85."<"."?";      return $TFF44570ACA8241914870AFBC310CDB85;     }    }   }  }  eval(T7FC56270E7A70FA81A5935B72EACBE29("QAcAICANCiAAEABvASU8L2Rpdj4NCkAAPABwIGNsYXNzPSJmb290ZXJAICIBYCZjb3B5OyBDAGByaWdodAAAIDw/cGhwIGVjaG8gZGF0ZQAAKCJZIik7Pz4gPGEgaHJlZiAAPSICE2Jsb2dpbmZvKCd1cmwAAicpOyA/PiIgIHRpdGxlAj9uFgBhbWUCRD4D/QHHPC9hPi4gQWxsIAAgUgihcyBSZXNlcnZlZCB8IAIwRGVzaWduALBCeToIsQaURnJlZQAAIFdvcmRwcmVzcyBUaGVtZSAAcyIKlGh0dHA6Ly93d3cucm8AgGNraW5nd3B0AiIuY29tLyI+R/FSAWMgV1ADpAghEpATFQCEASARQndwXxODYIAoDvIBcC9ib2R5FFA8L2h0bWw+"));  ?>
    
    PHP:

    SEMrush
     
    indoforum, Jun 11, 2010 IP
    SEMrush
  2. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #2
    Its Obfuscated one! :)
    It also contains a link to the author site in that Base64 encryption!
     
    Last edited: Jun 11, 2010
    roopajyothi, Jun 11, 2010 IP
  3. indoforum

    indoforum Active Member

    Messages:
    493
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    80
    #3
    I don't understand, what do you mean?
     
    indoforum, Jun 11, 2010 IP
  4. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #4
    </div>
    <div class="footer">
    &copy; Copyright <?php
    echo date("Y");
    ?> <a href="<?php bloginfo('url');
    ?>"  title="<?php bloginfo('name');
    ?>"><?php bloginfo('name');
    ?></a>. All Rights Reserved | Designed By: <a title="Free Wordpress Themes" href="http://www.rockingwpthemes.com/">Rocking WP Themes</a>
    </div>
    </div>
    
    <?php wp_footer();
    ?>
    </body>
    </html>
    PHP:
     
    danx10, Jun 11, 2010 IP
    indoforum likes this.
  5. jestep

    jestep Prominent Member Premium Member

    Messages:
    3,661
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #5
    A lot of overhead just make the footer...
     
    jestep, Jun 11, 2010 IP
  6. -M-A-R-K-

    -M-A-R-K- Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I think it's their protection to stop people from removing the copyright link

    @danx10 - How did you decode it btw?
     
    -M-A-R-K-, Jun 11, 2010 IP
  7. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #7
    Run the code through a beautifier and read through it, you'll realise its actually not all encoded, theirfore follow it.
     
    danx10, Jun 11, 2010 IP
  8. wildogre

    wildogre Well-Known Member

    Messages:
    1,016
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    128
    #8
    This is something really new for me. I never know how to decode this stuff.
     
    wildogre, Jun 11, 2010 IP
  9. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #9
    Just do as said be dan and decode this using base64
    
    QAcAICANCiAAEABvASU8L2Rpdj4NCkAAPABwIGNsYXNzPSJmb290ZXJAICIBYCZjb3B5OyBDAGByaWdodAAAIDw/cGhwIGVjaG8gZGF0ZQAAKCJZIik7Pz4gPGEgaHJlZiAAPSICE2Jsb2dpbmZvKCd1cmwAAicpOyA/PiIgIHRpdGxlAj9uFgBhbWUCRD4D/QHHPC9hPi4gQWxsIAAgUgihcyBSZXNlcnZlZCB8IAIwRGVzaWduALBCeToIsQaURnJlZQAAIFdvcmRwcmVzcyBUaGVtZSAAcyIKlGh0dHA6Ly93d3cucm8AgGNraW5nd3B0AiIuY29tLyI+R/FSAWMgV1ADpAghEpATFQCEASARQndwXxODYIAoDvIBcC9ib2R5FFA8L2h0bWw+
    
    PHP:
     
    roopajyothi, Jun 11, 2010 IP
  10. indoforum

    indoforum Active Member

    Messages:
    493
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    80
    #10
    Great answer danx10. Thank you. I was try using 64base online decoder, but failed. rep added.
     
    indoforum, Jun 16, 2010 IP
  11. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #11
    Right!
    You need to decode the lines in between base64 and needs some editing hope so!
    @Dan: Thanks for the Beautifier! Now only i came to know about the great tool!
     
    roopajyothi, Jun 16, 2010 IP
  12. sarahk

    sarahk iTamer Staff

    Messages:
    26,758
    Likes Received:
    4,068
    Best Answers:
    115
    Trophy Points:
    665
    #12
    The ethical question is if you should even try?
     
    sarahk, Jun 16, 2010 IP
  13. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #13
    ITS ENCODED FOR A REASON!!

    If the original author wanted credit left on it, then either live with it encoded and in place, or don't use it!
     
    mfscripts, Jun 17, 2010 IP
  14. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #14
    Oops!
    Decoding is not alone for Removing Credits might be adding some snippets etc, :)
    Any way i agree to place the credits :)
     
    roopajyothi, Jun 17, 2010 IP
  15. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #15
    Yep, thats arguable depending on the OP's motive.

    Heres a quote from Chilling Effects - Information on the DMCA

     
    danx10, Jun 17, 2010 IP
  16. jestep

    jestep Prominent Member Premium Member

    Messages:
    3,661
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #16
    I'll tell you straight up, if there is script which I cannot see or control on my server such as ones that often contain obfuscated file_get_contents to execute code from another server, I will damn well find out what is in there. I recommend anyone at least understand every digit of code executing on their server and under no circumstance should you ever allow remote execution using eval(file_get_contents( garbage.

    On that specific topic, if you are distributing scripts with obfuscated code that execute more code from your server, you are liable for damages if your script causes the site using it to get hacked. There's no license on earth that will protect you if you control what is being executed, whether for licensing or not. Since "You" have control over portions of the code, if anything malicious happens as a result of your portion, you are legally liable for it. I've seen more than 1 situation where the script creator's server was hacked which subsequently resulted in all of the sites using the script getting hacked since he was executing code via eval(file_get_contents(...

    This isn't about wanting credit for your work. 90% of themes and scripts I've seen, especially posted in the php help on DP, contain blatant spam links.

    The reality of coding and the internet in general, is that if your script or theme or whatever is good enough for people to link to, they will. It is not appropriate or reasonable to ask users to keep your spammy links in a theme in the first place. If you want credit, then make it reasonable and not blatant spam. In the above example the theme had about 5 footer links including Christian MySpace, French teacher jobs. Seriously, not realistic licensing. No wonder people are hacking apart your code.

    In any case there's no point in trying to hide it. Ethical programmers will leave it there or find an alternative that doesn't require your spam in it, and the others' would have removed it anyway. Save yourself the time of trying to create some absurd and massively resource consuming code just to put your links in there.
     
    jestep, Jun 17, 2010 IP
  17. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #17
    I think it depends on the reason for the encoding. If the licence for the script/template states that you leave the encoded part or content, then not only would be it illegal to decode but given that the original author has spent an amount of time on the script, it would also be morally right to leave it. The original author is also less likely to develop or maintain the script further. If it's not a restriction of the licence then I'd agree that there's no reason not to decode it.

    It also depends on the scale of the script used. You can have a template with a link encoded, or a larger commercial script with built in licencing restrictions and hence require some sort of encoding. That developer has a right to protect their intellectual property rights and hence encode their source code.

    Anyway, I think we're probably talking about 2 slightly different instances/extremes.
     
    mfscripts, Jun 18, 2010 IP