shadow1ng/fscan · warning

network_rate_limited

network_rate_limited

Error message

network_rate_limited: %s

What it means

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.

Source

Thrown at webscan/lib/Eval.go:490

		// 如果未指定 Content-Type,设置默认值
		if req.Header.Get("Content-Type") == "" {
			req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
		}
	}

	// 执行请求
	// 检查发包限制
	var state *common.State
	if session != nil {
		state = session.State
		if canSend, err := common.CanSendPacketWith(session.Config, state); !canSend {
			reason := ""
			if err != nil {
				reason = err.Error()
			}
			common.LogError(i18n.Tr("webscan_request_restricted", req.URL.String(), reason))
			return nil, fmt.Errorf("%s", i18n.Tr("network_rate_limited", reason))
		}
	} else {
		state = common.GetGlobalState()
		if canSend, reason := common.CanSendPacket(); !canSend {
			common.LogError(i18n.Tr("webscan_request_restricted", req.URL.String(), reason))
			return nil, fmt.Errorf("%s", i18n.Tr("network_rate_limited", reason))
		}
	}

	var (
		oResp *http.Response
		err   error
	)

	if redirect {
		oResp, err = requestClient(true).Do(req)
	} else {
		oResp, err = requestClient(false).Do(req)

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Read the embedded reason — it states which limit tripped
  2. Increase session rate-limit settings (packet count / speed thresholds in session.Config)
  3. Add throttling/retry with backoff in the caller and re-issue after the window resets
  4. Exclude the target from restriction rules if it is intentionally permitted

Example fix

// before (immediate send, may be limited)
resp, err := DoRequest(req, false, session)
// after (wait and retry on limit)
resp, err := DoRequest(req, false, session)
if err != nil && strings.Contains(err.Error(), "network_rate_limited") {
    time.Sleep(rateLimitWindow)
    resp, err = DoRequest(req, false, session)
}
Defensive patterns

Strategy: retry

Validate before calling

if canSend, reason := common.CanSendPacketWith(session.Config, state); !canSend {
    return fmt.Errorf("skip send: %s", reason)
}

Try / catch

resp, err := DoRequest(req, false, session)
if err != nil && strings.Contains(err.Error(), "network_rate_limited") {
    time.Sleep(backoff)
    resp, err = DoRequest(req, false, session)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06). Data as JSON: /api/errors/5f85f5fcc3103840. Report an issue: GitHub.