How do you edit compiled Java bytecode? -



How do you edit compiled Java bytecode? -

i used decompiler find next function in compiled code:

public static void sub_e5b() { var_972 = null; system.gc(); vservconfighashtable = new hashtable(); vservconfighashtable.put("appid_end", "498"); vservconfighashtable.put("showat", "both"); vservconfighashtable.put("categoryid", "22"); vservconfighashtable.put("viewmandatory_end", "true"); (new vserv_bci_class_000(var_93a, vservconfighashtable)).showatend(); }

now want alter "true" value "false".

what tools and/or techniques used create change?

this can done using disassembler krakatau (disclosure, wrote it).

the advantage of using disassembler on decompiler it's guaranteed work. not code can decompiled, can disassembled.

for example, take class this.

public class a{ public static void main(string[] args) { system.out.println("true"); } }

after disassembling krakatau, you'll this.

.version 51 0 .class super public .super java/lang/object .method public <init> : ()v .limit stack 1 .limit locals 1 aload_0 invokespecial java/lang/object <init> ()v homecoming .end method .method static public main : ([ljava/lang/string;)v .limit stack 2 .limit locals 1 getstatic java/lang/system out ljava/io/printstream; ldc 'true' invokevirtual java/io/printstream println (ljava/lang/string;)v homecoming .end method

change line ldc 'true' ldc 'false', reassemble it, , print false instead of true.

java bytecode

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -