Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the bug so obvious? #273

Open
2516455367 opened this issue Nov 19, 2024 · 8 comments
Open

Is the bug so obvious? #273

2516455367 opened this issue Nov 19, 2024 · 8 comments

Comments

@2516455367
Copy link

Unable to set up and successfully request h2 using the returned ja3 of https://tls.peet.ws/api/all

image

@Noooste
Copy link
Owner

Noooste commented Nov 19, 2024

Hello,
I would need to have more information about your issue, please share JA3 and HTTP/2

@2516455367
Copy link
Author

"https://captcha.gtimg.com/TCaptcha.js" You try, but the request cannot be successful
image
image

@Noooste
Copy link
Owner

Noooste commented Nov 19, 2024

Can you provide code snippet instead of screenshot, it will accelerate debugging.
Also, do you use session presets on JA3 and HTTP/2, or do you apply specific JA3 ?
Are you using the latest version of AzureTLS ?

@Noooste
Copy link
Owner

Noooste commented Nov 19, 2024

The issue is caused by the presence of pre_shared_key (41) in your JA3:

modify
771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,13-11-45-43-27-65281-0-17513-10-5-23-16-65037-51-35-18-41,4588-29-23-24,0

to

771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,13-11-45-43-27-65281-0-17513-10-5-23-16-65037-51-35-18,4588-29-23-24,0
(without the -41)

If you are using Chrome TLS, please use the default settings of the client, as chrome is shuffling TLS extensions.

@2516455367
Copy link
Author

pre_shared_key (41)此问题是由于您的 JA3 中存在以下内容引起的:

调整 771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,13-11-45-43-27-65281-0-17513-10-5-23-16-65037-51-35-18-41,4588-29-23-24,0

771,4865-4866-4867-49195-49199-49196-49200-52393-52392-49171-49172-156-157-47-53,13-11-45-43-27-65281-0-17513-10-5-23-16-65037-51-35-18,4588-29-23-24,0 (不带-41

如果您使用的是 Chrome TLS,请使用客户端的默认设置,因为 chrome 正在改组 TLS 扩展。

Hello, I used the default configuration, and the link in the request diagram failed. Using the default Google ja3.

@Noooste
Copy link
Owner

Noooste commented Nov 19, 2024

package main

import (
	"fmt"
	"github.com/Noooste/azuretls-client"
)

func main() {
	session := azuretls.NewSession()

	url := "https://captcha.gtimg.com/TCaptcha.js"

	headers := azuretls.OrderedHeaders{
		{"accept", "*/*"},
		{"accept-encoding", "gzip, deflate, br, zstd"},
		{"accept-language", "zh-CN,zh;q=0.9"},
		{"cache-control", "no-cache"},
		{"pragma", "no-cache"},
		{"referer", "https://ti.qq.com/"},
		{"sec-ch-ua", "\"Chromium\";v=\"130\", \"Google Chrome\";v=\"130\", \"NotA_Brand\";v=\"99\""},
		{"sec-ch-ua-mobile", "?0"},
		{"sec-ch-ua-platform", "\"Windows\""},
		{"sec-fetch-dest", "script"},
		{"sec-fetch-mode", "no-cors"},
		{"sec-fetch-site", "cross-site"},
		{"user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"},
	}

	response, err := session.Get(url, headers)
	if err != nil {
		panic(err)
	}

	fmt.Println(response.StatusCode)
}

This code works perfectly fine, can you confirm this code is working on your side ?

@2516455367
Copy link
Author

package main

import (
	"fmt"
	"github.com/Noooste/azuretls-client"
)

func main() {
	session := azuretls.NewSession()

	url := "https://captcha.gtimg.com/TCaptcha.js"

	headers := azuretls.OrderedHeaders{
		{"accept", "*/*"},
		{"accept-encoding", "gzip, deflate, br, zstd"},
		{"accept-language", "zh-CN,zh;q=0.9"},
		{"cache-control", "no-cache"},
		{"pragma", "no-cache"},
		{"referer", "https://ti.qq.com/"},
		{"sec-ch-ua", "\"Chromium\";v=\"130\", \"Google Chrome\";v=\"130\", \"NotA_Brand\";v=\"99\""},
		{"sec-ch-ua-mobile", "?0"},
		{"sec-ch-ua-platform", "\"Windows\""},
		{"sec-fetch-dest", "script"},
		{"sec-fetch-mode", "no-cors"},
		{"sec-fetch-site", "cross-site"},
		{"user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"},
	}

	response, err := session.Get(url, headers)
	if err != nil {
		panic(err)
	}

	fmt.Println(response.StatusCode)
}

该代码运行良好,您能确认该代码在您这边可以正常运行吗?

You're right. I found that I would report an error several times in a row. This is link multiplexing, right?

@Noooste
Copy link
Owner

Noooste commented Nov 22, 2024

I'm not sure what's causing your problem, does this error only appear from time to time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants