So if I understand right, the hexadecimal converted key should looks like this:
Code:
44c3973e3cda416942c2a361c2b1c3a03553cc381
Using the script available on the forum, I use the key and the iv directly because for some reason the m3u8 library doesn't work for me:
Code:
import m3u8
from Crypto.Cipher import AES
f = open('file.ts','rb')
playlist = m3u8.loads(playlist)
key = '44c3973e3cda416942c2a361c2b1c3a03553cc381'
iv = '3838c5776a2114c7233d9099fb7d7bf2' # For the iv I guess I didn't have to put '0x' in front of it.
aes = AES.new(key, AES.MODE_CBC, iv)
for x in playlist.segments :
r = urllib2.urlopen(x.uri)
d = r.read()
d = aes.decrypt(d)
f.write(d)
f.close()
When executing the script, I got this error:
Code:
ValueError: AES must be either 16, 24, or 32 bytes long
I guess I've done something wrong with the key.
Thanks for your time!