AW: HASH ermitteln - Python nach Delphi, aber wie ?
13. Aug 2019, 09:05
@TERWI: Siehe dazu https://docs.python.org/2/tutorial/introduction.html
Code:
>>> word[:2] # character from the beginning to position 2 (excluded)
In deinem Fall also:
Code:
salt = '01!8d8F_)r9]4s[qeuXfP%'
client_token = salt[:2] + sha1(''.join([str(channel['video_id']),
salt,
channel['access_token'],
server_token,
channel['client_location'],
'dash:widevine']
).encode('utf-8')).hexdigest()
salt[:2] = 01
und daran wird mit dem '+' das Ergebnis aus dem SHA1() dran gehängt
Geändert von Moombas (13. Aug 2019 um 09:12 Uhr)
|