Go Back   Web Design & SEO Company > Knowledgebase

Knowledgebase Articles and information about running a website, cPanel and various hints and tips. Here you will find tutorials on php, MySql, .htaccess, cron, SEO, Search Engines, CHMOD, FTP, CSS, HTML and various other hints and tips on running and Administrating a website.

 
 
Prev Previous Post   Next Post Next
  #1  
Old 09-20-2007, 08:00 PM
Admin's Avatar
Administrator
 
Join Date: Jan 2007
Location: Taree
Posts: 610
Default Decoding eval gzinflate base64_decode

Decoding eval gzinflate base64_decode

There's a few applications around both freeware and paid that encode files or rather scripts so you can't see or modify the source. These encrypted files can be identified by the starting line which is like:

eval(gzinflate(str_rot13(base64_decode

Then it goes on with a mass of random numbers, letters and characters like 'FZi3ksTWEVJ/hZnITwDvV' and so on.

Note: Please try out the online tool to decode this automatically, do not paste in PHP tags just the eval code.

Online eval(gzinflate(str_rot13 Decoder

Base64 Decoder

Now i'm all for people who wish to keep their code or intellectual property hidden so it's not stolen or modified, but at the same time i do like to know exactly what the given piece of code is doing on my server. Being encrypted like this, it could be doing all sorts of malicious things i don't want happening.

So, lets decrypt it and see if it's all legitimate.

Disclaimer: I don't condone modifying and distributing copyright files, this is simply provided so you can view the plain source to ensure your script isn't doing anything malicious on your property ie server.

Firstly, copy the below code in to Notepad and save it as decrypt.php

Quote:
<?php
echo "\nDECODE nested eval(gzinflate()) from Taree Internet <www.tareeinternet.com>\n\n";
echo "1. Reading coded.txt\n";
$fp1 = fopen ("coded.txt", "r");
$contents = fread ($fp1, filesize ("coded.txt"));
fclose($fp1);
echo "2. Decoding\n";
while (preg_match("/eval\(gzinflate/",$contents)) {
$contents=preg_replace("/<\?|\?>/", "", $contents); eval(preg_replace("/eval/", "\$contents=", $contents)); } echo "3. Writing decoded.txt\n"; $fp2 = fopen("decoded.txt","w"); fwrite($fp2, trim($contents)); fclose($fp2);
?>
Next step, copy your encoded file to NotePad and save it as coded.txt

Save a blank text file as decoded.txt

Upload all 3 files to the root directory of your server, then set the CHMOD on decoded.txt to 666

You will have:

www.domain.com/decrypt.php - Our decoding script
www.domain.com/coded.txt - A text file with our encoded script
www.domain.com/decoded.txt - A blank .txt file CHMOD to 666

Next up, simply visit www.domain.com/decrypt.php with your browser and you will receive a message "Writing Decoded.txt" and you are done. The decoded.txt file that was blank will now have your plain viewable source code.

Save the text file as original-filename.php and you will have a plain source code version of your encrypted file.
Reply With Quote
Top SEO Tool
Harvester and Mass Blog Commenter
Blog Comment Software

 

Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Decoding Js help me Fantastikky Knowledgebase 0 01-05-2015 12:44 AM
Decoding Array unicornio Knowledgebase 0 10-22-2009 11:33 PM
Help with base64_decode Unregistered Knowledgebase 3 09-04-2009 10:52 PM
Decoding base64_decode murker Knowledgebase 0 02-05-2009 03:28 PM
help me eval(base64_decode(str_replace DoukanN Knowledgebase 0 01-05-2009 06:06 PM



Knowledgebase | SEO | Free Scripts | Free Wordpress Themes | Free Graphics

eval gzinflate base64 decode | SEO Addons


Forum time zone is GMT. Currently it's 10:54 PM.

SEO - Top



Web Design & SEO Forums