Help with Base_64 Decode in footer.php WP Theme

6 replies
I've been trying to figure this out for a few hours
but can't find a solution.

I came across a free WP theme that I would like to try.

However, it has some encrypted code in the footer.

I was able to decode it but am having problems putting the
decrypted code together. Syntax errors; I don't know the
proper format.

It screws the footer up.

Also, the decrypted code looks safe but I'm not 100% sure.

Anyway, I will post it here.

The complete footer page is as follows:

<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
?>
<!-- Footer -->
<?php $blog_title = get_bloginfo('name'); ?>
<?php

$footerprint = base64_decode("PGRpdiBpZD0iZm9vdGVyIj4KICA8ZGl2IGlkPSJmb290ZXJkYX JrIj4KICAgIDxwPgogICAgICA8c2NyaXB0IHR5cGU9InRleHQv amF2YXNjcmlwdCIgbGFuZ3VhZ2U9IkphdmFTY3JpcHQiPjwhLS 0KCnZhciB0b2RheSA9IG5ldyBEYXRlKCk7Cgpkb2N1bWVudC53 cml0ZSh0b2RheS5nZXRGdWxsWWVhcigpKTsKCi8vLS0+PC9zY3 JpcHQ+ICZjb3B5Ow==")." ".$blog_title.base64_decode

("IDxwPlBvd2VyZWQgYnkgPGEgaHJlZj0iaHR0cDovL21hdHRzbW Fya2V0aW5nYmxvZy5jb20iPkFmZmlsaWF0ZSBNYXJrZXRpbmcg QmxvZzwvYT48L3A+CiAgPC9kaXY+CjwvZGl2Pgo8IS0tIGZvb3 RlciBjbG9zZSAtLT4KPGRpdiBjbGFzcz0iY2xlYXJlciI+PC9k aXY+CjxkaXYgaWQ9ImNyZWRpdCI+IDxzcGFuPjwvc3Bhbj4gPC 9kaXY+CjwvZGl2Pgo8IS0tIEVuZCBGb290ZXIgLS0+CjwvZGl2 Pgo8IS0tIHdyYXAgY2xvc2UgLS0+CjwvZGl2Pgo8IS0tIHNoYW RvdyBjbG9zZSAtLT4KPC9kaXY+CjwvZGl2Pgo8IS0tIGJnd3Jh cHBlciBjbG9zZSAtLT4KPC9ib2R5PjwvaHRtbD4=");
echo $footerprint;
?>


For the section of code in red I got the following; once decrypted:

<div id="footer">
<div id="footerdark">
<p>
<script type="text/javascript" language="JavaScript"><!--

var today = new Date();

document.write(today.getFullYear());

//--></script> &copy;

And this is the result for blue highlight:

<p>Powered by <a href="http://mattsmarketingblog.com">Affiliate Marketing Blog</a></p>
</div>
</div>
<!-- footer close -->
<div class="clearer"></div>
<div id="credit"> <span></span> </div>
</div>
<!-- End Footer -->
</div>
<!-- wrap close -->
</div>
<!-- shadow close -->
</div>
</div>
<!-- bgwrapper close -->
#base64 #base64decode #decode #footerphp #theme
  • Profile picture of the author aesoft
    Originally Posted by K. Rondo View Post

    I was able to decode it but am having problems putting the
    decrypted code together. Syntax errors; I don't know the
    proper format.

    It screws the footer up.
    What type of error message? Do you have a URL to view it?
    {{ DiscussionBoard.errors[2634225].message }}
    • Profile picture of the author K. Rondo
      When everything is encrypted the footer looks fine.
      It has the usual link to the owners site, like most
      free themes have. But I don't know what other
      instructions are there. It looks legit, though.

      After I decrypt the code, I copy/paste the results where
      I think they should go. But there are syntax errors.
      Parse error: syntax error, unexpected '<' on line 11.

      This seems like something minor but I don't know any code.

      ================
      <?php
      /**
      * @package WordPress
      * @subpackage Default_Theme
      */
      ?>
      <!-- Footer -->
      <?php $blog_title = get_bloginfo('name'); ?>
      <?php
      =================

      The above portion of the code is okay, I think

      so everything after that (see OP) I copy and past with this
      (the decoded versions of the red and blue sections)

      <div id="footer">
      <div id="footerdark">
      <p>
      <script type="text/javascript" language="JavaScript"><!--

      var today = new Date();

      document.write(today.getFullYear());

      //--></script> &copy;

      <p>Powered by <a href="http://mattsmarketingblog.com">Affiliate Marketing Blog</a></p>
      </div>
      </div>
      <!-- footer close -->
      <div class="clearer"></div>
      <div id="credit"> <span></span> </div>
      </div>
      <!-- End Footer -->
      </div>
      <!-- wrap close -->
      </div>
      <!-- shadow close -->
      </div>
      </div>
      <!-- bgwrapper close -->
      {{ DiscussionBoard.errors[2634400].message }}
      • Profile picture of the author twb
        Directly above your second line of ==============
        you have an open <?php tag but are not closing it. I would delete that <?php and see if that solves the current error message.
        {{ DiscussionBoard.errors[2634553].message }}
        • Profile picture of the author K. Rondo
          Originally Posted by twb View Post

          Directly above your second line of ==============
          you have an open <?php tag but are not closing it. I would delete that <?php and see if that solves the current error message.
          You spotted the problem.

          It worked perfectly.

          I don't know anything about programming but I did know that this was
          a very small mistake because I was doing everything in a logical
          manner.

          Computer programming is based on logic.

          If you don't mind.

          Can you tell me if the above code poses any threats to my blog.

          Like I said I don't know any programming but what exactly is this.

          ========
          <script type="text/javascript" language="JavaScript"><!--

          var today = new Date();

          document.write(today.getFullYear());
          ========

          It looks like something that pulls up the current date + something
          else that I can't identify.
          {{ DiscussionBoard.errors[2634596].message }}
          • Profile picture of the author twb
            It looks like it is writing out a date and the copyright symbol. I don't see any harm from the code you have posted. Actually just the year and the copyright symbol.
            {{ DiscussionBoard.errors[2634616].message }}
            • Profile picture of the author K. Rondo
              Thanks.

              I just looked up the code and that's what
              Google said.

              You saved me a lot of time because I was about to
              try stuff that would've taken awhile because I've never
              done them before.

              Peace
              {{ DiscussionBoard.errors[2634644].message }}

Trending Topics