Konloch / Konloch/bytecode-viewer

Template and XPosedGenerator Java Plug-ins Throw Errors

Open
#476 0 comments 0 reactions 0 assignees View on GitHub
Bug Enhancement
Dominant language
Java
Stars
15.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Both of these were tested on the 2.3.1 release of [Android-InsecureBankv2](https://github.com/dineshshetty/Android-InsecureBankv2)
Running the Template.java upon creating a new plug-in throws the following error:

Please send this error log to https://github.com/Konloch/bytecode-viewer/issues or Konloch at https://the.bytecode.club or konloch@gmail.com
If you hold appropriate legal rights to the relevant class/jar/apk file please include that as well.
Bytecode Viewer Version: 2.11.2 [Fat Jar], OS: Windows 10, Java: 16.0.2

java.lang.NullPointerException: Cannot invoke "java.io.File.equals(Object)" because "from" is null
at com.google.common.io.Files.copy(Files.java:325)
at the.bytecode.club.bytecodeviewer.plugin.PluginWriter.runPlugin(PluginWriter.java:192)
at the.bytecode.club.bytecodeviewer.plugin.PluginWriter.lambda$buildGUI$1(PluginWriter.java:116)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6617)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
at java.desktop/java.awt.Component.processEvent(Component.java:6382)
at java.desktop/java.awt.Container.processEvent(Container.java:2264)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4993)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4934)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4563)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4504)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2308)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2773)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Running XPosedGenerator.java returns:

Please send this error log to https://github.com/Konloch/bytecode-viewer/issues or Konloch at https://the.bytecode.club or konloch@gmail.com
If you hold appropriate legal rights to the relevant class/jar/apk file please include that as well.
Bytecode Viewer Version: 2.11.2 [Fat Jar], OS: Windows 10, Java: 16.0.2

java.lang.NullPointerException: Cannot invoke "the.bytecode.club.bytecodeviewer.resources.ResourceContainer.getClassNode(String)" because "this.container" is null
at the.bytecode.club.bytecodeviewer.resources.Resource.getResourceClassNode(Resource.java:53)
at the.bytecode.club.bytecodeviewer.BytecodeViewer.getCurrentlyOpenedClassNode(BytecodeViewer.java:359)
at XposedGenerator.execute(Unknown Source)
at the.bytecode.club.bytecodeviewer.api.Plugin.lambda$executeContainer$0(Plugin.java:88)
at java.base/java.util.LinkedHashMap$LinkedValues.forEach(LinkedHashMap.java:647)
at the.bytecode.club.bytecodeviewer.api.Plugin.executeContainer(Plugin.java:83)
at the.bytecode.club.bytecodeviewer.api.Plugin.run(Plugin.java:49)

Contributor guide

Open the contributing guide

Research direction

Reproduce both failures using Template.java and XposedGenerator.java with Android-InsecureBankv2 2.3.1. Start at PluginWriter.java:192 for the null source and Resource.java:53 through BytecodeViewer.java:359 for the missing container; trace each entry point to determine the expected behavior, and consider the issue done when both plug-ins run without these exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools, reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.