public FlowObfuscation getFlowObfuscation() { if (flowCheckBox.isSelected()) { switch (flowComboBox.getSelectedIndex()) { case 0: { return new LightFlowObfuscation(); } case 1: { return new NormalFlowObfuscation(); } case 2: { return new HeavyFlowObfuscation(); } default: { throw new IllegalStateException(String.format("Bad flow obfuscation type %d.", flowComboBox.getSelectedIndex())); } } } else { return null; } }
AtomicInteger counter = new AtomicInteger(); this.getClassWrappers().parallelStream().filter(classWrapper -> !excluded(classWrapper)).forEach(classWrapper -> { ClassNode classNode = classWrapper.classNode; FieldNode field = new FieldNode(ACC_PUBLIC + ACC_STATIC + ACC_FINAL, classWrapper.methods.parallelStream().filter(methodWrapper -> !excluded(methodWrapper) && hasInstructions(methodWrapper.methodNode)).forEach(methodWrapper -> { MethodNode methodNode = methodWrapper.methodNode; int leeway = getSizeLeeway(methodNode); int varIndex = methodNode.maxLocals; methodNode.maxLocals++; AbstractInsnNode[] untouchedList = methodNode.instructions.toArray(); LabelNode labelNode = exitLabel(methodNode); boolean calledSuper = false; Set<AbstractInsnNode> emptyAt = new StackEmulator(methodNode,
public static FlowObfuscation getTransformerFromString(String s) { switch (s.toLowerCase()) { case "light": { return new LightFlowObfuscation(); } case "normal": { return new NormalFlowObfuscation(); } case "heavy": { return new HeavyFlowObfuscation(); } default: { throw new IllegalConfigurationValueException("Did not expect " + s + " as a flow obfuscation mode"); } } } }