-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
120 lines (92 loc) · 3.2 KB
/
index.html
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!--<!DOCTYPE html>-->
<!-- 解析的视频地址 -->
<!-- https://tv.gxtv.cn/channel/channelivePlay_78dbfd44e6b74ab687204d2d8113cbf5.html -->
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="DecryptTS.js"></script>
<style>
.bg{
display: flex;
flex-direction: column;
align-items: center;
}
.btns{
margin-left: 20px;
display: flex;
flex-direction: column;
align-items: flex-start;
}
</style>
</head>
<boby>
<div class="bg">
<h1>【阿里云加密ts文件】解密</h1>
<div class="btns">
<div style="color:#999;font-size: 12px; margin-bottom: 20px;margin-left: 5px;">注:因不同网站AES的key是不同的.所以仅对某网站有效,具体请看代码。<br>若要解析其他网站,替换AES解密代码和key即可。
<br> 吾爱破解id:billsmiless <a href="https://www.jianshu.com/p/989f6d61fa81">使用说明</a> </div>
<form action="/" method="post" enctype="multipart/form-data">
<input type="file" accept="*.mp2" name="file" id="tsfile">
</form>
<div style="font-size: 14px;margin-left: 5px;">
AES Key (Base64):
<input type="text" name="key" id = "key" value="jC0CLrqIi4m3Mut86OHvLw=="><br>
</div>
<button type="button" style = "margin-top: 20px;"onclick="readFile();">开始解密</button>
</div>
</div>
<script>
// 获取文件内容
function readFile() {
console.log('读取文件');
var file = document.getElementById("tsfile").files[0];
if( !file ) {
alert('请选择ts文件');
return;
}
let key = document.getElementById("key").value;
if( !key) {
alert('请输入AES Key,可通过抓包获取');
return;
}
let fileReader = new FileReader();
fileReader.onload = function completed() {
var data = fileReader.result;
if( !data ) {
alert('读取ts文件失败');
return;
}
startDecrypt(data);
}
fileReader.readAsArrayBuffer(file);
}
function startDecrypt(data) {
let key = document.getElementById("key").value;
var u8 = new Uint8Array(data);
let decryptData = decryptTS(u8,key);
bill_saveTs(decryptData);
}
function bill_saveTs(d) {
if( !d ) {
alert('解密ts失败');
return;
}
console.log('bill:保存解密后的ts文件');
let time = new Date().getTime()
let fileName = "video"+time.toString()+".ts", data = d.buffer;
var blob = new Blob([data],{
type: "arrayBuffer"
});
let url = window.URL.createObjectURL(blob);
let link = document.createElement('a');
link.style.display = 'none';
link.href = url;
link.setAttribute('download', fileName);
document.body.appendChild(link);
link.click();
link.remove();
alert('解密成功:'+fileName+',即将保存');
}
</script>
</boby>
</html>