Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iarsham/cf-forbidden
Efficient methods to circumvent Cloudflare's 403 restrictions, allowing for seamless scraping of websites that implement these protections.
https://github.com/iarsham/cf-forbidden
403-forbidden captcha client cloudflare golang http scrapper
Last synced: 23 days ago
JSON representation
Efficient methods to circumvent Cloudflare's 403 restrictions, allowing for seamless scraping of websites that implement these protections.
- Host: GitHub
- URL: https://github.com/iarsham/cf-forbidden
- Owner: iarsham
- License: mit
- Created: 2024-08-26T16:23:48.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-08-28T18:57:38.000Z (3 months ago)
- Last Synced: 2024-10-04T21:41:59.812Z (about 1 month ago)
- Topics: 403-forbidden, captcha, client, cloudflare, golang, http, scrapper
- Language: Go
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Client for Bypassing Cloudflare
cf_forbidden is a Go package designed to make HTTP requests to websites protected by Cloudflare.
## Features
- Make HTTP requests to Cloudflare-protected websites.
- Set custom headers for each request.
- Configure UserAgent and JA3 fingerprinting.## Installation
```bash
go get -u github.com/iarsham/cf-forbidden
```## Usage
### 1. Create a Client:
```go
package mainimport (
cf "github.com/iarsham/cf-forbidden"
)func main() {
client, err := cf.New()
if err != nil {
// handle error
}
}
```
### 2. Set Custom Headers (Optional):
```go
client.Headers = cf.M{
"X-Custom-Header": "value",
}
```### 3. Set UserAgent and JA3 Fingerprint (Optional):
```go
client.UserAgent = "My Custom User Agent"
client.Ja3 = "your_ja3_fingerprint"
```### 4. Make Requests:
#### GET request:
```go
response, err := client.Get("https://target.com", cf.M{"Authorization": "Bearer your_token"})
if err != nil {
// handle error
}
// Access response body and headers
body := response.Body
headers := response.Headers
```#### POST request:
```go
response, err := client.Post("https://target.com/api/endpoint", cf.M{"Content-Type": "application/json"}, {"data": "your_data"} )
if err != nil {
// handle error
}// Access response body and headers
body := response.Body
headers := response.Headers
```**Note:** Refer to the documentation of the CycleTLS library [here](https://github.com/Danny-Dasilva/CycleTLS) for more
advanced configuration options.## Contributing
We welcome contributions to this project! Please see the `CONTRIBUTING.md` file (if available) for details.
## License
This project is licensed under the MIT License.
**Disclaimer:** This project is provided for educational purposes only. Use it responsibly and ethically. The authors
are not responsible for any misuse of this tool.
You can copy this Markdown text into a .md file for your project. Let me know if you need any further modifications!