-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRCZTransformer.java
More file actions
48 lines (37 loc) · 1.49 KB
/
Copy pathRCZTransformer.java
File metadata and controls
48 lines (37 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* @author Halq
* @since 08/10/22
*/
public class RCZTransformer {
static String prefix = "$HalqRCZ!$ ";
static String random = RCZMapping.randomAlphabet();
static String getRandom = random;
public static String encodeBytes(String input) {
RCZMapping.INSTANCE.res();
StringBuffer output = new StringBuffer();
for (int i = 0; i < input.length(); i++) {
String vq = input.charAt(i) + "";
if (RCZMapping.INSTANCE.byteHashMap.containsKey(vq)) {
output.append(RCZMapping.INSTANCE.byteHashMap.get(vq));
output.toString().replace("[", "");
} else {
output.append(vq);
}
}
System.out.println("[RCZ] Updating Bytes" + output);
return prefix + output.toString().replace("[", "").replace("]", getRandom);
}
public static String removeAbsP(String input) {
if (input.startsWith(prefix)) {
return input.replace(getRandom, "-").replace(prefix, "");
} else if (input.startsWith("[" + prefix)) {
return input.replace(getRandom, "-").replace("[" + prefix, "").replace("]", "");
}
return input.replace(getRandom, "-");
}
public static String decodeBytes(String e) {
String input = removeAbsP(e);
System.out.println("[RCZ Reverse Engineering Bytes: " + RCZMapping.revertMap(RCZMapping.revertBytes(input)));
return RCZMapping.revertMap(RCZMapping.revertBytes(input));
}
}