Encrypt online file - Using Free Encoder, Can it be cracked ?

Posted on 2004-11-10
Medium Priority
Last Modified: 2008-02-01
I am using a free encoder that I am encoding a php file online, I am tring to create a program that will lock a script to a domain but before I get to involved I want to know if it can be cracked easily.  Here is a sample below..

< ? eval(gzinflate(base64_decode('
DdRHjqNoAEDhq/Suu8QCMMFGE0rkaHLejMg5B/9w+qkTPH2b9/3v39+/ijPp/1R3M5Z9shd/0mQrSPy/vMimvPjzm8t1pVt0kaY5en2B/ZjenIEodXufkY/zPMvQIYMEQLg8qwHsucNvEypNE7sh+GpQKYRDG6/W3oE74bV23iFRdeCCGir9tI6fsYvijVPMO3/maJmR5IhlYkrPxRY6e+Gqx1GbjKv5uBEd1ugFl9wPwO734ozrPdm6LBiFnvRtSgbjJ65IrcKYe5o1A+GfLR/HiTlE+fnARUh1+eKeCMi15FTtH6iaP4zQeFS+7LfEqToPg8YkbFcDMqUEkYpUT021UB4zX+PQXrpZR6isVCniRjkQCq0YORoWzB02atGHTYx88n0hHKuTiFY5jVsrzp0P2et0gUWwNu77CCXB/gtQZ70XjziRaYY26mawvRtIwgWPw8EvJU6/zJ++HNCfS0OeskryHMODFQwSq5ZcyImRRSoBSuX+gD+15oC2zGbuGWJAnrkzdCfApU0rwkzBvNO0461GDV2qq+5JITT20tWbs61eyGLJmmQ7EC/2SNcloTSjG6IGjgH8ebgL/ETj1Mz2qYSoD7GpIbM8B83OyFRH9abWwyzwpoSMj5BT3yQxa6Jrs/UiEu8Lg+z5EZiesGxmLWdsaavq6Bezd9H9kpEPauZ3RUdbmsysZ1oVKvwGt6RinQ7HzlEiIIo94J45g3jx0bQ2MTezEAyICPfqSoJCeiYE1p5HGCIstdlk1WJNicyb7ryIhhOaHeV5h/bcBAremFR3DQIyg2QHl95xxSR+iESLurssyT3Xs/xnrDX8/sCvNrxofAhWALXTZEtEir+exUdA2LwZcTLG5jjMBqg5OpAaE77N/ZOCUJRHXFmuN4TKR45jQaZ44CB3KZV8s7pWUaj3VKRJ70O5WlVs2EJKtigkOzPryyHUtPae9HfZF/PAmbAyT6drE0gNuo9dklZk4IS8bop+X4gnyBdgmSBgBv8Gr8mpHXpbVwQvqpkaojP91EWLVxFD2HD0agz4WO3rumcz93X20WrJ2IkrcXDuudKFFeBj1biKddHNe2mLEn6+4PMJwccZ3jBVw5/3P7+/vr7++vX9M4j/AQ=='))); ? >

Here is whare I encryped it.. http://www.phprocket.com/demos/locktests/utils_obfuscate.php
If it can be cracked what does the encrypted script say ? and please tell me now you done it.
Question by:daveaton
LVL 48

Accepted Solution

hernst42 earned 500 total points
ID: 12552747
No this is no secure mehtod (took me 10 minutes to get the result):

$test="This is just my test!";
$test2="This is also a test";

Script do decode that code:
// $str cotains the string you given above
while (strpos($str, 'gzinflate')) {
    $str = str_replace('?><?', '', $str);
    $str = str_replace('eval(', 'return ', $str);
    $str = str_replace(');', ';', $str);
    echo $str;
    $str = eval($str);
    echo "\n\n";
echo $str;

You can only get a secure encoding by using e.g ZendEncoder or encoded script by mmcache.

Expert Comment

ID: 12554920
"cracking" even easier - replace eval with echo.

secure encoding of the script is utopical idea. after all, script processor should be able to decode it, and so anyone who control script processor (server in general) will be able to decode it, too.


Author Comment

ID: 12555860
Thanks, hernst42

You really o pened my eyes on this one, I had people telling me that it was secure, but you said you cracked it in 10min I guess it would only keep the honest people honest.

I have looked at Zend and I don't have that kind of money, I am going to checkout mmcache, I have heard that name before but not sure where to get it.. I guess it's back to google
and start doing some research. and I am a little afraid of zend because my experience of installing scripts that have been zend encoded.  On servers who refuse to update their zend version
due to the fact because their old one is working just fine..



Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question