Go to file
2024-12-02 13:38:45 +08:00
cf-clearance-scraper.go fix 2024-12-02 13:38:45 +08:00
go.mod start 2024-12-02 13:33:44 +08:00
go.sum start 2024-12-02 13:33:44 +08:00
README.md start 2024-12-02 13:33:44 +08:00

A go package deals with cloudflare clearance by cf-clearance-scraper

Usage

func TestWAFSession(t *testing.T) {
	session, err := WAFSession("http://localhost:3000/cf-clearance-scraper", "url")
	if err != nil {
		t.Error(err)
		return
	}
	jsonBytes, err := json.Marshal(session)
	if err != nil {
		t.Error(err)
		return
	}
	t.Log(string(jsonBytes))

	resp, err := RequestWithWAFSession("GET", "url", session, nil)
	if err != nil {
		t.Error(err)
		return
	}
	t.Log(resp.Status)
}