@@ -26,58 +26,58 @@ public class TestDeobfuscation extends TestDeobfuscationBase {
2626 protected void registerAll () {
2727 test ("Inlining local variables" )
2828 .transformers (InlineLocalVariablesTransformer ::new , ComposedPeepholeCleanTransformer ::new )
29- .input ( OutputType . SINGLE_CLASS , InputType .JAVA_CODE , "TestInlineLocalVariables.class" )
29+ .inputClass ( InputType .JAVA_CODE , "TestInlineLocalVariables.class" )
3030 .register ();
3131 test ("Simple flow obfuscation" )
3232 .transformers (ComposedGeneralFlowTransformer ::new )
33- .input ( OutputType . SINGLE_CLASS , InputType .JAVA_CODE , "TestSimpleFlowObfuscation.class" )
33+ .inputClass ( InputType .JAVA_CODE , "TestSimpleFlowObfuscation.class" )
3434 .register ();
3535 test ("Universal number transformer" )
3636 .transformers (UniversalNumberTransformer ::new )
37- .input ( OutputType . SINGLE_CLASS , InputType .JAVA_CODE , "TestUniversalNumberTransformer.class" )
37+ .inputClass ( InputType .JAVA_CODE , "TestUniversalNumberTransformer.class" )
3838 .register ();
3939 test ("String builder transformer" )
4040 .transformers (StringBuilderTransformer ::new )
41- .input ( OutputType . SINGLE_CLASS , InputType .JAVA_CODE , "TestStringBuilderTransformer.class" )
41+ .inputClass ( InputType .JAVA_CODE , "TestStringBuilderTransformer.class" )
4242 .register ();
4343 // TODO: Uninitialized static fields should replace with 0?
4444 test ("Inline static fields" )
4545 .transformers (InlineStaticFieldTransformer ::new , UselessPopCleanTransformer ::new )
46- .input ( OutputType . SINGLE_CLASS , InputType .JAVA_CODE , "TestInlineStaticFields.class" )
46+ .inputClass ( InputType .JAVA_CODE , "TestInlineStaticFields.class" )
4747 .register ();
4848 test ("Inline static fields with modification" )
4949 .transformers (InlineStaticFieldTransformer ::new , UselessPopCleanTransformer ::new )
50- .input ( OutputType . SINGLE_CLASS , InputType .JAVA_CODE , "TestInlineStaticFieldsWithModification.class" )
50+ .inputClass ( InputType .JAVA_CODE , "TestInlineStaticFieldsWithModification.class" )
5151 .register ();
5252 test ("Remapper" )
5353 .transformers (RemapperTransformer ::new )
54- .input ( OutputType . MULTIPLE_CLASSES , InputType .JAVA_CODE , "remap" )
54+ .inputClassesDir ( InputType .JAVA_CODE , "remap" )
5555 .register ();
5656
5757 // Test sandbox security (e.g. not allowing dangerous calls)
5858 test ("Sandbox security" )
5959 .transformers (TestSandboxSecurityTransformer ::new )
60- .input ( OutputType . SINGLE_CLASS , InputType .JAVA_CODE , "sandbox/TestSandboxSecurity.class" )
60+ .inputClass ( InputType .JAVA_CODE , "sandbox/TestSandboxSecurity.class" )
6161 .noDecompile ()
6262 .register ();
6363
6464 // JSR Inlining
6565 test ("JSR Inlining" )
6666 .transformers (JsrInlinerTransformer ::new )
67- .input ( OutputType . SINGLE_CLASS , InputType .CUSTOM_CLASS , "JSR.class" )
67+ .inputClass ( InputType .CUSTOM_CLASS , "JSR.class" )
6868 .register ();
6969
7070 // Unknown obf 1
7171 // TODO: If you know the obfuscator used to obfuscate this class, you can make a PR which renames this test
7272 test ("Unknown obf 1" )
7373 .transformers (ComposedUnknownObf1Transformer ::new )
74- .input ( OutputType . MULTIPLE_CLASSES , InputType .CUSTOM_CLASS , "unknown/obf1" )
74+ .inputClassesDir ( InputType .CUSTOM_CLASS , "unknown/obf1" )
7575 .register ();
7676
7777 // Zelix
7878 test ("Zelix (22.0.3) Sample 1" )
7979 .transformers (() -> new ComposedZelixTransformer (true ))
80- .input ( OutputType . MULTIPLE_CLASSES , InputType .CUSTOM_CLASS , "zkm/sample1" )
80+ .inputClassesDir ( InputType .CUSTOM_CLASS , "zkm/sample1" )
8181 .register ();
8282 // Obfuscated using this ZKM config (https://www.zelix.com/klassmaster/docs/langZKMScript.html):
8383 /*
@@ -103,7 +103,7 @@ protected void registerAll() {
103103 // so we need to also pass it here for correct decrypted values
104104 Map .of ("a.a.a.a.a4" , "a.a.a.a.bc" )
105105 ))
106- .input ( OutputType . MULTIPLE_CLASSES , InputType .CUSTOM_CLASS , "zkm/sample2" )
106+ .inputClassesDir ( InputType .CUSTOM_CLASS , "zkm/sample2" )
107107 .register ();
108108 // Obfuscated using the following ZKM config (https://www.zelix.com/klassmaster/docs/langZKMScript.html):
109109 /*
@@ -126,7 +126,7 @@ protected void registerAll() {
126126 */
127127 test ("Zelix (22.0.3) Sample 3 - Snake Game" )
128128 .transformers (() -> new ComposedZelixTransformer (true ))
129- .input ( OutputType . MULTIPLE_CLASSES , InputType . CUSTOM_JAR , "SnakeGame-obf-zkm.jar" )
129+ .inputJar ( "SnakeGame-obf-zkm.jar" )
130130 .register ();
131131
132132 // Zelix (22.0.3)
@@ -147,70 +147,70 @@ protected void registerAll() {
147147 */
148148 test ("Zelix (22.0.3) - String Encryption - Enhanced - Some strings" )
149149 .transformers (ComposedZelixTransformer ::new )
150- .input ( OutputType . SINGLE_CLASS , InputType .CUSTOM_CLASS , "zkm/EnhancedStringEncSomeStrings.class" )
150+ .inputClass ( InputType .CUSTOM_CLASS , "zkm/EnhancedStringEncSomeStrings.class" )
151151 .register ();
152152 test ("Zelix (22.0.3) - String Encryption - Enhanced - Many strings" )
153153 .transformers (ComposedZelixTransformer ::new )
154- .input ( OutputType . SINGLE_CLASS , InputType .CUSTOM_CLASS , "zkm/EnhancedStringEncManyStrings.class" )
154+ .inputClass ( InputType .CUSTOM_CLASS , "zkm/EnhancedStringEncManyStrings.class" )
155155 .register ();
156156
157157 // Example HP888 classes
158158 test ("HP888" )
159159 .transformers (() -> new ComposedHP888Transformer (".mc" ))
160- .input ( OutputType . MULTIPLE_CLASSES , InputType .CUSTOM_CLASS , "hp888" )
160+ .inputClassesDir ( InputType .CUSTOM_CLASS , "hp888" )
161161 .register ();
162162
163163 // qProtect
164164 test ("qProtect Sample 1" )
165165 .transformers (Composed_qProtectTransformer ::new )
166- .input ( OutputType . MULTIPLE_CLASSES , InputType .CUSTOM_CLASS , "qprotect/sample1" )
166+ .inputClassesDir ( InputType .CUSTOM_CLASS , "qprotect/sample1" )
167167 .register ();
168168
169169 test ("qProtect Sample 2" )
170170 .transformers (Composed_qProtectTransformer ::new , RemapperTransformer ::new )
171- .input ( OutputType . MULTIPLE_CLASSES , InputType .CUSTOM_CLASS , "qprotect/sample2" )
171+ .inputClassesDir ( InputType .CUSTOM_CLASS , "qprotect/sample2" )
172172 .register ();
173173
174174 test ("qProtect Sample 3" )
175175 .transformers (Composed_qProtectTransformer ::new )
176- .input ( OutputType . MULTIPLE_CLASSES , InputType .CUSTOM_CLASS , "qprotect/sample3" )
176+ .inputClassesDir ( InputType .CUSTOM_CLASS , "qprotect/sample3" )
177177 .register ();
178178
179179 test ("qProtect-Lite Jar Sample" )
180180 .transformers (Composed_qProtectTransformer ::new )
181- .input ( OutputType . MULTIPLE_CLASSES , InputType . CUSTOM_JAR , "qprotect-obf.jar" )
181+ .inputJar ( "qprotect-obf.jar" )
182182 .register ();
183183
184184 // Superblaubeere
185185 test ("Superblaubeere Sample 1" )
186186 .transformers (ComposedSuperblaubeereTransformer ::new )
187- .input ( OutputType . MULTIPLE_CLASSES , InputType .CUSTOM_CLASS , "sb27/sample1" )
187+ .inputClassesDir ( InputType .CUSTOM_CLASS , "sb27/sample1" )
188188 .register ();
189189
190190 // Grunt
191191 test ("Grunt Sample 1" )
192192 .transformers (ComposedGruntTransformer ::new )
193- .input ( OutputType . MULTIPLE_CLASSES , InputType . CUSTOM_JAR , "grunt-obf.jar" )
193+ .inputJar ( "grunt-obf.jar" )
194194 .register ();
195195
196196 test ("POP2 Sample" )
197197 .transformers (UselessPopCleanTransformer ::new )
198- .input ( OutputType . SINGLE_CLASS , InputType .CUSTOM_CLASS , "Pop2Sample.class" )
198+ .inputClass ( InputType .CUSTOM_CLASS , "Pop2Sample.class" )
199199 .register ();
200200
201201 test ("Kotlin Sample" )
202202 .transformers (UselessPopCleanTransformer ::new )
203- .input ( OutputType . SINGLE_CLASS , InputType .CUSTOM_CLASS , "KotlinSample.class" )
203+ .inputClass ( InputType .CUSTOM_CLASS , "KotlinSample.class" )
204204 .register ();
205205
206206 test ("Kotlin Sample 2" )
207207 .transformers (UselessPopCleanTransformer ::new )
208- .input ( OutputType . SINGLE_CLASS , InputType .CUSTOM_CLASS , "KotlinSample2.class" )
208+ .inputClass ( InputType .CUSTOM_CLASS , "KotlinSample2.class" )
209209 .register ();
210210
211211 test ("Kotlin Sample 3" )
212212 .transformers (UselessPopCleanTransformer ::new )
213- .input ( OutputType . SINGLE_CLASS , InputType .CUSTOM_CLASS , "KotlinSample3.class" )
213+ .inputClass ( InputType .CUSTOM_CLASS , "KotlinSample3.class" )
214214 .register ();
215215 }
216216}
0 commit comments