Nairaland Forum

Welcome, Guest: Join Nairaland / Login / Trending / Recent / New
Stats: 1229589 members, 1614786 topics. Date: Friday, 29 August 2014 at 05:04 PM

Can Obfuscated Php Script Be Decoded? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Can Obfuscated Php Script Be Decoded? (7102 Views)

PHP Script To Send Simple Messages / Php Script Giving Me Headache: Help! / I Need Help With A PHP Script (1) (2) (3) (4)

(0) (Reply) (Go Down)

Can Obfuscated Php Script Be Decoded? by charliebiz(m): 11:57am On Mar 26, 2010
i want to know if an obfuscated php script can be decoded and how.
Re: Can Obfuscated Php Script Be Decoded? by lojik(m): 2:28am On Apr 04, 2010
YES!
99% of php obfuscators use eval() function to run the original code one page at a time.
To decode the obfuscated script, look for the eval() function on that same page and replace it with echo. it spews out the real code like a baby.

If u need an obfuscator, check d free obfuscator i have on my site http://www.afrisoft.org . its called phplocker and i'm presently creating a more secure version that will be available for free in a week.

@poster
aw r u? long tyme no visualisation!
dhtml told me he fixed my "email2database" script for you. Is it working fine now?
Re: Can Obfuscated Php Script Be Decoded? by charliebiz(m): 7:13am On Apr 07, 2010
@ lojik
Thanks bro. i have being tryin 2 reach u, even thru ur website chatroom bt noway.yeh, dhtml fixed it. Please can u advise in what way can a script be obfuscated or coded dat will b prevent it 4rm being replicated. I have already done an obfuscation with a software n don't know if it can b broken, i think i still have ur email address, che make i send am to u make u test ur power? grin
Re: Can Obfuscated Php Script Be Decoded? by charliebiz(m): 7:58am On Apr 07, 2010
sent it to ya mail n waitin. cool
Re: Can Obfuscated Php Script Be Decoded? by lojik(m): 1:09pm On Apr 07, 2010
What you sent is not really obfuscation. i have figured out your mysql username, password, host and database name without any decoding. What you did was just to change your variable names to very long names but no obfuscation was done on the real code.
You want real obfuscation? its plain gibberish that you'd see in your code. even you wont recognise your own code.

I just uploaded the updated version of my php obfuscator like 3 mins ago. download it and see real obfuscation in action: http://www.afrisoft.org/index.php/phplocker
Re: Can Obfuscated Php Script Be Decoded? by charliebiz(m): 3:02pm On Apr 07, 2010
hw can i stop a php code 4rm being decoded. which practise or program do u advise?
Re: Can Obfuscated Php Script Be Decoded? by Mobinga: 9:29pm On Jul 25, 2011
charliebiz:

hw can i stop a php code 4rm being decoded. which practise or program do u advise?

You cannot stop an obfuscated code from being decoded. Anything that can be Encoded can be Decoded.
What obfuscation does is just make it difficult and time consuming for someone to decode it.

Simple obfuscator gotten from StackOverFlow its CLI.

