Free online base64 encoder and decoder 

Hacked WordPress footer

I recently had to tweak the footer of my WordPress blog because it was hacked with one of those nasty little base64 codes, producing links to different websites. I came across this powerful and free encoder-decoder and was able to decode this:

eval(base64_decode(‘Pz4gPCEtLSBiZWdpbiBmb290ZXIgLS0+DQoNCjx

kaXYgc3R5bGU9ImNsZWFyOmJvdGg7Ij48L2Rpdj4NCjxkaXYgc3R5

bGU9ImNsZWFyOmJvdGg7Ij48L2Rpdj4NCjwvZGl2Pg0KDQo8ZGl2IG

lkPSJmb290ZXIiPg0KPD9waHAgaWYoaXNfaG9tZSgpKSA6ID8+PGEga

HJlZj0iaHR0cDovL3d3dy5tYW50YXMtdHJhbnNsYXRpb25zLmNvbSIg

dGl0bGU9IkVuZ2xpc2ggR3JlZWsgVHJhbnNsYXRpb24gU2VydmljZXM

iPnd3dy5tYW50YXMtdHJhbnNsYXRpb25zLmNvbTwvYT48P3BocCBlb

mRpZjsgPz4NCjwvZGl2Pg0KDQo8P3BocCBkb19hY3Rpb24oJ3dwX2Zvb

3RlcicpOyA/Pg0KDQo8L2JvZHk+DQo8L2h0bWw+IDw/’));?

to this:

?> <!– begin footer –>
<div style=”clear:both;”></div>
<div style=”clear:both;”></div>
</div>
<div id=”footer”>
<?php if(is_home()) : ?><a href=”http://www.xxx-hhh.com&#8221; title=blah blah”>blah blah

blah blahblah blah

</a><?php endif; ?>
</div>
<?php do_action(‘wp_footer’); ?>
</bxxy>
</hxxl> <?

In the above code I could easily see and change the links produced and after deleting a small line for the tables in my database problem was solved. With this tool, I could easily re-encode the code back to base64 and insert it in my footer.php. Great tool! Here is a bit of information and description from the tool’s website:

In computing, base64 is a data encoding scheme whereby binary-encoded data is converted to printable ASCII characters. It is defined as a MIME content transfer encoding for use in internet e-mail. The only characters used are the upper- and lower-case Roman alphabet characters (A-Z, a-z), the numerals (0-9), and the “+” and “/” symbols, with the “=” symbol as a special suffix code. Full specifications for base64 are contained in RFC 1421 and RFC 2045. The scheme is defined only for data whose original length is a multiple of 8 bits, a requirement met by most computer file formats.

The resultant base64-encoded data has a length that is approximately 33% greater than the original data, and typically appears as seemingly random characters. To convert data to base 64, the first byte is placed in the most significant eight bits of a 24-bit buffer, the next in the middle eight, and the third in the least significant eight bits. If there are fewer than three bytes to encode, the corresponding buffer bits will be zero. The buffer is then used, six bits at a time, most significant first, as indices into the string “ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef ghijklmnop qrstuvwxyz0 123456789+/” and the indicated character output. If there were only one or two input bytes, the output is padded with two or one “=” characters respectively. This prevents extra bits being added to the reconstructed data. The process then repeats on the remaining input data.

Source: http://base64-encoder-online.waraxe.us/