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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| package com.vvvtimes.main;
public class ZKMDeCodeString { private static String dexor(String str) { char key[] = new char[] { 116, 91, 57, 40, 121, 92, 118 }; char arr[] = str.toCharArray(); for (int i = 0; i < arr.length; i++) { arr[i] ^= key[i % 7]; } return new String(arr); }
private static String decryption(int iv, String str) {
char[] ch = str.toCharArray(); short key[] = new short[] { 181, 149, 85, 171, 128, 103, 238, 159, 225, 234, 14, 200, 138, 205, 127, 50, 186, 169, 68, 61, 10, 46, 121, 230, 80, 89, 0, 24, 167, 5, 132, 53, 81, 231, 141, 251, 241, 219, 173, 20, 38, 182, 229, 67, 183, 188, 222, 107, 248, 244, 156, 88, 246, 240, 13, 211, 49, 144, 40, 21, 130, 179, 202, 194, 201, 174, 117, 99, 137, 6, 12, 153, 213, 206, 93, 249, 33, 28, 120, 95, 37, 4, 55, 237, 102, 196, 34, 216, 143, 98, 133, 94, 203, 254, 92, 2, 16, 124, 48, 11, 3, 163, 221, 195, 192, 59, 119, 161, 72, 29, 160, 224, 198, 41, 42, 65, 114, 136, 176, 22, 122, 209, 129, 100, 112, 82, 43, 35, 83, 189, 255, 78, 239, 52, 252, 116, 60, 193, 207, 101, 142, 51, 74, 76, 154, 145, 105, 30, 31, 27, 204, 54, 7, 110, 166, 123, 150, 208, 115, 75, 134, 36, 199, 125, 210, 109, 17, 71, 152, 104, 178, 44, 165, 87, 235, 1, 220, 108, 106, 148, 56, 15, 250, 62, 151, 26, 243, 57, 172, 66, 197, 223, 228, 63, 19, 70, 126, 164, 212, 158, 227, 139, 111, 91, 23, 253, 147, 170, 226, 97, 39, 155, 79, 247, 215, 233, 218, 118, 175, 32, 135, 18, 69, 168, 242, 86, 245, 45, 25, 236, 180, 77, 157, 73, 187, 214, 232, 64, 131, 9, 146, 58, 47, 191, 140, 185, 177, 8, 90, 96, 190, 184, 113, 162, 217, 84 };
short v0 = key[ch[0] & 255]; int v1 = (iv & 255) - v0; if (v1 < 0) { v1 += 256; }
int v2 = ((iv & '\uffff') >>> 8) - v0; if (v2 < 0) { v2 += 256; } for (int i = 0; i < ch.length; ++i) { if (i % 2 == 0) { ch[i] = (char) (ch[i] ^ v1); v1 = ((v1 >>> 3 | v1 << 5) ^ ch[i]) & 255; } else { ch[i] = (char) (ch[i] ^ v2); v2 = ((v2 >>> 3 | v2 << 5) ^ ch[i]) & 255; } } return new String(ch); }
public static void main(String args[]) { String cipherText = "\u0093íè[Í\u0005ükçÀú"; String[] cipherArray = new String[] { cipherText.substring(0, 5), cipherText.substring(6, 11) };
System.out.println(cipherArray[0]); System.out.println(dexor(cipherArray[0])); System.out.println(decryption(8444, dexor(cipherArray[0])));
System.out.println(cipherArray[1]); System.out.println(dexor(cipherArray[1])); System.out.println(decryption(-25829, dexor(cipherArray[1])));
} }
|