bgutils-js
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -41,7 +41,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const challenge = yield response.json(); | ||
if (challenge.length > 1 && typeof challenge[1] === 'string') { | ||
const descrambledChallenge = descramble(challenge[1]); | ||
if (descrambledChallenge) | ||
return descrambledChallenge; | ||
} | ||
if (challenge.length > 1 && typeof challenge[1] === 'string') | ||
return descramble(challenge[1]); | ||
}); | ||
@@ -48,0 +45,0 @@ } |
@@ -17,3 +17,3 @@ export type PoTokenArgs = { | ||
/** | ||
* The id of the script. | ||
* The hash of the script. | ||
*/ | ||
@@ -26,3 +26,3 @@ interpreterHash: string; | ||
/** | ||
* The challenge data. | ||
* The program / challenge. | ||
*/ | ||
@@ -29,0 +29,0 @@ challenge: string; |
{ | ||
"name": "bgutils-js", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "A JavaScript library for interfacing with Botguard.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# What Is This? | ||
This library facilitates the generation of PoTokens (Proof of Origin Tokens) without external dependencies. It interacts with BotGuard's API directly, avoiding unnecessary asset and script downloads. Currently, Node.js, Deno, Bun, and modern browsers are supported. | ||
This library facilitates the creation of PoTokens by directly interacting with BotGuard's API. | ||
- [What Is This?](#what-is-this) | ||
- [A Few Notes](#a-few-notes) | ||
- [Installation](#installation) | ||
- [Usage](#usage) | ||
@@ -17,24 +17,13 @@ - [Research](#research) | ||
1. Currently, the BotGuard script needs a "good enough" `document` implementation to work. Libraries like `jsdom` can be used to provide a virtual `document`, and an example of how to do this can be found [here](./examples/node). Note that this is only necessary for Node.js, Deno, and Bun. Electron and other Chromium-based environments should work out of the box with zero dependencies. | ||
1. This library does not bypass BotGuard; **you still need** an environment that passes its checks to use it. It is simply a reverse-engineered implementation of the same process that YouTube’s web player uses. It is not a crack or hack of any kind. | ||
2. If the browser requirements change in the future, `jsdom` and similar libraries may not be able to provide the necessary functionality, and thus the library may only work in web applications. | ||
2. The library is not affiliated with Google or YouTube in any way. It is an independent project created for educational purposes. I am not responsible for any misuse of this library. | ||
3. This library does not "bypass" BotGuard. It is simply a reverse-engineered implementation of the same process that YouTube's web player uses to generate PoTokens. It is not a "crack" or "hack" of any kind. | ||
4. The library is not affiliated with Google or YouTube in any way. It is an independent project created for educational purposes. I am not responsible for any misuse of this library. | ||
## Installation | ||
```shell | ||
npm install bgutils-js | ||
``` | ||
## Usage | ||
Please refer to the provided examples: | ||
[Browsers](./examples/browser) | [Node.js, Deno, and Bun](./examples/node) | ||
Please refer to the provided examples [here](./examples/). | ||
## Research | ||
Below is a brief overview of the process to generate a PoToken for those interested in the inner workings of the library. This information is based on my own research and may become outdated as Google updates its systems! | ||
Below is a brief overview of the process to generate a PoToken for those interested in the inner workings of the library. This information is based on my own research and may become outdated as Google updates its systems. | ||
@@ -165,2 +154,2 @@ ### Initialization Process | ||
(<a href="#top">back to top</a>) | ||
</p> | ||
</p> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
48570
611
154