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

Posted on 2004-11-10
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..
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

    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.
    LVL 3

    Expert Comment

    "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.

    LVL 2

    Author Comment

    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

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
    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…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now