forked from bulianglin/demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
01
48 lines (36 loc) · 1.69 KB
/
01
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
import java.security.MessageDigest;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.Charset;
import java.util.Base64;
public class HelloWorld {
public static void main(String []args) throws Exception {
String cipherText = "在此输入密文,多条用空格分割";
String key = "ks9KUrbWJj46AftX"; //heidong\leiting\mifeng KEY
//key = "awdtif20190619ti"; //xuanfen KEY
String[] strArray=cipherText.split(" ");
for (String text : strArray) {
System.out.println(decrypt(text,key));
}
}
public static String decrypt(String str, String str2) throws Exception {
Cipher instance = Cipher.getInstance("AES/CBC/NoPadding");
byte[] bytes = str2.getBytes(Charset.forName("UTF-8"));
SecretKeySpec secretKeySpec = new SecretKeySpec(bytes, "AES");
byte[] bytes2 = str2.getBytes(Charset.forName("UTF-8"));
instance.init(2, secretKeySpec, new IvParameterSpec(bytes2));
byte[] doFinal = instance.doFinal(Base64.getDecoder().decode(str));
return new String(doFinal, Charset.forName("UTF-8"));
}
}
JAVA在线运行:https://www.tutorialspoint.com/compile_java_online.php
雷霆:https://www.lt71126.xyz:20000/api/evmess
黑洞:https://www.hd327658.xyz:20000/api/evmess
蜜蜂:https://www.09898434.xyz/api/evmess?deviceid=49c95313d64fb7c5unknown&apps=cd9186e318e291300db27867d958eae5
旋风:https://www.xfjyqirx.xyz:20000/api/evmess
path替换为:/path/120306182525