ali_ecc
ali_ecc copied to clipboard
AliyunDrive ECC Signature
AliyunDrive ECC Signature
Welcome star, issue and pull requests.
What can it do
- Generate random
ECCkey-pair to create a new session. - Get the file’s download url without
invalid X-Device-Id.
How to use
- Set the
deviceIdin line 7. - Set the
userIdin line 8. - Set the
authorizationin line 34. - (Optional) Set the private key in line 11,12. (Only if you want to use custom key-pair.)
Some details
-
deviceIdcould be found inDevTools->Application->Local Storage->cna. -
userIdcould be found inDevTools->Application->Local Storage->token->user_id. -
authorizationcould be found inNetwork, choose any request,Request Headers->authorization. -
private keycould be found inDevTools->Application->IndexedDB->ALIYUN_DRIVE_CLIENT_SIGNATURE->signature->privateKey.private keywill be generated automatically, so there’s no need to specificate.
Last
There’re some problems need to be solved.
-
[x] How to generate a
deviceId?Just a UUIDv4 string, So you can generate a deviceId randomly.
-
[ ] How to generate
authorizationfrom cookie or local storage? -
[ ] How often is
nonceupdated? (Could be frozen?)
Test
You can use ali_renew_test.py to test nonce update.
If nonce is 0, it will create a session automatically.
If nonce is larger than 0, it will renew the session.
Notice: If it fails, try to increase the interval.
Now it could pass almost 1000 rounds :thumbsup:
LICENSE
Anti-996-License.