Need help removing encoded footer in wp theme

workplay

Junior Member
Joined
Dec 2, 2011
Messages
122
Reaction score
27
Hi,

I downloaded a wp theme but it won't let me edit/remove the footer.

I believe there's some code in function.php and footer.php to prevent people from making any changes.

When I edit footer.php, I get this message:

"All the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way."

I've attached the php files here.

I've tried to do it on my own by researching but no avail... any help will be much appreciated! :batman:
 

Attachments

i don't have time to go in there myself, however most footers can be decoded by googling "decode base64" -that's how they're usually encrypted in my personal experience

some people like to really complicate things and encode multiple layers of base64 and different parts of it just to be difficult... but if a browser can read it you should be able to.
 
Thanks for the replies guys!

I copied and pasted function.php onto that website and it gives me this error "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters."
 
That line is in the functions file.... Search for "intact."

You should be able to edit everything inside the echo to whatever you want.. Like this:
Code:
if (!empty($_REQUEST["theme_license"])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST["theme_license"])) { $theme_license_false = get_bloginfo("url") . "/index.php?theme_license=true"; echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_license_false\">"; exit(); } else { echo ("<p style=\"padding:20px; margin: 20px; text-align:center; border: 2px dotted #0000ff; font-family:arial; font-weight:bold; background: #fff; color: #0000ff;\">All the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way.</p>"); } }

Instead:
Code:
if (!empty($_REQUEST["theme_license"])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST["theme_license"])) { $theme_license_false = get_bloginfo("url") . "/index.php?theme_license=true"; echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_license_false\">"; exit(); } else { echo ("EITHER LEAVE THIS BLANK OR WRITE SOMETHING THAT YOU WANT IN THE FOOTER."); } }

Also... It's not base64 like usual encoded footers, it's not even really encoded. The functions file just has a line that runs a command... If the license is not present, and the footer links are deleted... Then write some stupid crap about not deleting the links. Clever, but meh..
 
Last edited:
That line is in the functions file.... Search for "intact."

You should be able to edit everything inside the echo to whatever you want.. Like this:

Also... It's not base64 like usual encoded footers, it's not even really encoded.



I tried that method and replaced the code in the function.php with yours.

After I updated function.php.. when I make a change in footer.php and load the website, it's just blank screen and hangs at "domain/index.php?theme_ lcense=true"
 
Try removing that entire command.

Delete everything from "if" to "in any way.</p>");} }"

Then see if you can edit the footer.

THIS:
if (!empty($_REQUEST["theme_license"])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST["theme_license"])) { $theme_license_false = get_bloginfo("url") . "/index.php?theme_license=true"; echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_license_false\">"; exit(); } else { echo ("<p style=\"padding:20px; margin: 20px; text-align:center; border: 2px dotted #0000ff; font-family:arial; font-weight:bold; background: #fff; color: #0000ff;\">All the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way.</p>"); } }
 
Try removing that entire command.

Delete everything from "

Then see if you can edit the footer.

THIS:

When I do that, it gives me this error when loading the page:

"Fatal error: Call to undefined function wp_initialize_the_theme_message() in /public_html/domain/wp-content/themes/Mytheme/functions.php on line 167"
 
PHEW!! Good grief, that was a pain. No wonder this guy lets you use his themes for free..

Anyways, here you are.

FOOTER: http://www.mediafire.com/?yaweo87i0g7cuqq
HEADER: http://www.mediafire.com/?x1kkwb82y40m14p
FUNCTIONS: http://www.mediafire.com/?qexgrq1aofkxfm1

A little explanation... The theme (in the header) runs a function to check for a license. If there's no license, it checks for the footer links. If the footer links are missing, it displays an error.

But it went one more beyond that, if you happened to remove the line (like I suggested) that checked for footer links, it also ran a command to check the filesize of the footer.php, if that did not match. Poof.
 
PHEW!! Good grief, that was a pain. No wonder this guy lets you use his themes for free.

Meatro, kudos to you Bro.; that was totally awesome!!!!

I'd give you another REP but the MAN says my tank is currently empty.
 
NP, any time (within reason) :P. Glad to help. :)

http://www.mediafire.com/?u2g6duacrtorsgp
http://www.virustotal.com/file-scan/report.html?id=82a16aa1cefc77af91ff5cb7dbf5e11e9f70afed22ace861072349da101cbeca-1325992578

(Not sure what the false positive is about, this is the original file downloaded from the creator (newwpthemes.com/download/my-hobby-278.zip) with 2 lines removed from the functions file and one from the footer file.)

Removed from functions file:
Code:
if (!empty($_REQUEST["theme_license"])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST["theme_license"])) { $theme_license_false = get_bloginfo("url") . "/index.php?theme_license=true"; echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_license_false\">"; exit(); } else { echo ("<p style=\"padding:20px; margin: 20px; text-align:center; border: 2px dotted #0000ff; font-family:arial; font-weight:bold; background: #fff; color: #0000ff;\">All the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way.</p>"); } }
&
Code:
else { $l = 'Designed by: <a href="http://allpremiumthemes.com">All Premium Themes</a>. | Find the <a href="http://allpremiumthemes.com">Premium WordPress Themes</a> online, <a href="http://allpremiumthemes.com">best wordpress themes</a> and <a href="http://freewpthemes.co">Free WordPress Themes</a>'; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 || preg_match("/<\!--(.*" . $lp . ".*)-->/si", $c) || preg_match("/<\?php([^\?]+[^>]+" . $lp . ".*)\?>/si", $c) ) { wp_initialize_the_theme_message(); die; } }
(Just replace that entire function with this:.. easier)
Code:
function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } } wp_initialize_the_theme_finish();

Removed from footer:
Code:
 | Designed by: <a href="http://allpremiumthemes.com">All Premium Themes</a>. | Find the <a href="http://allpremiumthemes.com">Premium WordPress Themes</a> online, <a href="http://allpremiumthemes.com">best wordpress themes</a> and <a href="http://freewpthemes.co">Free WordPress Themes</a>
 
Last edited:
meatro,

you're awesome! check ur PM :batman:
 
Back
Top