⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bool.java

📁 一个用于对.class文件进行插桩的开源工具
💻 JAVA
字号:
  InstructionList il = new InstructionList();  ...  CodeConstraint constraint = new CodeConstraint() {    public boolean checkCode(InstructionHandle[] match) {      IfInstruction if1 = (IfInstruction)match[0].getInstruction();      GOTO          g   = (GOTO)match[2].getInstruction();      return (if1.getTarget() == match[3]) &&             (g.getTarget() == match[4]);    }    };  FindPattern f   = new FindPattern(il);  String      pat = "`IfInstruction'`ICONST_0'`GOTO'`ICONST_1'" +                     "`NOP'(`IFEQ'|`IFNE')";  InstructionHandle[] match;  for(InstructionHandle ih = f.search(pat, constraint);      ih != null; ih = f.search(pat, match[0], constraint)) {    match = f.getMatch(); // Constraint already checked    ...    match[0].setTarget(match[5].getTarget()); // Update target    ...    try {      il.delete(match[1], match[5]);    } catch(TargetLostException e) { ... }  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -