-
Notifications
You must be signed in to change notification settings - Fork 26
/
test.py
271 lines (224 loc) · 24.2 KB
/
test.py
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# -*- coding: utf-8 -*-
"""
@author: obaby
@license: (C) Copyright 2013-2020, obaby@mars.
@contact: [email protected]
@link: http://www.obaby.org.cn
http://www.h4ck.org.cn
http://www.findu.co
@file: fulao.py
@time: 2020/6/28 16:04
@desc:
"""
from Crypto.Cipher import AES
import hashlib
import requests
import base64
import random
import json
import time
import urllib.parse
def aes_decrypt(key, data, ivs):
data = data.encode('utf8')
encodebytes = base64.decodebytes(data)
cipher = AES.new(key, AES.MODE_CBC, ivs)
text_decrypted = cipher.decrypt(encodebytes)
unpad = lambda s: s[0:-s[-1]]
text_decrypted = unpad(text_decrypted)
# 去补位
text_decrypted = text_decrypted.decode('utf8')
return text_decrypted
def md5(str):
m = hashlib.md5()
m.update(str.encode(encoding='utf-8'))
return m.hexdigest()
def aes_decrypt_raw(key, data, ivs):
encodebytes = data
cipher = AES.new(key, AES.MODE_CBC, ivs)
text_decrypted = cipher.decrypt(encodebytes)
unpad = lambda s: s[0:-s[-1]]
text_decrypted = unpad(text_decrypted)
# 去补位
# text_decrypted = text_decrypted.decode('utf8')
return text_decrypted
def aes_encrypt(key, data, vi):
pad = lambda s: s + (16 - len(s) % 16) * chr(16 - len(s) % 16)
data = pad(data)
# 字符串补位
cipher = AES.new(key.encode('utf8'), AES.MODE_CBC, vi.encode('utf8'))
encryptedbytes = cipher.encrypt(data.encode('utf8'))
# 加密后得到的是bytes类型的数据
encodestrs = base64.b64encode(encryptedbytes)
#
enctext = encodestrs.decode('utf8')
# 对byte字符串按utf-8进行解码
return enctext
def aes_encrypt_raw(key, data, vi):
pad = lambda s: s + (16 - len(s) % 16) * chr(16 - len(s) % 16)
data = pad(data)
# 字符串补位
cipher = AES.new(key, AES.MODE_CBC, vi)
encryptedbytes = cipher.encrypt(data.encode('utf8'))
# 加密后得到的是bytes类型的数据
encodestrs = base64.b64encode(encryptedbytes)
#
enctext = encodestrs.decode('utf8')
# 对byte字符串按utf-8进行解码
return enctext
def decode_image():
f = open(r"H:\PyCharmProjects\frida_test\avid5c33013611e90.jpg", 'rb')
b = f.read()
f.close()
# array@7687 (type=[B)
image_key_base64 = bytes('svOEKGb5WD0ezmHE4FXCVQ==', encoding='utf8') # 图片解密key
image_key = base64.decodebytes(image_key_base64)
print(image_key)
iv = base64.decodebytes(bytes('4B7eYzHTevzHvgVZfWVNIg==', encoding='utf8')) # 图片解密iv
de = aes_decrypt_raw(image_key, b, iv)
f = open(r"H:\PyCharmProjects\frida_test\avid5c33013611e90_decode.jpg", 'wb')
f.write(de)
f.close()
def request_payload_decrypt(source_string):
unquote_string = urllib.parse.unquote(source_string)
data_list = unquote_string.split('.')
key = base64.decodebytes(bytes('euZN1Gg3JIwWOEWhmE7C4l5dSSRU34fyuPMXjtuoqVs=', encoding='utf8'))
iv = base64.decodebytes(bytes(data_list[0], encoding='utf8'))
source_data = data_list[1]
decrypt_string = aes_decrypt(key, source_data, iv)
print("DECRYPT_STRING:", decrypt_string)
def new_video_get_test():
request_key = base64.decodebytes(bytes('euZN1Gg3JIwWOEWhmE7C4l5dSSRU34fyuPMXjtuoqVs=', encoding='utf8'))
request_iv = b'\x49\x09\x3E\x49\x6D\x29\x50\xBB\xF1\x67\x9C\x5D\x52\x77\xBF\x4E'
request_iv = base64.decodebytes(bytes('HTpKwS4MVfB2pktFSGRzvw==', encoding='utf8'))
ss = '{"timestamp":"' + str(int(
time.time())) + '","order":"time","video_type":"long","type":"uncover","page":"1","token":"eyJ1c2VyX2lkIjoyMTg4MjU2NCwibGFzdGxvZ2luIjoxNTkzMzI3NzQyfQ.c39375da9af6cf24aae0349c4f0b5641.9b0e72bc9a1eea26114dc955d730603e4c11f865d43ea9595d9fd29c","path":"v1/videos/menu/0"}'
ds = aes_encrypt_raw(request_key, ss, request_iv)
print(ds)
payload = 'HTpKwS4MVfB2pktFSGRzvw==.' + ds
base_url = 'https://api-tc.bjsongmoxuan.cn/v1/videos/menu/0?payload=' + urllib.parse.quote(payload)
print(base_url)
resp = requests.get(base_url)
print(resp.text)
# 1216557403 x-vtag
response_headers = resp.headers
vtag = response_headers.get('x-vtag')
print(vtag)
i = md5(vtag)
print(i)
iv = i[8:24]
print(iv)
new_key = md5('fe34dd6bbd3020c2fb69abe73b5b973c')
dds = aes_decrypt(new_key.encode('utf8'),
resp.text,
iv.encode('utf8'))
print(dds)
def new_video_get_recommand_test(video_id):
request_key = base64.decodebytes(bytes('euZN1Gg3JIwWOEWhmE7C4l5dSSRU34fyuPMXjtuoqVs=', encoding='utf8'))
request_iv = b'\x49\x09\x3E\x49\x6D\x29\x50\xBB\xF1\x67\x9C\x5D\x52\x77\xBF\x4E'
request_iv = base64.decodebytes(bytes('HTpKwS4MVfB2pktFSGRzvw==', encoding='utf8'))
ss = '{"timestamp":"' + str(int(
time.time())) + '","page":"1","token":"eyJ1c2VyX2lkIjoyMTg4MjU2NCwibGFzdGxvZ2luIjoxNTkzMzI3NzQyfQ.c39375da9af6cf24aae0349c4f0b5641.9b0e72bc9a1eea26114dc955d730603e4c11f865d43ea9595d9fd29c","path":"v1/videos/recommend/' + video_id + '"}'
ds = aes_encrypt_raw(request_key, ss, request_iv)
print(ds)
payload = 'HTpKwS4MVfB2pktFSGRzvw==.' + ds
base_url = 'https://api.bdxxo.cn/v1/videos/recommend/' + video_id + '?payload=' + urllib.parse.quote(payload)
print(base_url)
resp = requests.get(base_url)
print(resp.text)
# 1216557403 x-vtag
response_headers = resp.headers
vtag = response_headers.get('x-vtag')
print(vtag)
i = md5(vtag)
print(i)
iv = i[8:24]
print(iv)
new_key = md5('fe34dd6bbd3020c2fb69abe73b5b973c')
dds = aes_decrypt(new_key.encode('utf8'),
resp.text,
iv.encode('utf8'))
print(dds)
def new_video_get_detail_test(video_id):
request_key = base64.decodebytes(bytes('euZN1Gg3JIwWOEWhmE7C4l5dSSRU34fyuPMXjtuoqVs=', encoding='utf8'))
request_iv = b'\x49\x09\x3E\x49\x6D\x29\x50\xBB\xF1\x67\x9C\x5D\x52\x77\xBF\x4E'
request_iv = base64.decodebytes(bytes('HTpKwS4MVfB2pktFSGRzvw==', encoding='utf8'))
# {"an_stream":"https://tv-as.00ph.cn","timestamp":"1593568332","an_quality":"240","token":"eyJ1c2VyX2lkIjoyMTg4MjU2NCwibGFzdGxvZ2luIjoxNTkzMzI3NzQyfQ.c39375da9af6cf24aae0349c4f0b5641.9b0e72bc9a1eea26114dc955d730603e4c11f865d43ea9595d9fd29c","path":"v1/video/info/65696"}
ss = '{"an_stream":"https://tv-as.00ph.cn","timestamp":"' + str(int(
time.time())) + '","an_quality":"240","token":"eyJ1c2VyX2lkIjoyMTg4MjU2NCwibGFzdGxvZ2luIjoxNTkzMzI3NzQyfQ.c39375da9af6cf24aae0349c4f0b5641.9b0e72bc9a1eea26114dc955d730603e4c11f865d43ea9595d9fd29c","path":"v1/video/info/' + video_id + '"}'
ds = aes_encrypt_raw(request_key, ss, request_iv)
print(ds)
payload = 'HTpKwS4MVfB2pktFSGRzvw==.' + ds
base_url = 'https://api.bdxxo.cn/v1/video/info/' + video_id + '?payload=' + urllib.parse.quote(payload)
print(base_url)
resp = requests.get(base_url)
print(resp.text)
# 1216557403 x-vtag
response_headers = resp.headers
vtag = response_headers.get('x-vtag')
print(vtag)
i = md5(vtag)
print(i)
iv = i[8:24]
print(iv)
new_key = md5('fe34dd6bbd3020c2fb69abe73b5b973c')
dds = aes_decrypt(new_key.encode('utf8'),
resp.text,
iv.encode('utf8'))
print(dds)
def decrypt_m3u8_data(base_url):
resp = requests.get(base_url)
print(resp.text)
# 1216557403 x-vtag
response_headers = resp.headers
vtag = response_headers.get('x-vtag')
print(vtag)
i = md5(vtag)
print(i)
iv = i[8:24]
print(iv)
new_key = md5('fe34dd6bbd3020c2fb69abe73b5b973c')
dds = aes_decrypt(new_key.encode('utf8'),
resp.text,
iv.encode('utf8'))
print(dds)
if __name__ == "__main__":
#decode_image()
# 请求
# {'type': 'send', 'payload': 'key:[object Object]'}
# {'type': 'send', 'payload': 'euZN1Gg3JIwWOEWhmE7C4l5dSSRU34fyuPMXjtuoqVs=\n'}
# {'type': 'send', 'payload': 'iv:[object Object]'}
# {'type': 'send', 'payload': 'Eon68Zl7XqMuUmzP0cC+dQ==\n'}
# {'type': 'send', 'payload': 'source_string:'}
# {'type': 'send', 'payload': '{"timestamp":"1593417133","order":"time","video_type":"long","type":"uncover","page":"1","token":"eyJ1c2VyX2lkIjoyMTg4MjU2NCwibGFzdGxvZ2luIjoxNTkzMzI3NzQyfQ.c39375da9af6cf24aae0349c4f0b5641.9b0e72bc9a1eea26114dc955d730603e4c11f865d43ea9595d9fd29c","path":"v1/videos/menu/0"}'}
# request_key = base64.decodebytes(bytes('euZN1Gg3JIwWOEWhmE7C4l5dSSRU34fyuPMXjtuoqVs=', encoding='utf8'))
# request_iv = b'\x49\x09\x3E\x49\x6D\x29\x50\xBB\xF1\x67\x9C\x5D\x52\x77\xBF\x4E'
# request_iv = base64.decodebytes(bytes('xTYZDR9+A9V4fMGVh1fSNA==', encoding='utf8'))
#
# ss = '{"timestamp":"1593567379","page":"1","token":"eyJ1c2VyX2lkIjoyMTg4MjU2NCwibGFzdGxvZ2luIjoxNTkzMzI3NzQyfQ.c39375da9af6cf24aae0349c4f0b5641.9b0e72bc9a1eea26114dc955d730603e4c11f865d43ea9595d9fd29c","path":"v1/videos/recommend/115012"}'
#
# ds = AES_Encrypt_raw(request_key, ss, request_iv)
# print(ds)
# request_iv2 = base64.decodebytes(bytes('xTYZDR9+A9V4fMGVh1fSNA==', encoding='utf8'))
# dds = AES_Decrypt(request_key,
# 'FnU3ErWDIJAINm8+lEarYVLpoygtStEjh+857fpY991koQhkFrKMVLlZCcZ9k2wf+xT6SzeKjF5K4vgofUkBeAuz5uICLJsDW55y690hKclFu7Xld+IuYr8ITrz91tmTQXYHZ5OLujpY2I/XWRcNzvdbxm2OkFDMJsQcZRe2fZAzFGZjoG3k+PcpsHZJngOns8IhBd2rxjm0tyr5vLnzQCvX4wB+sqIQ4pnTOlBQk/jkNUM7lQ9Tcg/2lJRGdwi2MaEAYe1X8r7TZECmyiwVyGgBFQcpuUbq/ECiyw2xWCtt1r7yRQajyqoDb2H7+8Be',
# request_iv2)
# print(dds)
#
new_video_get_test()
# rep = 'ziUYszNSfFuNwT1vIJ2POXw71rJv255ZBhLaNWEK+yMK/3RN6wUjoQrRhMGigXgNNNd7m0pG42BnNjY7Ob5UAmnCt1FAhm8LMtmE3mQ6AEWrss++A8usfOJV+mhHBty1utnVcHSt2n8A3Zs9HRbF0dN5zMTClGxn7HdRPnP5u4yhJQUWH6hROFFtYMzb29l2kKu6VBgjVRnMDSIXMy46Ip9x43vCrOO1oAuuODR+eGOHk6TXoWml9/WGPcMO32GrtBIQiKBJCCd9Hfe6Oj6n0Ggz63JA9R5WCci+XL1snnu39YHwZU7vEq0Bjueqr0/cEEm3OtmvPhYmLkIJWd2Iy/OL7vIHqG/4dTMaYVa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5efKTm0z1r56bWRQwdkPeN0rNu8tWprWmtcSrJf8AaQMbjPU89zSUZORNKzmMp4L94QD2mTaurY/vCoK8vXy3HaJa+GlO9+uBgl9nUN4Up17k207JQqkZomIf1U9+m/3/NVM/DB9+sEwfm0ENJeM86hKFpmpMg1nTIBwKf9IBp0MgFMrEkP4IGPujYlROH3WbhU3MRS4Y07nf/xVeHYVKQC4Yoy5xAIH3sRritprOAv4ExI9h1zP44AWisVLeF40jCTH+k464J6xlrPIxrw8B1Gu/71KYXBpQ3XooeZOmxw9DSiWZW5HSDXGKzUc4syBIFlvEK2KFUpWIRBlyZ+gtaaYiv4RLH/xj0FZ57eSkKK3l0nOswlv8obEjUdwq8AS3nPATUDMqdgDCRGw5QYC1XqCM0wPYgWV4DWfXkz5QFCTnplL027s6+NYi5h71d3Aaa2HkVNTl9NTyipR/QG45hCT+VBE6+0YkrLeTxs2Xat+SCo/gVGY2hhiS+VWuQDcTImS2qyTs6ieoGiNh3UpJGd9b2GecOexG4lHqpzLq+fGCS8J4xURDf/Ym4/uSLdOdAvtu7UyyP7Vdu9DOUUO78Au1PHKoy1biMnbuaRqzF8EpRHc'
#
# request_key = base64.decodebytes(bytes('euZN1Gg3JIwWOEWhmE7C4l5dSSRU34fyuPMXjtuoqVs=', encoding='utf8'))
# request_iv = base64.decodebytes(bytes('W8Z1MKAeHL7ufgf/XOFNzw==', encoding='utf8'))
#
# te = base64.decodebytes(bytes('tXsXUQQFotRuxgCH2i5dNw==', encoding='utf8'))
# print(te)
#
# dds = AES_Decrypt(request_key,
# rep,
# request_iv)
# print(dds)
s = 'zKh3eskoQsIj%2FZizh%2Fuysg%3D%3D.8cV0gzp1SbuNaQram0B%2B14W3TuFVUrGzocu9F3a%2BP1l4qioKqKzrz5ZQoBKdNz%2FSOesij1T%2BTCXzK%2FclvuhIHZnsFAGav%2F5oqcJ4rGSfO4%2F%2FHc24cr%2B%2FKT6RPKo8nxu5T2nnmO%2BhxSC9YlMnvIiyNvGlqdIJw%2Fx%2FAIWaswYbC6aL99jM63dp5jXdlApAftGSYI9KrIknhZ208M0NVmCae4ZmYFxEtWQ0a4Gku5uJ%2BQnAbX%2FIkSiQ50FAS6MZd7ZV%2Fwqt0B0oJTgUmiboEN7G16MsrNqt2taBRAtedl33i6Qe2nAd7FsYzLFopoww1pf9GiiRHceS6f1ZjoosR5IrboptQp6Sh1QnT8JUO3qsj0c%3D'
request_payload_decrypt(s)
new_video_get_recommand_test('64852')
new_video_get_detail_test('64852')
decrypt_m3u8_data('https://tv-as.00ph.cn/media/240/64852.m3u8?expire=1593570576&hash=4f11da5357d1b89828a952984fef1177')