Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 decompile APK C++ android studio, Pro decompiler are most welcome

views
     
RNM
post Aug 19 2017, 11:01 AM

Getting Started
**
Junior Member
187 posts

Joined: Jul 2017
Base64 is reversible. Try to add XOR, make it difficult to rce
RNM
post Aug 22 2017, 11:36 AM

Getting Started
**
Junior Member
187 posts

Joined: Jul 2017
QUOTE(test.php @ Aug 22 2017, 09:46 AM)
hmm i dont really understand. any example?

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", "");

    }
}
*
Yes, use the XOR.


 

Change to:
| Lo-Fi Version
0.0126sec    0.43    6 queries    GZIP Disabled
Time is now: 28th March 2024 - 06:59 PM