From fdfa004638f914ae52873d5ef77d7dfd16834d0e Mon Sep 17 00:00:00 2001 From: Moroka8 Date: Thu, 23 Apr 2026 19:19:39 +0700 Subject: [PATCH] style: used gofmt --- client/main.go | 3 +-- client/manual_captcha.go | 2 +- client/slider_captcha.go | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/client/main.go b/client/main.go index d9b0f4b..69d3f9b 100644 --- a/client/main.go +++ b/client/main.go @@ -291,7 +291,6 @@ func generateCheckboxCursor() string { } */ - func getCustomNetDialer() net.Dialer { return net.Dialer{ Timeout: 20 * time.Second, @@ -610,7 +609,7 @@ func callCaptchaNotRobot(ctx context.Context, sessionToken, hash string, streamI cursorJSON := "[]" answer := base64.StdEncoding.EncodeToString([]byte("{}")) - // The real browser sends a static SHA-256 hash for debug_info. + // The real browser sends a static SHA-256 hash for debug_info. // We use the exact one captured from the real browser's session. debugInfo := "f3ef768dab7a20f574c6461f34e4257894d2a3c30a53d8727a3edaf7ab70847d" diff --git a/client/manual_captcha.go b/client/manual_captcha.go index 20a94a1..38a444b 100644 --- a/client/manual_captcha.go +++ b/client/manual_captcha.go @@ -560,7 +560,7 @@ type loggingTransport struct { func (t *loggingTransport) RoundTrip(req *http.Request) (*http.Response, error) { isCaptchaRequest := req.Body != nil && (strings.Contains(req.URL.Path, "captchaNotRobot.check") || strings.Contains(req.URL.Path, "captchaNotRobot.componentDone")) - + if isCaptchaRequest { b, _ := io.ReadAll(req.Body) req.Body = io.NopCloser(bytes.NewReader(b)) diff --git a/client/slider_captcha.go b/client/slider_captcha.go index a159df8..cfb08ee 100644 --- a/client/slider_captcha.go +++ b/client/slider_captcha.go @@ -22,6 +22,7 @@ import ( fhttp "github.com/bogdanfinn/fhttp" tlsclient "github.com/bogdanfinn/tls-client" ) + const ( sliderCaptchaType = "slider" defaultSliderAttempts = 4 @@ -240,8 +241,8 @@ func (s *captchaNotRobotSession) requestSliderCheck(activeSteps []int, candidate func (s *captchaNotRobotSession) requestCheck(cursor string, answer string) (*captchaCheckResult, error) { values := s.baseValues() - - // The real browser sends a static SHA-256 hash for debug_info. + + // The real browser sends a static SHA-256 hash for debug_info. // We use the exact one captured from the real browser's session. debugInfo := "f3ef768dab7a20f574c6461f34e4257894d2a3c30a53d8727a3edaf7ab70847d" @@ -979,7 +980,6 @@ func buildSliderCursor(candidateIndex int, candidateCount int, startTime int64) } */ - func trySliderCaptchaCandidates( candidates []sliderCandidate, maxAttempts int,