{"record":{"id":"5f85f5fcc3103840","repo":"shadow1ng/fscan","slug":"network-rate-limited-5f85f5","errorCode":"network_rate_limited","errorMessage":"network_rate_limited: %s","messagePattern":"network_rate_limited: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"webscan/lib/Eval.go","lineNumber":490,"sourceCode":"\n\t\t// 如果未指定 Content-Type，设置默认值\n\t\tif req.Header.Get(\"Content-Type\") == \"\" {\n\t\t\treq.Header.Set(\"Content-Type\", \"application/x-www-form-urlencoded\")\n\t\t}\n\t}\n\n\t// 执行请求\n\t// 检查发包限制\n\tvar state *common.State\n\tif session != nil {\n\t\tstate = session.State\n\t\tif canSend, err := common.CanSendPacketWith(session.Config, state); !canSend {\n\t\t\treason := \"\"\n\t\t\tif err != nil {\n\t\t\t\treason = err.Error()\n\t\t\t}\n\t\t\tcommon.LogError(i18n.Tr(\"webscan_request_restricted\", req.URL.String(), reason))\n\t\t\treturn nil, fmt.Errorf(\"%s\", i18n.Tr(\"network_rate_limited\", reason))\n\t\t}\n\t} else {\n\t\tstate = common.GetGlobalState()\n\t\tif canSend, reason := common.CanSendPacket(); !canSend {\n\t\t\tcommon.LogError(i18n.Tr(\"webscan_request_restricted\", req.URL.String(), reason))\n\t\t\treturn nil, fmt.Errorf(\"%s\", i18n.Tr(\"network_rate_limited\", reason))\n\t\t}\n\t}\n\n\tvar (\n\t\toResp *http.Response\n\t\terr   error\n\t)\n\n\tif redirect {\n\t\toResp, err = requestClient(true).Do(req)\n\t} else {\n\t\toResp, err = requestClient(false).Do(req)","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/webscan/lib/Eval.go#L472-L508","documentation":"DoRequest consults the session-based rate limiter via common.CanSendPacketWith(session.Config, state) before sending. When the limiter refuses (packet/speed thresholds exceeded, restrict mode active) the request is aborted and network_rate_limited is returned, with the limiter's reason embedded via %s.","triggerScenarios":"DoRequest called while the scan session's rate-limit config blocks the packet: too many packets in the window, max-speed exceeded, or user-configured restriction (e.g. --limited skip mode) rejecting this target.","commonSituations":"Scanning with default aggressive settings against restricted targets, reverse-check callbacks issued while rate budget is exhausted, running in a session configured with strict rate limits for stealth scans.","solutions":["Read the embedded reason — it states which limit tripped","Increase session rate-limit settings (packet count / speed thresholds in session.Config)","Add throttling/retry with backoff in the caller and re-issue after the window resets","Exclude the target from restriction rules if it is intentionally permitted"],"exampleFix":"// before (immediate send, may be limited)\nresp, err := DoRequest(req, false, session)\n// after (wait and retry on limit)\nresp, err := DoRequest(req, false, session)\nif err != nil && strings.Contains(err.Error(), \"network_rate_limited\") {\n    time.Sleep(rateLimitWindow)\n    resp, err = DoRequest(req, false, session)\n}","handlingStrategy":"retry","validationCode":"if canSend, reason := common.CanSendPacketWith(session.Config, state); !canSend {\n    return fmt.Errorf(\"skip send: %s\", reason)\n}","typeGuard":null,"tryCatchPattern":"resp, err := DoRequest(req, false, session)\nif err != nil && strings.Contains(err.Error(), \"network_rate_limited\") {\n    time.Sleep(backoff)\n    resp, err = DoRequest(req, false, session)\n}","preventionTips":["Cap scan concurrency so the session limiter is never exhausted","Align client-side pacing with session.Config rate settings","Retry with exponential backoff instead of failing the check outright"],"tags":["go","rate-limit","http","webscan","throttling"],"backgroundTag":"rate-limit-exceeded","analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}