diff --git a/README.md b/README.md index 2220796..8e1dd3f 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Set of JEB plugins and scripts for better Android reversing experience. ### Offline environment Extract the provided `offline.tar.xz` to the main project's folder. You are good to go. +Run with --offline ### Compilation diff --git a/build.gradle b/build.gradle index 53c3921..d1a55a6 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ apply plugin: 'kotlin' group 'org.yoavst.jeb' -version '0.4.0' +version '0.4.1' compileKotlin { kotlinOptions { diff --git a/src/main/kotlin/com/yoavst/jeb/bridge/UIBridge.kt b/src/main/kotlin/com/yoavst/jeb/bridge/UIBridge.kt index 98c442c..0e29039 100644 --- a/src/main/kotlin/com/yoavst/jeb/bridge/UIBridge.kt +++ b/src/main/kotlin/com/yoavst/jeb/bridge/UIBridge.kt @@ -1,6 +1,8 @@ package com.yoavst.jeb.bridge import com.pnfsoftware.jeb.client.api.IGraphicalClientContext +import com.pnfsoftware.jeb.core.output.IItem +import com.pnfsoftware.jeb.core.units.code.android.dex.IDexItem import com.pnfsoftware.jeb.core.units.code.android.dex.IDexMethod import com.pnfsoftware.jeb.core.units.code.android.dex.IDexType import com.yoavst.jeb.utils.currentFocusedMethod @@ -13,9 +15,14 @@ object UIBridge { private set var focusedClass: IDexType? = null private set + var focusedAddr: String? = null + private set + var focusedItem: IItem? = null + private set var currentMethod: IDexMethod? = null private set + var currentClass: IDexType? = null private set @@ -23,6 +30,8 @@ object UIBridge { fun update(context: IGraphicalClientContext) { focusedMethod = context.currentFocusedMethod() focusedClass = context.currentFocusedType() + focusedAddr = context.focusedFragment?.activeAddress + focusedItem = context.focusedFragment?.activeItem currentMethod = context.currentFocusedMethod(supportFocus = false, verbose = false) currentClass = context.currentFocusedType(supportFocus = false, verbose = false) } @@ -32,5 +41,7 @@ object UIBridge { CurrentMethod: $currentMethod FocusedClass: $focusedClass CurrentClass: $currentClass + FocusedItem: $focusedItem + FocusedAddr: $focusedAddr """.trimIndent() } \ No newline at end of file diff --git a/src/main/kotlin/com/yoavst/jeb/plugins/tostring/ToStringRenamingPlugin.kt b/src/main/kotlin/com/yoavst/jeb/plugins/tostring/ToStringRenamingPlugin.kt index bbfd12d..82c97c4 100644 --- a/src/main/kotlin/com/yoavst/jeb/plugins/tostring/ToStringRenamingPlugin.kt +++ b/src/main/kotlin/com/yoavst/jeb/plugins/tostring/ToStringRenamingPlugin.kt @@ -47,7 +47,7 @@ class ToStringRenamingPlugin : BasicEnginesPlugin(supportsClassFilter = true, de /** Process a toString() method from the given class **/ private fun processToStringMethod(method: IJavaMethod, cls: IDexClass, renameEngine: RenameEngine) { - // currently supports only one style of toString + // currently, supports only one style of toString if (method.body.size() == 0 || method.body[0] !is IJavaReturn) return @@ -128,7 +128,7 @@ class ToStringRenamingPlugin : BasicEnginesPlugin(supportsClassFilter = true, de } else -> { - logger.debug("Warning: The toString method for ${cls.name} has a complex expression ${left.javaClass.canonicalName}") + logger.debug("Warning: The toString method for ${cls.name} has a complex expression ${left?.javaClass?.canonicalName}") return } }