AS3 better deobfuscation

This commit is contained in:
Jindra Pet��k
2013-03-22 21:00:35 +01:00
parent 4d1aeb00d1
commit 2985b37628
68 changed files with 656 additions and 437 deletions
@@ -185,9 +185,10 @@ public class Helper {
return ret;
}
public static String bytesToHexString(byte bytes[]){
return bytesToHexString(bytes,0);
public static String bytesToHexString(byte bytes[]) {
return bytesToHexString(bytes, 0);
}
public static String bytesToHexString(byte bytes[], int start) {
StringBuilder sb = new StringBuilder();
if (start < bytes.length) {
@@ -323,12 +324,12 @@ public class Helper {
} catch (Exception ex) {
}
}
public static String stripComments(String str){
public static String stripComments(String str) {
return str.replaceAll("<ffdec:hex>[^\r\n]*</ffdec:hex>\r?\n", "");
}
public static String hexToComments(String str){
public static String hexToComments(String str) {
return str.replaceAll("<ffdec:hex>([^\r\n]*)</ffdec:hex>(\r?\n)", "; $1$2");
}
}