@justherza/bycf
v1.3.1
Published
  ;
async function initialize() {
const targetUrl = '[https://example-protected-site.com](https://example-protected-site.com)';
const siteKey = 'your-cloudflare-sitekey';
try {
// 1. Get Bypass Token
const cfToken = await token(targetUrl, siteKey);
console.log('✅ Token:', cfToken);
// 2. Get HTML Source
const html = await wafsource(targetUrl);
console.log('✅ Source Length:', html.length);
// 3. Get WAF Sessions
const session = await wafsession(targetUrl);
console.log('✅ Active Session:', session);
} catch (err) {
console.error('❌ Error:', err.message);
}
}
initialize();🛠️ API Reference
| Function | Description | Returns |
| :--- | :--- | :--- |
| token(url, sitekey) | Bypasses Cloudflare to get the DNS/WAF token. | Promise<string> |
| wafsource(url) | Fetches the raw HTML source of a WAF protected page. | Promise<string> |
| wafsession(url) | Extracts active Cloudflare session cookies/headers. | Promise<object> |
⚠️ Legal Disclaimer
This package is provided for educational and research purposes only. Use it at your own risk. The author is not responsible for any misuse, blocked IPs, or legal actions taken by third parties. Always respect the robots.txt and Terms of Service of the target website
👤 Author
HerzaX
GitHub: herzonly
NPM: justherza/bycf
If you find this project usefull, please give it a ⭐ on GitHub!
