Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3624158
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:28:22+00:00 2026-05-18T23:28:22+00:00

I was using a downloaded PHP template, and when I was well into manipulating

  • 0

I was using a downloaded PHP template, and when I was well into manipulating it, I realize part of it had been encrypted in what appears to be base64.

I tried a few online converts, with little luck.

I have this bit of code, followed by a ton of random characters outside the <? ?> tags:

<?$OOO0O0O00=__FILE__;$O00O00O00=__LINE__;$OO00O0000=3804;eval((base64_decode('JE8wMDBPME8wMD1mb3BlbigkT09PME8wTzAwLCdyYicpO3doaWxlKC0tJE8wME8wME8wMClmZ2V0cygkTzAwME8wTzAwLDEwMjQpO2ZnZXRzKCRPMDAwTzBPMDAsNDA5Nik7JE9PMDBPMDBPMD0oYmFzZTY0X2RlY29kZShzdHJ0cihmcmVhZCgkTzAwME8wTzAwLDM3MiksJzNzYWZaakc1NEhGcU1kTEFPZzl3Ykl6UFIvcGxLOCs3ZVVjeFFCV21ZMXVTNk5Ycmh2RENudDBFMlRvSmtWaXk9JywnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLycpKSk7ZXZhbCgkT08wME8wME8wKTs=')));return;?>

I was able to decode it into this:

$O000O0O00=fopen($OOO0O0O00,'rb');while(--$O00O00O00)fgets($O000O0O00,1024);fgets($O000O0O00,4096);$OO00O00O0=(base64_decode(strtr(fread($O000O0O00,372),'3safZjG54HFqMdLAOg9wbIzPR/plK8+7eUcxQBWmY1uS6NXrhvDCnt0E2ToJkViy=','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/')));eval($OO00O00O0);

However, below that I have this code:

http://pastebin.com/Z2uMwS9C

