Forum Moderators: coopster
Why?
I obfuscated some code and want to stop the script if the license key isu not valid. however, for reverse engineers (hackers) its really easy to search for "exit" to see where the script is stopped. So I try to find a far less obvious way to stop a script.
(why exit: because error messages are traceble in the code and a blank screen is a blank screen, so you can't trace in which line the script was stopped).
I want a script to stop, but without using exit() or die().
I tried sending it in an endless loop, but that generates errors, which is not what I want. I want to get a blank screen.
anyone?
So if you have a list of checks could you use break [uk.php.net] to redirect people to the final statement. Only works with the looping constructs and switch. May or may not be useful to you.
this will not stop the rest of the script.
" Are you sure you want a blank screen? As if someone enters the code wrong then they get no error message, just a white screen with no message."
yes that is precisely what I want, for the above mentioned reasons.
"looping constructs and switch. May or may not be useful to you. "
I got the constructions, it all works well, just need to get 'exit()' different to obfuscate even more.
Also, if somebody has access to your source code they are going to find your edit check, one way or another. All your effort here is lost.
@whoisgregg
eval is maybe also too obvious. better then exit, thou.
I've been looking into [ionolicensing.com....] Much cheaper, and on the fly decryption. (their demo was broken, could not post on their forum and they won't reply to my mails, to I tested obfuscation).
that would be the easyest code ever for a reverse engineer to undo! hahaha.
eval is maybe also too obvious. better then exit, thou.
I think you're setting your sights on your hypothetical hacker a bit high. It's a losing battle to hide your code from someone as knowledgeable or more knowledgeable than yourself. If you can think of it, so can they, so why bother?
Obfuscation is only economical to block the casual code thief, the people who don't know enough to know what to look for. Those folks will spend about 30 seconds trying to look for a "
$change_this_from_false_to_true_to_show_you_paid = false;" and, when they don't find it, they'll either pay or move on to a different solution.
If you plan on making money off your work, then you have to make a business decision about investing in a solution that actually prevents reverse engineering. If you aren't planning on making money, or don't expect to make enough to pay for a true solution, then why hide it at all? Use your open source project to get links and traffic to your website which you can, if you so choose, monetize.