2025-08-23 21:14:56 +05:00
|
|
|
# Crextractor
|
2025-03-26 13:19:45 +05:00
|
|
|
|
2025-08-23 21:14:56 +05:00
|
|
|
Utility for extracting secrets from Crunchyroll mobile app
|
2025-03-26 13:19:45 +05:00
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
|
|
- [Node.js](https://nodejs.org/en)
|
|
|
|
|
- [jadx](https://github.com/skylot/jadx)
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
|
|
```bash
|
2025-08-23 21:14:56 +05:00
|
|
|
npm i crextractor
|
2025-03-26 13:19:45 +05:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
2025-08-23 21:38:36 +05:00
|
|
|
### Fetching already extracted secrets
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
async function main() {
|
|
|
|
|
const url = 'https://raw.githubusercontent.com/vitalygashkov/crextractor/refs/heads/main/secrets.json';
|
|
|
|
|
const data = await fetch(url).then((response) => response.json());
|
|
|
|
|
|
|
|
|
|
// You can use the extracted secrets to obtain access tokens for Crunchyroll APIs
|
|
|
|
|
const response = await fetch('https://beta-api.crunchyroll.com/auth/v1/token', {
|
|
|
|
|
headers: {
|
|
|
|
|
Authorization: data.authorization,
|
|
|
|
|
// ...
|
|
|
|
|
},
|
|
|
|
|
method: 'POST',
|
|
|
|
|
body: JSON.stringify({
|
|
|
|
|
// ...
|
|
|
|
|
}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2025-03-26 13:19:45 +05:00
|
|
|
#### Library
|
|
|
|
|
|
|
|
|
|
```js
|
2025-08-23 21:14:56 +05:00
|
|
|
import { extractSecrets } from 'crextractor';
|
2025-03-26 13:19:45 +05:00
|
|
|
|
2025-08-23 21:28:46 +05:00
|
|
|
const { id, secret, encoded, authorization } = await extractSecrets();
|
2025-03-26 13:19:45 +05:00
|
|
|
|
|
|
|
|
// Do something with the extracted secrets
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### Command-line interface
|
|
|
|
|
|
|
|
|
|
```bash
|
2025-08-23 21:14:56 +05:00
|
|
|
npx crextractor
|
2025-03-26 13:19:45 +05:00
|
|
|
```
|
|
|
|
|
|
2025-08-23 21:24:51 +05:00
|
|
|
> Results will be printed to the console and saved to `secrets.json` file
|
|
|
|
|
|
2025-03-26 13:19:45 +05:00
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
MIT
|