厂长影视bug

This commit is contained in:
lushunming 2024-08-06 15:12:27 +08:00
parent 5a831250ca
commit 3a86b82cf7
6 changed files with 69 additions and 12 deletions

View File

@ -199,6 +199,7 @@ public class ChangZhang extends Spider {
String content = OkHttp.string(id, getHeader());
Document document = Jsoup.parse(content);
Elements iframe = document.select("iframe");
if (!iframe.isEmpty()) {
String videoContent = OkHttp.string(iframe.get(0).attr("src"), getIframeHeader(iframe.get(0).attr("src")));
@ -210,7 +211,40 @@ public class ChangZhang extends Spider {
Map<String, String> header = getVideoHeader();
String temp = decodeStr(realUrl);
return Result.get().url(temp).string();
} else {
for (Element script : document.select("script")) {
String scriptText = script.html();
if (scriptText.contains("wp_nonce")) {
String reg = "var(.*?)=\"(.*?)\"";
Pattern pattern = Pattern.compile(reg);
Matcher matcher = pattern.matcher(scriptText);
if (matcher.find()) {
String data = matcher.group(2);
String result = dncry(data);
String regex = "url:.*?['\"](.*?)['\"]";
Pattern pattern1 = Pattern.compile(regex);
Matcher matcher1 = pattern1.matcher(result);
if (matcher1.find()) {
String playUrl = matcher1.group(0).replace("\"", "").replace("url:", "").trim();
return Result.get().url(playUrl).string();
}
}
}
}
}
return null;
}
String dncry(String data) {
String kc8a64 = "336460fdcb76a597";
String iv = "1234567890983456";
return AESEncryption.decrypt(data, kc8a64, iv);
}
;
String decodeStr(String _0x267828) {
int _0x5cd2b5 = (_0x267828.length() - 7) / 2;

View File

@ -4,6 +4,8 @@ import android.util.Base64;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
@ -55,6 +57,27 @@ public class AESEncryption {
}
}
public static String decrypt(String word,String key,String iv) {
try {
byte[] keyBytes = key.getBytes("UTF-8");
SecretKeySpec keySpec = new SecretKeySpec(keyBytes, "AES");
byte[] ivBytes = iv.getBytes("UTF-8");
IvParameterSpec ivSpec = new IvParameterSpec(ivBytes);
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
cipher.init(Cipher.DECRYPT_MODE, keySpec, ivSpec);
byte[] decoded = Base64.decode(word, Base64.DEFAULT);
byte[] decrypted = cipher.doFinal(decoded);
return new String(decrypted, Charset.defaultCharset());
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
private static byte[] hexStringToByteArray(String hexString) {
int len = hexString.length();
byte[] data = new byte[len / 2];

View File

@ -75,7 +75,7 @@ public class ChangZhangTest {
@org.junit.Test
public void playerContent() throws Exception {
String froms = "厂长$$$";
String urls = "立即播放 (周处除三害)$https://www.czys.pro/v_play/bXZfMTc1ODAtbm1fMQ==.html$$$";
String urls = "立即播放 (周处除三害)$https://www.czys.pro/v_play/bXZfMTg2MjEtbm1fMQ==.html$$$";
for (int i = 0; i < urls.split("\\$\\$\\$").length; i++) {
String content = spider.playerContent(froms.split("\\$\\$\\$")[i], urls.split("\\$\\$\\$")[i].split("\\$")[1], new ArrayList<>());
JsonObject map = Json.safeObject(content);

Binary file not shown.

View File

@ -1 +1 @@
a2dc46da2b4b48c7111366fa3e02897e
fdccfbf91a5b725dcade07fe35e444c9

View File

@ -1,5 +1,5 @@
{
"spider": "../jar/custom_spider.jar;md5;a2dc46da2b4b48c7111366fa3e02897e",
"spider": "../jar/custom_spider.jar;md5;fdccfbf91a5b725dcade07fe35e444c9",
"lives": [
{
"name": "直播ipv6",