decode/encode

ChatIndia

Community Advocate
Community Support
Messages
1,408
Reaction score
30
Points
48
Code:
<?php

eval(gzinflate(base64_decode('FZVFsoRaokWHU+8FDUic+C0kcXfoVODummf0/9YIdsTaVt3Z+E8Durkes7P6J8+OisT/W1bFUlb//EdIQ1nY3IRtIhthwq4JGPYuVMp/tBo4/W0nAwWXDje33svr2M9XCpgpT+uTshWR0gdWHDadQx2wqg62LXtQPO+QifC8irJlp9w6gTy7iYbsAbg3FxoQ7XQaeIeWj7B9XR8va1Jgd0QUfmfgLH3vD70ThdWUhkHDdNnYi6XlEuIEKAgYNOaU4WucovfE4fNlUprpIWtdaNmLdirxhulqDJw4aVakl5PIGJVXunE8q8AWvCxgi4D8uNrYr/qd1nv4M00qXM1jPOkifQ/OSlLmeR8VwC06qLwUw+qhpAoTogYGJa5XEy1rWBmGqwSbgSwCOeVeT16mbRcLzfzNH/60/X11dUzzyE/UDtj4KeBxnrHz7C0XPb02J4huDAq5FC+C9VfP2An0LelNY9tLQDMVKgf2jtyAQCDWv5wV1UmIknvoGmuRANNKR/H8SAzs3BenbJtPjpndFlv0Zfw61VqZHgVP0RW4fzyvtFIqQlEl/17B3BwmVHDD2W6mV6tr58D4VxbYh4f+sMSNFsrlj8raYcT8nY/d2AgLNlGxak3JV+FU76hM7qH0gkf3ATlp4lNyjP2LMpejl754Zlko9qLypGzU1tn1Y//tY6KKmbjmZksmz1sajRAMJNenKwyIDvNjsfQ6Ii3XhnQ8Pnofk/EnYr94MkbO5MvV+SxSMyNX842Z3MxvrHLmgUWAttXOj/AUR64jWP7+oSBpTcrcqVkexpN+Jg6A/Eq5/nloDl3OX+nstyu15iAZkGp2FhSVEsE9E1Ayca8sdMxR7YnC1Uh7tPEiOuSuxsnsgq8YtYdYGADRQm6dWjvselDNl15owkM5GsV0slW9OuNIvArx8P+YP4QschH+ob6bgOIQER4jbnrr9QTyJSPTOI9otLNgLh3vCSpZpFI1NT2Y4tToBJ4jbfwabatd31MMjO/gqGzt4GlU50LP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fS2chzfYI2mw1Pf3u/SZ0Fudzrkzm0HFdjEe/MZ89QPqPJCn2/yZbmMFkyAYInmNB5MIJa5fOPbwfBANG59dF4p/Lhxcn4XI0NLnj5Jhe9yPRwvlCcCPnjsP3z4HhOWQvBnIK0IIyahqNNNXfmwBRVCE0oYBZ9vbvDsNbcUVCNjgggV2VUwxpw7RJ5eyktLsNjOEBwiNwx1PDNARBMAwj9X/+/fff//t/')));

?>

what's this?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
What's the source? What do you get if you keep decoding & inflating the data?
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
First deflate/decode just brings up another eval(gzinflate(base64_decode()))) , which returns another. I didn't go any further down.Seems someone is trying very hard to hide the true nature of the code. Obviously I didn't run any of the 'eval's
 

ChatIndia

Community Advocate
Community Support
Messages
1,408
Reaction score
30
Points
48
Its some footer links at the bottom of my wordpress blog. When I try to remove the links my whole blog get crashed. To remove those links successfully I gotta understand its structure.
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
They're there for a reason - don't remove them. If you really don't want to see them (though you're probably breaking a Terms of Use for the poor soul who labored away at making the theme and releasing it for free - asking only for some return linkage in return), just use CSS to hide the links.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
Code:
echo '</div><!--/rightsidebar-->
</div><!--/content-->

<!-- Start footer -->

<div class="clear"></div>';

include(TEMPLATEPATH."/flickr.php");

echo '<div id="footer">
<p>&copy; '.date("Y").' '.get_bloginfo('name').'.</p>
<p>Powered by <a href="http://www.wordpress.org/">Wordpress</a>.</p>
<p><span>Theme designed by <a href="http://www.libertybathrooms.com/cheap-bathroom-suites.html">Bathroom suites</a> | In conjunction with <a href="http://moomeg.net">Web directory</a> , <a href="http://www.nerdjobs.de/" title="nerdjobs">Nerdjobs</a> , <a href="http://mw3f.com/">Modern Warfare 3</a>.</span></p> 
</div>

</div>';
 
$silkglow_google_analytics = get_option('silkglow_google_analytics');
if ($silkglow_google_analytics != '') { echo stripslashes($silkglow_google_analytics); }
wp_footer();
echo '</body></html>';

EDIT: And as Neil posted above, it's usually illegal (or at least bad form/taste) to remove the copyright link for the theme designer
 
Last edited:

ChatIndia

Community Advocate
Community Support
Messages
1,408
Reaction score
30
Points
48
great, thanks skizzerz! How did you do that?
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
Unlike descalzo, who stopped after 2-3 times, I kept going with the gzinflate(base64_decode()) nonsense until it provided something useful (trimming out the eval() each time, of course). All in all about 4-5 minutes of work
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
You can also have PHP do all the work using preg_match to pull out the encoded data, then calling gzinflate ∘ base64_decode on same in a loop, but I'm lazy that way. However, it seems imprudent to post code that defeats an encoding scheme for a copyright notice.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
However, it seems imprudent to post code that defeats an encoding scheme for a copyright notice.

Most free templates have simple copyright code, not this arcane stuff. Plus, the ultimate links in this case are effectively spam, not copyright notices.

Hiding things like this is a nice way to sneak malicious code into a template.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
misson:

The reason I decoded that wasn't so that people can remove the copyright link, it was so that you could save a good .1-.5 seconds every page load because it doesn't have to go through all that crap to get at the HTML. Whether or not people wish to remove the links is their own prerogative, I just recommend against it without contacting the theme author.

Also, in this case mindless copy/paste was faster than spending 15 minutes writing a script to do it for me, and since I don't forsee needing to do this again at all anytime in the forseeable future... well, sometimes writing a script isn't always the laziest way to do something :)
 
Last edited:

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
"It's amazing how much mature wisdom resembles being too tired." (Robert A. Heinlein)

I remember spending weeks on end with a milling machine, welder, soldering iron, oscilloscope and signal tracer to automate a task that took me about thirty-eight seconds every other month. Ah, youth. Nowadays I just pay some kid to do it for me.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
@Skizzerz: I bet you've got the skill to write the script in about the same amount of time it took to do it by hand.

It's that special brand of virtuous laziness that can benefit others.
 
Last edited:
Top