CalebFenton / simplify

Android virtual machine and deobfuscator
Other
4.41k stars 438 forks source link

Why SmaliVM use node.getContext() return String == Unknow #164

Open HexZZ opened 2 years ago

HexZZ commented 2 years ago

![Uploading LS~GNIGSQ6X(C6~IPQGJDR6.png…]()

CalebFenton commented 2 years ago

Can you provide a bit more context?

HexZZ commented 2 years ago

Can you provide a bit more context? 1 like it

main String smaliOrDexPath = "C:\\Users\\Administrator\\Desktop\\ApkTool\\classes.dex"; VirtualMachineFactory vmFactory = new VirtualMachineFactory(); // this is Java, so factory VirtualMachine vm = vmFactory.build(smaliOrDexPath); String methodSignature = "Lcom/sharpshooter/gm2/plugin/LoginSharpshooterActivity$O000000;->run()V"; ExecutionGraph graph; graph = vm.execute(methodSignature);

then on NonInteractiveMethodExecutor.java ExecutionNode node = step(); Breakpoint

return node.getContext == Lcom/sharpshooter/gm2/plugin/LoginSharpshooterActivity$O000000;->()V State: params: 0, locals: 1 v0: type=I, value=164 Class state: Lcom/sharpshooter/gm2/plugin/LoginSharpshooterActivity$O000000; Fields: Lcom/sharpshooter/gm2/plugin/LoginSharpshooterActivity$O000000;->O000000000:Ljava/lang/String; = type=Ljava/lang/String;, value=unknown Lcom/sharpshooter/gm2/plugin/LoginSharpshooterActivity$O000000;->O00000000:Lcom/sharpshooter/gm2/plugin/LoginSharpshooterActivity; = type=Lcom/sharpshooter/gm2/plugin/LoginSharpshooterActivity;, value=unknown Lcom/sharpshooter/gm2/plugin/LoginSharpshooterActivity$O000000;->O0000000000:Ljava/lang/String; = type=Ljava/lang/String;, value=unknown Lcom/sharpshooter/gm2/plugin/LoginSharpshooterActivity$O000000;->ۦ۬ۜ:[S = type=[S, value=null Class state: Ljava/lang/Runnable; Fields:

i want print smali and locals to "trace.txt" then analyze CFG Unflattening

HexZZ commented 2 years ago

Can you provide a bit more context? classes.zip this is dex