{"record":{"id":"e5669775d645a434","repo":"fish2018/pansou","slug":"error-e56697","errorCode":null,"errorMessage":"无法完成机器人验证","messagePattern":"无法完成机器人验证","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/gying/gying.go","lineNumber":1853,"sourceCode":"\t\t\t\t\t}\n\t\t\t\t\tif solved.Load() >= targetsLen {\n\t\t\t\t\t\tmu.Unlock()\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmu.Unlock()\n\t\t\t}\n\t\t}(workerID)\n\t}\n\n\twg.Wait()\n\n\tif solved.Load() != targetsLen {\n\t\tmu.Lock()\n\t\tmissing := len(remaining)\n\t\tmu.Unlock()\n\t\tif missing > 0 {\n\t\t\treturn fmt.Errorf(\"无法完成机器人验证\")\n\t\t}\n\t}\n\n\tform := url.Values{}\n\tform.Set(\"action\", \"verify\")\n\tform.Set(\"id\", challenge.ID)\n\tfor _, nonce := range nonces {\n\t\tform.Add(\"nonce[]\", strconv.Itoa(nonce))\n\t}\n\n\treturn p.submitChallengeVerification(scraper, requestURL, form)\n}\n\nfunc (p *GyingPlugin) submitChallengeVerification(scraper *cloudscraper.Scraper, requestURL string, form url.Values) error {\n\tresp, err := scraper.Post(requestURL, \"application/x-www-form-urlencoded\", strings.NewReader(form.Encode()))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"提交验证失败: %w\", err)\n\t}","sourceCodeStart":1835,"sourceCodeEnd":1871,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/gying/gying.go#L1835-L1871","documentation":"After all workers exhaust the nonce search space (0..Diff), the solver checks whether every target hash was matched. This error is returned when at least one target hash was never found, i.e. no nonce in [0, Diff] produces a SHA-256(nonce+salt) equal to it, so verification cannot be submitted.","triggerScenarios":"solveLegacyHashChallenge completes its brute force but solved != targetsLen and remaining is non-empty — some target hashes have no preimage within the searched nonce range.","commonSituations":"The site raised Diff or changed the hashing scheme (different salt composition or hash input) while the client still searches the old range; the challenge targets include hashes outside the client's nonce space; clock/skew-independent stale challenges where targets no longer match the salt.","solutions":["Re-fetch a fresh challenge and retry once; a stale challenge with mismatched targets is the usual cause","Verify Diff actually bounds the answer: log Diff and the unsolved target hashes; if the site increased the range, raise the nonce upper bound accordingly","Check whether the hash input format changed (e.g. salt+nonce vs nonce+salt, or hex vs raw salt) and update the worker accordingly","If the site switched to the PoW scheme, dispatch to solvePowChallenge instead"],"exampleFix":"// before\nhashInput = strconv.AppendInt(hashInput[:0], int64(nonce), 10)\nhashInput = append(hashInput, saltBytes...)\n// after (also try salt-prefixed form if targets remain unsolved)\nhashInput = strconv.AppendInt(hashInput[:0], int64(nonce), 10)\nhashInput = append(hashInput, saltBytes...)\n// or: append(saltBytes, hashInput...) — confirm against site JS","handlingStrategy":"retry","validationCode":"// no pre-call check can fully prevent this; ensure the challenge is fresh:\nif time.Since(challengeFetchedAt) > challengeTTL { re-fetch before solving }","typeGuard":null,"tryCatchPattern":"if err := p.solveLegacyHashChallenge(scraper, requestURL, challenge); err != nil {\n    if strings.Contains(err.Error(), \"无法完成机器人验证\") {\n        return p.refetchAndSolve(scraper, requestURL) // one retry with a fresh challenge\n    }\n    return err\n}","preventionTips":["Always solve a freshly fetched challenge; stale targets/salt pairs commonly have no preimage","Log the unsolved target hashes and Diff to detect upstream hashing-scheme or range changes","Cap retries at one or two to avoid hammering the anti-bot endpoint","Keep the worker's hash-input construction (nonce order, salt placement) in sync with the site's JS"],"tags":["brute-force","hashcash","sha256","anti-bot"],"backgroundTag":"unexpected-response-shape","analyzedSha":"beaa56133755a548ebc51b090b3816e2ae044aa6","analyzedAt":"2026-09-07T00:31:18.025Z","contentChangedAt":"2026-09-07T00:31:18.025Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}