Konloch / bytecode-viewer

A Java 8+ Jar & Android APK Reverse Engineering Suite (Decompiler, Editor, Debugger & More)
https://bytecodeviewer.com
GNU General Public License v3.0
14.6k stars 1.14k forks source link

Running code does not seem to work. #100

Closed ghost closed 5 years ago

ghost commented 8 years ago

Trying to run code using the CONTROL + R hotkey throws errors to the console, i'm currently running the latest version from samczsun his fork.

The about section shows that Java is null, not sure what causes this, but it might be the cause of this? I assume.

java -jar bytecode-viewer-3.0.0-alpha-3.jar
https://the.bytecode.club - Created by @Konloch and @samczsun - Bytecode Viewer 3.0.0
Checking libraries
Checking Enjarify
Checking Krakatau
Booting
Start up took 1 seconds
Allowing exec:C:\Python27\python.exe
Hooks are disabled completely.
Done setting up.
Invoking the/bytecode/club/crackme/Main.main([Ljava/lang/String;)V:

Exception in thread "Thread-11" java.lang.NoClassDefFoundError: java/lang/Object
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at the.bytecode.club.bytecodeviewer.api.ClassNodeLoader.nodeToClass(ClassNodeLoader.java:134)
        at the.bytecode.club.bytecodeviewer.plugin.preinstalled.EZInjection.execute(EZInjection.java:282)
        at the.bytecode.club.bytecodeviewer.api.Plugin.run(Plugin.java:43)
Caused by: java.lang.ClassNotFoundException: java.lang.Object
        at java.lang.ClassLoader.findClass(Unknown Source)
        at the.bytecode.club.bytecodeviewer.api.ClassNodeLoader.findClass(ClassNodeLoader.java:113)
        at the.bytecode.club.bytecodeviewer.api.ClassNodeLoader.loadClass(ClassNodeLoader.java:105)
        ... 5 more
ghost commented 8 years ago

Pinging @samczsun as well, since i'm running his fork.

ghost commented 8 years ago

Manually setting the javalocation does not seem to change this.

    "settings": {
        "rtlocation": "C:\\Program Files\\Java\\jdk1.8.0_65\\jre\\lib\\rt.jar",
        "javaclocation": "C:\\Program Files\\Java\\jdk1.8.0_65\\bin\\javac.exe",
        "python2location": "C:\\Python27\\python.exe",
        "python3location": "C:\\Python34\\python.exe",
        "javalocation":"C:\\Program Files\\Java\\jdk1.8.0_65\\jre\\bin\\java.exe"
    }
Invoking the/bytecode/club/crackme/Main.main([Ljava/lang/String;)V:

Exception in thread "Thread-11" java.lang.NoClassDefFoundError: java/lang/Object
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at the.bytecode.club.bytecodeviewer.api.ClassNodeLoader.nodeToClass(ClassNodeLoader.java:134)
        at the.bytecode.club.bytecodeviewer.plugin.preinstalled.EZInjection.execute(EZInjection.java:282)
        at the.bytecode.club.bytecodeviewer.api.Plugin.run(Plugin.java:43)
Caused by: java.lang.ClassNotFoundException: java.lang.Object
        at java.lang.ClassLoader.findClass(Unknown Source)
        at the.bytecode.club.bytecodeviewer.api.ClassNodeLoader.findClass(ClassNodeLoader.java:113)
        at the.bytecode.club.bytecodeviewer.api.ClassNodeLoader.loadClass(ClassNodeLoader.java:105)
        ... 5 more
Konloch commented 8 years ago

The EZ-Injection plugin may be removed once JVMCommand gets released. I never really liked the idea of BCV running code that you drag into it. I always felt that extremely unsafe.

ghost commented 8 years ago

I pulled the latest version, ran a fresh mvn clean package and then ran the jar straight from the target folder, then verified that the correct paths and other settings where still set via the about panel.

    "settings": {
        "rtlocation": "C:\\Program Files\\Java\\jdk1.8.0_65\\jre\\lib\\rt.jar",
        "javaclocation": "C:\\Program Files\\Java\\jdk1.8.0_65\\bin\\javac.exe",
        "python2location": "C:\\Python27\\python.exe",
        "python3location": "C:\\Python34\\python.exe",
        "javalocation":"C:\\Program Files\\Java\\jdk1.8.0_65\\jre\\bin\\java.exe"
    }

Then loaded one of the simple crackme jars located on the forum, and tried to run it using the default settings, which resulted in this error.

$ /c/Program\ Files/Java/jdk1.8.0_65/jre/bin/java.exe -jar target/bytecode-viewer-3.0.0-alpha-3.jar
https://the.bytecode.club - Created by @Konloch and @samczsun - Bytecode Viewer 3.0.0
Checking libraries
Checking Enjarify
Checking Krakatau
Booting
Start up took 2 seconds
Hooks are disabled completely.
Done setting up.
Invoking the/bytecode/club/crackme/Main.main([Ljava/lang/String;)V:

Exception in thread "Thread-11" java.lang.NoClassDefFoundError: java/lang/Object
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at the.bytecode.club.bytecodeviewer.api.ClassNodeLoader.nodeToClass(ClassNodeLoader.java:138)
        at the.bytecode.club.bytecodeviewer.plugin.preinstalled.EZInjection.execute(EZInjection.java:282)
        at the.bytecode.club.bytecodeviewer.api.Plugin.run(Plugin.java:43)
Caused by: java.lang.ClassNotFoundException: java.lang.Object
        at java.lang.ClassLoader.findClass(ClassLoader.java:530)
        at the.bytecode.club.bytecodeviewer.api.ClassNodeLoader.findClass(ClassNodeLoader.java:117)
        at the.bytecode.club.bytecodeviewer.api.ClassNodeLoader.loadClass(ClassNodeLoader.java:109)
        ... 5 more       
ghost commented 8 years ago

No problem, just reporting issues :+1: