-
Notifications
You must be signed in to change notification settings - Fork 3
/
subtitle_decryptor.py
117 lines (109 loc) · 22.4 KB
/
subtitle_decryptor.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
from Crypto.Cipher import AES
import base64
from Crypto.Protocol.KDF import PBKDF2
from Crypto import Random
from Crypto.Cipher import AES
import base64
from hashlib import md5
import sys
class SubtitleDecryptor:
""" Python reimplementation of Animelon's unencryption of it's subtitle files.
ASS.fromString = function(raw, type) {
return void 0 === type && (type = misc_5.Format.ASS),
"d(^-^" === raw.slice(-5) ? ASS.fromStream(new parser.StringStream(ASS.parseString(raw)), type) : ASS.fromStream(new parser.StringStream(raw), type)
}
,
ASS.parseString = function(s) {
return CryptoJS.AES.decrypt(s.substring(8, s.length - 5), s.substring(0, 8).split("").reverse().join("")).toString(CryptoJS.enc.Utf8).replace(/undefined/g, "")
}
"""
def pad(self, data):
'''
Pads the data for AES encryption/decryption.
Parameters:
data (bytes): The data to pad.
Returns:
(bytes): The padded data.
'''
length = 16 - (len(data) % 16)
return data + (chr(length)*length).encode()
def unpad(self, data):
'''
Unpads the data for AES encryption/decryption.
Parameters:
data (bytes): The data to unpad.
Returns:
(bytes): The unpadded data.
'''
return data[:-(data[-1] if type(data[-1]) == int else ord(data[-1]))]
def bytes_to_key(self, data, salt, output=48):
'''
Derive a key from a password using the PBKDF2 algorithm.
Parameters:
data (bytes): The password to derive the key from.
salt (bytes): Salt for the password.
output (int): The length of the key to return.
Returns:
(bytes): The derived key.
'''
# extended from https://gist.github.com/gsakkis/4546068
assert len(salt) == 8, len(salt)
data += salt
key = md5(data).digest()
final_key = key
while len(final_key) < output:
key = md5(key + data).digest()
final_key += key
return final_key[:output]
def encrypt(self, message, passphrase):
'''
Encrypts the message using the passphrase.
Parameters:
message (bytes): The message to encrypt.
passphrase (bytes): The passphrase to use for encryption.
Returns:
(bytes): The encrypted message.
'''
salt = Random.new().read(8)
key_iv = self.bytes_to_key(passphrase, salt, 32+16)
key = key_iv[:32]
iv = key_iv[32:]
aes = AES.new(key, AES.MODE_CBC, iv)
return base64.b64encode(b"Salted__" + salt + aes.encrypt(self.pad(message)))
def decrypt(self, encrypted:bytes, passphrase:bytes):
'''
Decrypts the message using the passphrase.
Parameters:
encrypted (bytes): The encrypted message.
passphrase (bytes): The passphrase to use for decryption.
Returns:
(bytes): The decrypted message.
'''
encrypted = base64.b64decode(encrypted)
encrypted = self.pad(encrypted)
assert encrypted[0:8] == b"Salted__"
salt = encrypted[8:16]
key_iv = self.bytes_to_key(passphrase, salt, 32+16)
key = key_iv[:32]
iv = key_iv[32:]
aes = AES.new(key, AES.MODE_CBC, iv)
return self.unpad(aes.decrypt(encrypted[16:]))
def decrypt_subtitle(self, encryptedSubtitle:str):
'''
Decrypts the encrypted subtitles
Parameters:
encryptedSubtitle (str): The encrypted subtitle in base64
Returns:
(bytes): The decrypted subtitle as a byte string
'''
encryptedSubtitle = bytes(encryptedSubtitle, 'utf-8')
key = encryptedSubtitle[0:8][::-1]
data = encryptedSubtitle[8:-5]
encrypted = data
decryptor = SubtitleDecryptor()
uncrypted = decryptor.decrypt(encrypted, key)
return uncrypted
if __name__ == "__main__":
s = "QmY8MmPpU2FsdGVkX1+yf0ihOOGDRlHvvFfSbWTPR95JlgUrRq8UJm7PRjrl9YjqLD6L5p9Rn3KZg/Rv4aBJ++R2rXi4m6ON4JwM+EjAPmj/YCJniXj5UD8kNUtHJiXP8uyNpGahqWE4WMP3mvtfcT+Ux1c7REYOdccH7ihkneAflW4c+KkFDeCpJ0RZtDQefIUCrzgA30yYYgnX/xKFo6CwGZsDgbqlvENwrGV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