<?php
$infile=$_SERVER['argv'][1];
$outfile=$_SERVER['argv'][2];
if (!$infile || !$outfile) {
die("Usage: php {$_SERVER['argv'][0]} <input file> <output file>\n"wink;
}
echo "Processing $infile to $outfile\n";
$data="ob_end_clean();?>";
$data.=php_strip_whitespace($infile);
// compress data
$data=gzcompress($data,9);
// encode in base64
$data=base64_encode($data);
// generate output text
$out='<?ob_start();$a=\''.$data.'\';eval(gzuncompress(base64_decode($a)));$v=ob_get_contents();ob_end_clean();?>';
// write output text
file_put_contents($outfile,$out);
?>
Re: Can Obfuscated Php Script Be Decoded? by tamilmaran: 12:42pm On Jan 26, 2012
how could it decode the php file encoded by turk mmcache
please fnd sample encoded file.
help me to decode it
<?php /*This encoded file generated using PHPCoder (http://phpcoder.shadonet.com) and Turck MMcache (http://www.turcksoft.com/en/e_mmc.htm)*/ if (!is_callable("mmcache_load"wink && !@dl("TurckLoader.so"wink) { die("This PHP script has been encoded using the excellent Turck MMcache Optimizer, to run it you must install <a href=\"http://www.turcksoft.com/en/e_mmc.htm\">Turck MMCache or the Turck Loader</a>"wink; }mmcache_load('eJztW+ty28YVBij6IrdpEidVk3aSWWEmImlRpCjZqS0RtB1FvmRkmRZle1zHwwGJJYkYBGAA1CWN36F/+rtP0EfoQ/QZ+qeP0J89Zxd3EiQoK2lmUreRgN0953x7Lrtnz0KPHu3c3XmwK+QEQRCFhavwq09d541+pOgj6ri2ZvShc7xtUcB/3wr8XwuoFy7Dgzugz3CUeBv5eR2XeMfhqcXac377+7z9a9rTDKpyujuCsIBYFgK2V/mofdNNDswHA+schr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+hVs88R/my7/nUX94bcv266jDDDRVpYbvMsGfEgSI+UVVIwAJKLFpvru9DBfr53KXupHiEXvgENlvUm/d+GKqY2XhkYbkYBaSOa5S+aWkt0/YZo+51NRb9y8lvo7EHZ1kS49YRtwxT3xfGVDdclzFHTmRRDpyZ98zWpBR753axVKYkI/fznGfJJh9V8EZKXkzAk4EuXunLO9XMPdxRXCX5G0snsJCwbg3okB2p/u/90rlZ+SXM7GkfgriqXOCYRaZKXz1RBPb+S7r2e38reTt/C1+O8+8l6214ELoNgG5qjmWrpxuGZBDbR9pjncE3OJr3rbUQESxb2SQvI17aPjhxBPmjg+gY9H/SIZtDLPoIrXrLZ9wIonUeD4w8ZNHd0AJpzJ78AIt+HXObdLiBWvehZ/40pMKedgjp+aIDJQjSlRqKbaL9/nkeKB1B9EG/DuGuXBHbrFn4d5Fw5GQoMIAk+cMAysBEtckHYp/AjsXhqB4kQ1BMHwuIcHBOZuQYPhcQiLVv2xiIgTzqUyZT044PiYGF1O/mDoW1Xx74aH9/93+R9ztU9fTGXtbbKefIPIMeVrAsfYjWbE2pn7+IeqcZrz+7la8NYPHpK8pPaw8sogvZfK3lNmmfZ4ZYsKn4P/eKOwKkie/H5/xu2DW6P1pU8rNY+wPTMPbw65uOrThXYDCv/8CQO22VA=='); ?>
Re: Can Obfuscated Php Script Be Decoded? by dhtml18(m): 9:55am On Jan 27, 2012
Just passing by. However, there are some techniques that allows you PHP to be safe - if you run them as a service. Or you make an API
so that the main engine is kept hidden. EVen ioncube, zend and all those stuffs, i gat boys wey dey decode them easily.
Re: Can Obfuscated Php Script Be Decoded? by ektbear: 3:58am On Jan 29, 2012
If obfuscated, can't one just put it in code reformatter of some sort?

I don't see how that will help.
Re: Can Obfuscated Php Script Be Decoded? by tamilmaran: 3:34pm On Jan 29, 2012
im a beginner , some guys decoded the turkmmcahe files easily in free lancer.
any experts tell how they do it,
any tutorial links are most welcome,
please help me
Thanks i advance
Re: Can Obfuscated Php Script Be Decoded? by amitrazib: 5:45pm On May 01, 2012
Please Decoded this. i obfuscated this raizlab software.. please help me.


<?php $R6629C5988EEFCD88EA6F77A2AE672B96 = "http://xyz/"; function FD611C46F8E65D9E049AFE165DE18C264() { $R900BE0CBE7A2503685517B606B52F2A9 = "6"; $RE8747F814FD1D0F28FD88A1217302D07 = date("l, d F Y h:i a",time() + ($R900BE0CBE7A2503685517B606B52F2A9 * 3600)); print ("$RE8747F814FD1D0F28FD88A1217302D07"wink; } function F251D164643533A527361DBE1A7B9235D() { echo '&copy; 2010 <a href="http://xyz" title="Meherul Haque" target="_self">Meherul</a>. Developed by: <a href="http://xyz" title="Dot" target="_blank">Dot</a>'; } function F8CF04A9734132302F96DA8E113E80CE5() { error_reporting(0); if (!(include("Home.htm"wink)) { print("<p align=\"center\"><font face=\"Arial\" color=\" \">Sorry! Required File Not Found.</font></p>"wink; } } function F8F7F4C1CE7A4F933663D10543562B096() { error_reporting(0); if (!(include("About.htm"wink)) { print("<p align=\"center\"><font face=\"Arial\" color=\" \">Sorry! Required File Not Found.</font></p>"wink; } } function FFE4A76A7DE7B592F5FEF740A34740681() { error_reporting(0); if (!(include("Photo-Gallery.htm"wink)) { print("<p align=\"center\"><font face=\"Arial\" color=\" \">Sorry! Required File Not Found.</font></p>"wink; } } function FBBAFF12800505B22A853E8B7F4EB6A22() { error_reporting(0); if (!(include("Contact.htm"wink)) { print("<p align=\"center\"><font face=\"Arial\" color=\" \">Sorry! Required File Not Found.</font></p>"wink; } } ?>

(0) (Reply)

Is This What Big IT Firms Do? Please Help Me Out Nairaland Programmers / Humour: Does This Realy Say's Truth Abt Programmers / What Software Have You Created?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (0) (1) (2) (3) (4) (5) (6) (7) (8) (9)

Nairaland - Copyright © 2005 - 2014 Oluwaseun Osewa. All rights reserved. See Nairalist and How To Advertise. 43
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.