File tree Expand file tree Collapse file tree 8 files changed +45
-9
lines changed
main/java/com/nmmedit/apkprotect
test/java/com/nmmedit/apkprotect/deobfus
src/main/java/com/nmmedit/protect Expand file tree Collapse file tree 8 files changed +45
-9
lines changed Original file line number Diff line number Diff line change 1- package com .nmmedit .apkprotect .obfus ;
1+ package com .nmmedit .apkprotect .deobfus ;
22
33public interface MappingProcessor {
44 /**
Original file line number Diff line number Diff line change 1- package com .nmmedit .apkprotect .obfus ;
1+ package com .nmmedit .apkprotect .deobfus ;
22
33import java .io .BufferedReader ;
44import java .io .File ;
Original file line number Diff line number Diff line change 1- package com .nmmedit .apkprotect .obfus ;
1+ package com .nmmedit .apkprotect .deobfus ;
22
33public class Pair <T > {
44 public final T first ;
Original file line number Diff line number Diff line change 11package com .nmmedit .apkprotect .dex2c .filters ;
22
3- import com .nmmedit .apkprotect .obfus .MappingReader ;
3+ import com .nmmedit .apkprotect .deobfus .MappingReader ;
44import org .jf .dexlib2 .iface .ClassDef ;
55import org .jf .dexlib2 .iface .Method ;
66
Original file line number Diff line number Diff line change 11package com .nmmedit .apkprotect .dex2c .filters ;
22
3- import com .nmmedit .apkprotect .obfus .MappingProcessor ;
4- import com .nmmedit .apkprotect .obfus .MappingReader ;
3+ import com .nmmedit .apkprotect .deobfus .MappingProcessor ;
4+ import com .nmmedit .apkprotect .deobfus .MappingReader ;
55import org .jf .dexlib2 .iface .ClassDef ;
66import org .jf .dexlib2 .iface .Method ;
77
Original file line number Diff line number Diff line change 1+ package com .nmmedit .apkprotect .dex2c .filters ;
2+
3+ import org .jf .dexlib2 .iface .ClassDef ;
4+ import org .jf .dexlib2 .iface .Method ;
5+
6+ import java .io .File ;
7+
8+ /**
9+ * class * extends android.app.Activity
10+ * class * implements java.io.Serializable
11+ */
12+ public class RegexKeepConfig implements ClassAndMethodFilter {
13+ private ClassAndMethodFilter filter ;
14+
15+ public RegexKeepConfig (ClassAndMethodFilter filter , File ruleFile ) {
16+ this .filter = filter ;
17+ }
18+
19+ @ Override
20+ public boolean acceptClass (ClassDef classDef ) {
21+ if (filter != null && !filter .acceptClass (classDef )) {
22+ return false ;
23+ }
24+ //todo
25+ return true ;
26+ }
27+
28+ @ Override
29+ public boolean acceptMethod (Method method ) {
30+ if (filter != null && !filter .acceptMethod (method )) {
31+ return false ;
32+ }
33+ //todo
34+ return false ;
35+ }
36+ }
Original file line number Diff line number Diff line change 1- package com .nmmedit .apkprotect .obfus ;
1+ package com .nmmedit .apkprotect .deobfus ;
22
33import com .nmmedit .apkprotect .util .ApkUtils ;
44import org .junit .Test ;
Original file line number Diff line number Diff line change 66import com .nmmedit .apkprotect .dex2c .filters .BasicKeepConfig ;
77import com .nmmedit .apkprotect .dex2c .filters .ClassAndMethodFilter ;
88import com .nmmedit .apkprotect .dex2c .filters .ProguardMappingConfig ;
9- import com .nmmedit .apkprotect .obfus .MappingReader ;
9+ import com .nmmedit .apkprotect .deobfus .MappingReader ;
1010import com .nmmedit .apkprotect .sign .ApkVerifyCodeGenerator ;
1111import org .jf .dexlib2 .iface .ClassDef ;
1212import org .jf .dexlib2 .iface .Method ;
@@ -19,7 +19,7 @@ public class Main {
1919 public static void main (String [] args ) throws IOException {
2020 if (args .length < 1 ) {
2121 System .err .println ("No Input apk." );
22- System .err .println ("<inApk> " );
22+ System .err .println ("<inApk> [<keepRuleFile> [mapping.txt]] " );
2323 System .exit (-1 );
2424 }
2525 final File apk = new File (args [0 ]);
You can’t perform that action at this time.
0 commit comments