I have no clue how to convert it. Any ideas? I think the segments of code are too long – I tried to use Notepad++ to convert it, and it basically said it was too long.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T23:28:23+00:00Added an answer on May 18, 2026 at 11:28 pm

    Here’s my decompressed version of what we have so far:

    <?php
    /* In the original file, this is __FILE__
       and __LINE__. I've hardcoded them in this
       script so that we can refer to the original
       file when actually running what follows. */
    $this_file = 'original_file.php';
    $this_line = 1; // originally __LINE__
    
    /* Prepare the original script to be read */
    $this_file_handle = fopen($this_file, 'rb');
    
    /* Move the file cursor past the block of PHP */
    while(--$this_line) {
      fgets($this_file_handle,1024);
    }
    
    /* Move the file cursor just a wee bit more,
       presumably to where the other data starts. */
    fgets($this_file_handle,4096);
    
    /* Read in the remaining data, run it through
       a character replacing function
       (3 --> A, s --> B, etc.), and base64-decode
       the result. */
    $probably_malicious_code = (
      base64_decode(
        strtr(
          fread($this_file_handle,372),
          '3safZjG54HFqMdLAOg9wbIzPR/plK8+7eUcxQBWmY1uS6NXrhvDCnt0E2ToJkViy=',
          'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
        )
      )
    );
    
    /* Run the probably-evil code. */
    eval($probably_malicious_code);
    

    If we use echo instead of eval at the last line, we get this, a third level of obfuscation.

    I N C E P T I O N

    Here’s a script that’s equivalent to what’s going on at Level 3:

    <?php
    /* Pulled in from level 1: */
    $this_file = 'original_magic.php'; // originally __FILE__, refers to original file
    $this_line = 1; // originally __LINE__
    $level_three_read_amount = 3804;
    
    /* Pulled in from level 2: */
    $this_file_handle = fopen($this_file, 'rb');
    
    while(--$this_line) {
      fgets($this_file_handle,1024);
    }
    
    fgets($this_file_handle,4096);
    
    /* Level 3 decoding: */
    $level_three_code = ereg_replace(
      '__FILE__',
      "'".$this_file."'", //
      base64_decode(
        strtr(
          fread($this_file_handle, $level_three_read_amount),
          '3safZjG54HFqMdLAOg9wbIzPR/plK8+7eUcxQBWmY1uS6NXrhvDCnt0E2ToJkViy=',
          'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
        )
      )
    );
    
    fclose($this_file_handle);
    eval($level_three_code);
    

    Echoing instead of evaluating the last line this time produces something close to our final effect:

    global $traction; ;echo '   </div><!--end main-->
        <div id="main-bottom"></div>
    </div><!--end wrapper-->
    <div id="footer">
        <div class="wrapper clear">
            <div id="footer-about" class="footer-column">
                '; if ($traction->footerAboutState() == 'true') : ;echo '               <ul>
                        '; if ( !function_exists('dynamic_sidebar')|| !dynamic_sidebar('footer_sidebar_3') ) : ;echo '              <li class="widget widget_categories">
                                <h2 class="widgettitle">'; _e('Categories'); ;echo '</h2>
                                <ul>
                                    '; wp_list_cats('sort_column=name&hierarchical=0'); ;echo '                 </ul>
                            </li>
                        '; endif; ;echo '           </ul>
                '; else : ;echo '               <h2>'; _e( 'About', 'traction' ); ;echo '</h2>
                    '; if ($traction->footerAbout() != '' ) : ;echo '                   '; echo $traction->footerAbout(); ;echo '               '; else : ;echo '               <p>'; _e("Did you know you can write your own about section just like this one? It's really easy. Head into the the <em>Traction Options</em> menu and check out the footer section. Type some stuff in the box, click save, and your new about section shows up in the footer.", "traction"); ;echo '</p>
                    '; endif; ;echo '           '; endif; ;echo '       </div>
            <div id="footer-middle" class="footer-column">
                '; if ( is_active_sidebar( 'footer_sidebar' ) ) echo "<ul>" ;echo '             '; if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( 'footer_sidebar' ) ) : ;echo '           <ul>
                            <li class="widget">
                                <h2 class="widgettitle">'; _e( 'Pages' ); ;echo '</h2>
                                <ul>
                                    '; wp_list_pages( 'depth=0&title_li=' ); ;echo '                        </ul>
                            </li>
                        </ul>
                    '; endif; ;echo '           '; if ( is_active_sidebar( 'footer_sidebar' ) ) echo "</ul>" ;echo '        </div>
            <div id="footer-search" class="footer-column">
                '; if ( is_active_sidebar( 'footer_sidebar_2' ) ) echo "<ul>" ;echo '               '; if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( 'footer_sidebar_2' ) ) : ;echo '         <h2>'; _e( 'Search', 'traction' ); ;echo '</h2>
                        '; if (is_file(STYLESHEETPATH . '/searchform.php' )) include (STYLESHEETPATH . '/searchform.php' ); else include(TEMPLATEPATH . '/searchform.php' ); ;echo '                '; endif; ;echo '           '; if ( is_active_sidebar( 'footer_sidebar_2' ) ) echo "</ul>" ;echo '      </div>
        </div><!--end wrapper-->
    </div><!--end footer-->
    <div id="copyright" class="wrapper">
        <p class="credit">Powered by <a href="http://www.free-premium-wordpress-themes.com" rel="dofollow">Free Premium WordPress Themes</a> and <a href="http://thethemefoundry.com">The Theme Foundry</a></p>
        <p>Copyright &copy; '; echo date
    

    It’s a bit cut off for some reason, but it looks like the idea is just to include copyright while making it ridiculously difficult for you to find it. This is sketchy business; remove this code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a PHP application I downloaded, and it is half working on
I have downloaded php-sdk for using facebook in php. I also created facebook application
I'm looking into using Eclipse as a dev environment for PHP projects, but it's
I have been using Dojo hosted on Google's CDN. I just downloaded the development
Yesterday I tried implementing jScrollPane on a resultsSuccess.php template and wasn't able to get
I am new to using the salesforce api. I have downloaded the saleforce/php toolkit
I tried to install APC on my wamp(PHP 5.3.10/Apache2.2.21). OS which i`m using is
I have been trying to force images to download using PHP Headers but there
I have been using the Eclipse platform for Java, javaEE, c++, python and PHP
I am using Symfony 1.4 as PHP framework, with Propel as ORM. I downloaded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.