Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kazutoiris/ali_ecc
AliyunDrive ECC Signature
https://github.com/kazutoiris/ali_ecc
Last synced: 15 days ago
JSON representation
AliyunDrive ECC Signature
- Host: GitHub
- URL: https://github.com/kazutoiris/ali_ecc
- Owner: kazutoiris
- License: other
- Created: 2023-02-13T15:50:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-02-23T05:41:26.000Z (over 1 year ago)
- Last Synced: 2024-07-31T15:06:23.775Z (4 months ago)
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 178
- Watchers: 5
- Forks: 92
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AliyunDrive ECC Signature
> Welcome star, issue and pull requests.
## What can it do
1. Generate random `ECC` key-pair to create a new session.
2. Get the file’s download url without `invalid X-Device-Id`.## How to use
1. Set the `deviceId` in line 7.
2. Set the `userId` in line 8.
3. Set the `authorization` in line 34.
4. (Optional) Set the private key in line 11,12. (Only if you want to use custom key-pair.)## Some details
1. `deviceId` could be found in `DevTools` -> `Application` -> `Local Storage` -> `cna`.
2. `userId` could be found in `DevTools` -> `Application` -> `Local Storage` -> `token` -> `user_id`.
3. `authorization` could be found in `Network`, choose any request, `Request Headers` -> `authorization`.
4. `private key` could be found in `DevTools` -> `Application` -> `IndexedDB` -> `ALIYUN_DRIVE_CLIENT_SIGNATURE` -> `signature` -> `privateKey`.
`private key` will 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 `authorization` from cookie or local storage?
* [ ] How often is `nonce` updated? (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.