diff --git a/cf-clearance-scraper.go b/cf-clearance-scraper.go index 2c9e124..98a077a 100644 --- a/cf-clearance-scraper.go +++ b/cf-clearance-scraper.go @@ -139,8 +139,7 @@ func TurnstileMaxToken(ccsUrl string, requestUrl string) (string, error) { return ccsResp.Token, nil } -func RequestWithWAFSession(method string, URL string, wafSession Session, body interface{}) (cycletls.Response, error) { - headers := map[string]string{} +func RequestWithWAFSession(method string, URL string, wafSession Session, body string, headers map[string]string) (cycletls.Response, error) { cookies := []string{} for _, cookie := range wafSession.Cookies { cookies = append(cookies, cookie.Name+"="+cookie.Value) @@ -151,7 +150,7 @@ func RequestWithWAFSession(method string, URL string, wafSession Session, body i headers["Cookie"] = strings.Join(cookies, "; ") options := cycletls.Options{ - Body: "", + Body: body, Ja3: "772,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,23-27-65037-43-51-45-16-11-13-17513-5-18-65281-0-10-35,25497-29-23-24,0", UserAgent: headers["user-agent"], Headers: headers,