https://github.com/skoniks/cf-bypass
https://github.com/skoniks/cf-bypass
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/skoniks/cf-bypass
- Owner: skoniks
- Created: 2023-02-19T05:59:28.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-05T15:36:07.000Z (almost 2 years ago)
- Last Synced: 2024-12-28T20:27:18.634Z (6 months ago)
- Language: TypeScript
- Size: 19.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# @sknx/cf-bypass
Cloudflare turnstile bypass based on playwrignt headed browser and rucaptcha.
Api key required for work can be obtained from here https://rucaptcha.com/
Running headed: https://playwright.dev/docs/ci#running-headed
# Usage
```javascript
import { bypass, newPage } from '@sknx/cf-bypass';const url = 'https://site.com';
const key = 'rucaptcha_api_token';
const proxy = 'http://user:[email protected]:1234';
// const proxy = 'socks://user:[email protected]:1234';try {
const { page, fingerprint } = await newPage({ proxy });
const { cookies } = await bypass(url, key, page, proxy);
await page.context().close();
console.log(cookies, fingerprint);
} catch (error) {
console.log(error);
}
```