Java破解的新思路

來源:互聯網
上載者:User

前幾天在網上看到有一個xml編輯的外掛程式,做的挺好。但是pro版本要註冊。下載了一個用著不錯,功能挺多。最重要的是可以在Eclipse中使用。我現在連QQ都在Eclipse中使用了。

決定破解一下。找到了LicenseDialog,折騰了半天知道了使用的是RSA演算法。昨晚在網上看到說超過1024bit,幾乎就沒有了破解的可能。決定放棄。找找別的辦法。

BaseEditor.class中有一段
        if(fPro && Config.LITE)
        {
            final Display display = XMLPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell().getDisplay();
            final BaseEditor editor = this;
            Thread thread = new Thread(new Runnable() {

                public void run()
                {
                    synchronized(this)
                    {
                        try
                        {
                            wait(1000L);
                        }
                        catch(InterruptedException _ex) { }
                    }
                    display.asyncExec(editor. new Runnable() {

                        public void run()
                        {
                            OkDialog okdialog = new OkDialog("License Reminder", "Sorry, this feature requires a PRO license.");
                            okdialog.open();
                            VersionAction.promptForLicense();
                            IWorkbenchPage iworkbenchpage = XMLPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
                            iworkbenchpage.closeEditor(editor, false);
                        }

// JavaClassFileOutputException: Invalid index accessing method local variables table of <init>
                    });
                }

            });
            thread.start();

fPro肯定是true了,Config.LITE不能讓他是true.看看Config怎麼寫的。

package com.objfac.xmleditor;

import java.lang.reflect.Field;
import java.util.Iterator;
import java.util.LinkedList;

// Referenced classes of package com.objfac.xmleditor:
//            XMLPlugin

public class Config
{
    /* member class not found */
    class ConfigListener {}

    public static final String VERSION = "2.0.11";
    public static final String DELTA = "0";
    public static final String eclipse = "e3.0M9";
    public static final String SKU = "xp2.0.11M9";
    public static boolean LITE = false;
    public static final boolean FROZEN = false;
    public static final boolean BETA = false;
    public static final boolean SCHEMA_POOL = true;
    public static final boolean DEBUG_DEPENDENCY_MANAGER = false;
    private static LinkedList listeners;

    public Config()
    {
    }

    public static void set(int i)
    {
        try
        {
            Field field = com.objfac.xmleditor.Config.class.getDeclaredField("LITE");
            field.set(null, i < 1 ? ((Object) (Boolean.FALSE)) : ((Object) (Boolean.TRUE)));
            notifyListeners();
        }
        catch(Exception exception)
        {
            XMLPlugin.log(exception);
        }
    }

    public static void add(ConfigListener configlistener)
    {
        if(listeners == null)
            listeners = new LinkedList();
        listeners.add(configlistener);
    }

    private static void notifyListeners()
    {
        if(listeners == null)
            return;
        for(Iterator iterator = listeners.iterator(); iterator.hasNext();)
            try
            {
                ConfigListener configlistener = (ConfigListener)iterator.next();
                configlistener.configChanged();
            }
            catch(Exception exception)
            {
                XMLPlugin.log(exception);
            }

    }

}
先將public static boolean LITE = true
改為public static boolean LITE = false

然後field.set(null, i < 1 ? ((Object) (Boolean.FALSE)) : ((Object) (Boolean.TRUE)));
改為field.set(null, i < 1 ? ((Object) (Boolean.FALSE)) : ((Object) (Boolean.FALSE)));

啟動Eclipse,所有的限制都去掉了。

唉,看來java軟體保護真是個問題。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.