Decode Encrypted WooTheme WordPress Themes
For reasons unknown, some dumb ass at WooThemes decided to encode certain files in their themes. This mainly concerns the footer.php with links (read: spam) to WooThemes and the index.php which calls the footer.php as an include. Luckily the coding was done by some 12 year old coding amateur, so I got around it in about 10 minutes. Below are the instructions how to decode the WooTheme files. I’ll be using one of the footer.php themes as an example, but this works for any file that’s been “lame-ass-encoded”.
The “encryption” consist of base64 encoding the actual page, replacing some characters in the resulting code, again base64 encoding the code needed to decode the first part and finally using a simple php reversed function to call the base4 decoding routine. Below is how to permanently reverse the process. For this you need a code-editor (obviously) and a running WordPress installation that holds the theme you want to un-encode.
First step is to remove the 90’s technique of putting the entire code on one line which makes it hard to read and is most probably done so people won’t notice that there are actually two encoded parts and will fail when trying to use a base64 decoder on the first part. Just use find-and-replace in your favorite editor and replace every ; with a ; followed by a return-code. If you don’t know how to enter a carriage-return as a replacement string, just manually hit enter after every ; since there aren’t that many. Your file should now have three clearly distinguishable parts (apart from the php opening and closing tags):
<?php $_F=__FILE__;
$_X='Pz4JPGQ0diBjbDFzcz0iY2w1MXIiPjwvZDR2Pg0KCQ0KCTxkNHYgNGQ9Im...
eval(base64_decode('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF... ?>
$_F will be assigned the name of the script being executed, in this case footer.php $_X will hold the actual final code. It LOOKS base64 encoded, but some part are replaced so that standard base64 decoding routines will break on it and the person trying to decode will think it’s not base64 at all and just give up. (At least I think that’s the idea behind this amateur protection.) The part inside the Anyhow, we first need to know the code in the third line that will decode the part in the second line. For this, you can use just any plain online base64 decoder. I used this one, but any base64 decoder will do. Just copy the entire string between the two quotes (’) in the third line, paste in into the decoder and decode. In this example, it will return a single line of php code: $_X=base64_decode($_X);$_X=strtr($_X,’123456aouie’,’aouie123456?);$_R=ereg_replace(’__FILE__’,”‘”.$_F.”‘”,$_X);eval($_R);$_R=0;$_X=0; Just do the find-and-replace trick again so make it more readable, and you’ll end up having:
$_X=base64_decode($_X); $_X=strtr($_X,'123456aouie','aouie123456');
$_R=ereg_replace('__FILE__',"'".$_F."'",$_X); eval($_R); $_R=0;
$_X=0;
As you can see (or maybe not) this routine will alter the code in $_X and put a resulting string in $_R. It is beyond the scope of this topic to dive in to deep about the actual how and what, if you need more info, read the php manual. Just replace the entire third line of code in your .php file (eval(base64_decode(‘JF9YPWJhc2U2NF9k…) with the code above. The result will be something like:
<?php $_F=__FILE__;
$_X='Pz4JPGQ0diBjbDFzcz0iY2w1MXIiPjwvZDR2Pg0KCQ0KCTxkNHYgNGQ9Im...
$_X=base64_decode($_X); $_X=strtr($_X,'123456aouie','aouie123456');
$_R=ereg_replace('__FILE__',"'".$_F."'",$_X); eval($_R); $_R=0;
$_X=0;
?>
At this point, your page will still look the same. The only thing we did so far is decode the routine that is needed to decode the actual page.
Finally, we need to know the resulting code of the page, so instead of parsing it through our php engine, we need to just echo it. Therefore we need to replace theeval part (which will execute the contents of a string as plain php code) with a simple echo command. To make it easier to find the code in our final page output, you might want to add some starting and ending markers that are unlikely to appear anywhere else in the page and are easy to find. The example resulting code could be something like this:
<?php $_F=__FILE__;
$_X='Pz4JPGQ0diBjbDFzcz0iY2w1MXIiPjwvZDR2Pg0KCQ0KCTxkNHYgNGQ9Im...
$_X=base64_decode($_X) $_X=strtr($_X,'123456aouie','aouie123456');
$_R=ereg_replace('__FILE__',"'".$_F."'",$_X); echo 'startcode->'.
$_R.'<-endcode'; $_R=0; $_X=0; ?>
Save this final result and (re)load your WordPress site. You’ll notice the page looks messed up, that’s okay for now. Use your browser to search for the starting tag you made up in the SOURCE of your page, NOT the displayed page in your browser. Use “view source” or whatever command your browser uses to look at the actual code of a page. In this example, look for “startcode->” and copy the entire contents up till the endcode you made up. This will be the final code that you can use to replace the entire encoded page. WordPress might have added an additional php closing tag (”?>”) at the start of this code, which you should of course delete.
Any questions left? Just ask!
Happy hacking!
evalcommand IS base64 encoded and holds additional “programming” to correctly decode the first part. Since this part was originally at the end of a very long line, the braindead person who made this up probably figured noone would bother to look any further than one screen wide, or just blindly jump to the end of the line and assume that the base64 string was just one long piece rather than two parts.
For reasons unknown, some dumb ass at WooThemes decided to encode certain files in their themes. This mainly concerns the footer.php with links (read: spam) to WooThemes and the index.php which calls the footer.php as an include. Luckily the coding was done by some 12 year old coding amateur, so I got around it in about 10 minutes. Below are the instructions how to decode the WooTheme files. I’ll be using one of the footer.php themes as an example, but this works for any file that’s been “lame-ass-encoded”.
The “encryption” consist of base64 encoding the actual page, replacing some characters in the resulting code, again base64 encoding the code needed to decode the first part and finally using a simple php reversed function to call the base4 decoding routine. Below is how to permanently reverse the process. For this you need a code-editor (obviously) and a running WordPress installation that holds the theme you want to un-encode.
First step is to remove the 90’s technique of putting the entire code on one line which makes it hard to read and is most probably done so people won’t notice that there are actually two encoded parts and will fail when trying to use a base64 decoder on the first part. Just use find-and-replace in your favorite editor and replace every ; with a ; followed by a return-code. If you don’t know how to enter a carriage-return as a replacement string, just manually hit enter after every ; since there aren’t that many. Your file should now have three clearly distinguishable parts (apart from the php opening and closing tags):
<?php $_F=__FILE__;
$_X='Pz4JPGQ0diBjbDFzcz0iY2w1MXIiPjwvZDR2Pg0KCQ0KCTxkNHYgNGQ9Im...
eval(base64_decode('JF9YPWJhc2U2NF9kZWNvZGUoJF9YKTskX1g9c3RydHIoJF... ?>
$_F will be assigned the name of the script being executed, in this case footer.php $_X will hold the actual final code. It LOOKS base64 encoded, but some part are replaced so that standard base64 decoding routines will break on it and the person trying to decode will think it’s not base64 at all and just give up. (At least I think that’s the idea behind this amateur protection.)
The part inside theevalcommand IS base64 encoded and holds additional “programming” to correctly decode the first part. Since this part was originally at the end of a very long line, the braindead person who made this up probably figured noone would bother to look any further than one screen wide, or just blindly jump to the end of the line and assume that the base64 string was just one long piece rather than two parts.
Anyhow, we first need to know the code in the third line that will decode the part in the second line. For this, you can use just any plain online base64 decoder. But any base64 decoder will do. Just copy the entire string between the two quotes (’) in the third line, paste in into the decoder and decode. In this example, it will return a single line of php code:
$_X=base64_decode($_X);$_X=strtr($_X,’123456aouie’,’aouie123456?);
$_R=ereg_replace(’__FILE__’,”‘”.$_F.”‘”,$_X);eval($_R);$_R=0;$_X=0;
Just do the find-and-replace trick again so make it more readable, and you’ll end up having:
$_X=base64_decode($_X); $_X=strtr($_X,'123456aouie','aouie123456');
$_R=ereg_replace('__FILE__',"'".$_F."'",$_X); eval($_R); $_R=0;
$_X=0;
As you can see (or maybe not) this routine will alter the code in $_X and put a resulting string in $_R. It is beyond the scope of this topic to dive in to deep about the actual how and what, if you need more info, read the php manual. Just replace the entire third line of code in your .php file (eval(base64_decode(‘JF9YPWJhc2U2NF9k…) with the code above. The result will be something like:
<?php $_F=__FILE__;
$_X='Pz4JPGQ0diBjbDFzcz0iY2w1MXIiPjwvZDR2Pg0KCQ0KCTxkNHYgNGQ9Im...
$_X=base64_decode($_X); $_X=strtr($_X,'123456aouie','aouie123456');
$_R=ereg_replace('__FILE__',"'".$_F."'",$_X); eval($_R); $_R=0;
$_X=0;
?>
At this point, your page will still look the same. The only thing we did so far is decode the routine that is needed to decode the actual page.
Finally, we need to know the resulting code of the page, so instead of parsing it through our php engine, we need to just echo it. Therefore we need to replace theevalpart (which will execute the contents of a string as plain php code) with a simple echo command. To make it easier to find the code in our final page output, you might want to add some starting and ending markers that are unlikely to appear anywhere else in the page and are easy to find. The example resulting code could be something like this:
<?php $_F=__FILE__;
$_X='Pz4JPGQ0diBjbDFzcz0iY2w1MXIiPjwvZDR2Pg0KCQ0KCTxkNHYgNGQ9Im...
$_X=base64_decode($_X) $_X=strtr($_X,'123456aouie','aouie123456');
$_R=ereg_replace('__FILE__',"'".$_F."'",$_X); echo 'startcode->'.
$_R.'<-endcode'; $_R=0; $_X=0; ?>
Save this final result and (re)load your WordPress site. You’ll notice the page looks messed up, that’s okay for now. Use your browser to search for the starting tag you made up in the SOURCE of your page, NOT the displayed page in your browser. Use “view source” or whatever command your browser uses to look at the actual code of a page. In this example, look for “startcode->” and copy the entire contents up till the endcode you made up. This will be the final code that you can use to replace the entire encoded page. WordPress might have added an additional php closing tag (”?>”) at the start of this code, which you should of course delete.
It will pleased me to help you and if you make any donation to support me. Any questions left? Just ask!
Happy hacking!
Credit : http://adf.ly/2QCDn
Incoming search terms:- x=strtr($_x ’123456aouie’ ’aouie123456’);
- decode songs encryption
- woo settings encode decode
- woo theme base64
- wootheme base64
- woothemes base64
- woothemes base64_decode
- woothemes footer php decode
- wordpress changing woo theme
- wordpress encryption decoder

Phil Kiel
November 24, 2009 at 5:44 pmHi, I got stuck, any chance you can decode the file for me? Thanks
HaRd_sToNe
November 25, 2009 at 1:27 pmYes sure. Please send me your file in my email info@santosharyal.com.np
Chris Homan
November 28, 2009 at 5:46 amI got stuck too. Any chance for a second decoding? I will send you my file to the above address.
Chris Homan
November 28, 2009 at 8:31 amJust got it, Brilliant! Will this trick work for me in the future, or is this sort of thing unique to those guys at Woo..?
Per Jespersen
November 29, 2009 at 1:23 amHello, i tried to decode it but somehow it fails, Can u ninja u to do it? its for Busy Bee Theme, the footer :)? Thanks :)
Phil Kiel
November 30, 2009 at 7:55 pmHi, Did you get a chance to decode the file? Thanks Phil
HaRd_sToNe
December 1, 2009 at 10:30 pmLet me check my email now. I will try to decode the files you send to me. If got successed shall send back to you.
HaRd_sToNe
December 1, 2009 at 10:34 pmFriends its not too hard to decode. Please try it once. This technique is for the base64 encoding.
randy
December 11, 2009 at 7:11 pmthe colors on this blog isn't very good for reading
THrEe OraNgEs
December 12, 2009 at 3:02 pmI really appreciate you posting this info. As it turns out, however, even after trying for hours I can't get it to work on the footer.php file I have. It appears to be encrypted a little differently. After the initial base_64 decode of line 3, the result don't look anything like those shown in your instructions. Care to take a look? Let me know if you can, but thanks either way.
HaRd_sToNe
December 13, 2009 at 2:47 pmThis is a technique to decode base_64 encryption. I have found many examples of base_64 encoding. This above tutorial is an example of base_64 decoding which works suitable on woo themes but if you have other themes with base_64 encoding please follow the techniques to decode the base_64 encoding. I hope it will work. And friends about color, i will change it.
THrEe OraNgEs
December 14, 2009 at 8:31 amHi again, I should have been clearer, sorry. The footer.php file I am working on IS from a WOO theme, and I am trying the method you laid out above to the letter. But I cannot get past the second step because the results of decoding line 3 do not match what you got; there are still eval(base64_decode) elements mixed in it and the X$ are all series of "lllllllllllll" and so on. Would love to send it to you so you can see it if you want :-) Thanks either way.
HaRd_sToNe
December 15, 2009 at 1:17 pmYes it will be best if you send me your footer.php file. I shall review on it.
THrEe OraNgEs
December 20, 2009 at 8:36 amGreat! Can you send me an email I may reply to with the file attached? Many thanks.
HaRd_sToNe
December 26, 2009 at 12:53 pmokey man...contact me at info@santosharyal.com.np
THrEe OraNgEs
December 28, 2009 at 8:38 amSent you the file...can't wait to see what you think. Thank you thank you thank you!
charlotte
January 9, 2010 at 6:59 pmThis suit and tie theme's footer, its encrypted, can you please un crypt the file thank you so much. ----------------------------------------------------
charlotte
January 11, 2010 at 4:33 amI emailed you and sent you my theme suit and tie hope you can help and god bless. I envy you for your knowledge I have yet to figure this out its really frustrating.
HaRd_sToNe
January 11, 2010 at 12:56 pmIts made....Please check your email.
Mark
January 13, 2010 at 10:57 pmMan, I'm a really tech-savvy person, especially when it comes to web dev and WordPress, but this is a bit beyond me. I still can't get it to work, but I appreciate you trying to share the info.
HaRd_sToNe
January 14, 2010 at 5:58 pmya sure...
Min
February 5, 2010 at 3:55 pmOh wow. You're very brilliant. I tried this twice and I'm still not able to get the source code when I reload it to wordpress. The "startcode->" and "<-endcode" never comes up when I view the source code. Maybe more than one file is encoded? I always get messed up in that part. =( Can you adjust it for me? I will e-mail you the wootheme.
Min
February 6, 2010 at 1:15 pmActually, nevermind! I just did it! Haha. Thanks a lot for this post.
HaRd_sToNe
February 6, 2010 at 8:04 pmokey its great then.
Hamid
February 15, 2010 at 1:33 amHey there... u r a genius! it was great; however, I couldn't do the last step! i copy & pasted the code in source between startcode and endcode into footer.php ; but it says: Parse error: syntax error, unexpected '<' in /home/thegazet/public_html/wp-content/themes/mortar/footer.php on line 3 shall I keep anything from the original code? and, there are some in the source code which I can't find in style.css ... is that okay?!
HaRd_sToNe
February 16, 2010 at 8:48 amIt is syntax error. the footer.php is an encoded file. I think there is syntax error on the original script. please check the script once or send to me.
Wakk3r
March 30, 2010 at 8:17 pmHi man, thank for your post! I have use your code for decrypt my source but when I save "decode.php" and I run it I see an other crypted code like this: startcode->?> f f<?MXM RN ( $MAg=d f f f This code is like a rot13 encrypted text. Can you help me?
HaRd_sToNe
March 31, 2010 at 12:17 pmMay be I should try. Could you please send me your themes in my email.
Wakk3r
April 1, 2010 at 7:03 pmmmh where is your mail? :/
Wakk3r
April 1, 2010 at 7:07 pmoh right, I have found your mail. I have sent index.php Thanks
nuwan
August 14, 2010 at 5:50 pmhellow, i think you can do this. I’ve got some encoded code form a WP theme and i want to decode it. but unfortunately I cant do this with my code…( i think it’s my understand problem ) Can You Help me…??? please send mail to me.. plz plz I’m waiting 4 u. thanks
Moron
October 9, 2010 at 8:34 amCan you help? It's not working for me!
Moron
October 9, 2010 at 8:47 amFollow my url if you can help. I tried following your instructions but am not having any luck. It's a damn woo theme. Thanks!
Erhan
October 22, 2010 at 2:13 pmGreat explications, Thank you verynuch for sharing. Done within 30 minutes. Regards
admin
October 31, 2010 at 11:48 amThanks for your comments.
admin
October 31, 2010 at 11:54 amif you are getting more problem...send me ur footer file.
Anto
November 3, 2010 at 9:26 pmI need your help, man! I followed your instructions but it seems that new WooThemes changed their encoding. I will send you the footer file via email also, and hope you can do something :) http://complaint.es/footer.rar Thanks from Spain!
Nararya
December 21, 2010 at 10:13 pmhow about php-crypt.com, how to decode this encrypted source ?
admin
December 24, 2010 at 5:31 pm@ anto please send me your footer file in my email.. @ Naraya php-crypt.com is advance encryption service. They use their own encryption algorithm to encode the scripts...mail me for more information.
admin
December 24, 2010 at 5:35 pm@ Anto Can you please send me the full theme file in my email.
john
March 19, 2011 at 12:26 ami have a different file.. damn woothemes is giving me a headache please decode this one for me.
admin
April 11, 2011 at 11:16 amSend me your file...let me check
laurence
April 4, 2011 at 6:02 ami know this is a very old post, but maybe you can help, i'm getting this error on my wootheme template File checksum error: footer.php Little help?
admin
April 11, 2011 at 11:16 amSend me ur file in my email
kelly
June 1, 2011 at 6:17 pmhi, thanks for posting this. But I can't seem to get it work for my installed woo theme "delegate" , can you please help?
admin
June 21, 2011 at 1:14 pmOffcourse Kelly... please send me ur file..