fix
This commit is contained in:
parent
eff00a6afd
commit
1ecdcb99a3
@ -139,7 +139,8 @@ func TurnstileMaxToken(ccsUrl string, requestUrl string) (string, error) {
|
||||
return ccsResp.Token, nil
|
||||
}
|
||||
|
||||
func RequestWithWAFSession(method string, URL string, wafSession Session, body string, headers map[string]string) (cycletls.Response, error) {
|
||||
func RequestWithWAFSession(method string, URL string, wafSession Session, options cycletls.Options) (cycletls.Response, error) {
|
||||
headers := map[string]string{}
|
||||
cookies := []string{}
|
||||
for _, cookie := range wafSession.Cookies {
|
||||
cookies = append(cookies, cookie.Name+"="+cookie.Value)
|
||||
@ -149,11 +150,11 @@ func RequestWithWAFSession(method string, URL string, wafSession Session, body s
|
||||
}
|
||||
headers["Cookie"] = strings.Join(cookies, "; ")
|
||||
|
||||
options := cycletls.Options{
|
||||
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,
|
||||
options.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"
|
||||
options.UserAgent = headers["user-agent"]
|
||||
|
||||
for key, value := range headers {
|
||||
options.Headers[key] = value
|
||||
}
|
||||
|
||||
return cycletlsClient.Do(URL, options, method)
|
||||
|
Loading…
Reference in New Issue
Block a user