Base64 is reversible. Try to add XOR, make it difficult to rce
decompile APK C++ android studio, Pro decompiler are most welcome
decompile APK C++ android studio, Pro decompiler are most welcome
|
Aug 19 2017, 11:01 AM
Return to original view | Post
#1
|
Junior Member
187 posts Joined: Jul 2017 |
Base64 is reversible. Try to add XOR, make it difficult to rce
|
|
Aug 22 2017, 11:36 AM
Return to original view | IPv6 | Post
#2
|
Junior Member
187 posts Joined: Jul 2017 |
QUOTE(test.php @ Aug 22 2017, 09:46 AM) hmm i dont really understand. any example? Yes, use the XOR. i check google i got this. is this what u mean? import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; import java.io.IOException; public class StringXORer { public String encode(String s, String key) { return base64Encode(xorWithKey(s.getBytes(), key.getBytes())); } public String decode(String s, String key) { return new String(xorWithKey(base64Decode(s), key.getBytes())); } private byte[] xorWithKey(byte[] a, byte[] key) { byte[] out = new byte[a.length]; for (int i = 0; i < a.length; i++) { out[i] = (byte) (a[i] ^ key[i%key.length]); } return out; } private byte[] base64Decode(String s) { try { BASE64Decoder d = new BASE64Decoder(); return d.decodeBuffer(s); } catch (IOException e) {throw new RuntimeException(e);} } private String base64Encode(byte[] bytes) { BASE64Encoder enc = new BASE64Encoder(); return enc.encode(bytes).replaceAll("\\s", ""); } } |
Change to: | 0.0126sec
0.43
6 queries
GZIP Disabled
Time is now: 28th March 2024 - 06:59 PM |