{"record":{"id":"5bffdc7458ba87d9","repo":"shadow1ng/fscan","slug":"max-packet-count-reached","errorCode":null,"errorMessage":"max packet count reached","messagePattern":"max packet count reached","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/globals.go","lineNumber":91,"sourceCode":"\tcommit  = \"unknown\"\n\tdate    = \"unknown\"\n)\n\nfunc GetVersion() string { return version }\n\n// 运行时数据已迁移到Config对象中，使用GetGlobalConfig()访问\n\n// Shell状态已迁移到State对象中，使用GetGlobalState()访问\n\n// POC配置、输出控制、发包控制、初始化已迁移到Config/State对象中\n\n// =============================================================================\n// 发包限制错误类型\n// =============================================================================\n\n// 哨兵错误 - 用于 errors.Is 判断\nvar (\n\tErrMaxPacketReached  = errors.New(\"max packet count reached\")\n\tErrPacketRateLimited = errors.New(\"packet rate limited\")\n)\n\n// PacketLimitError 发包限制错误（包含详情）\ntype PacketLimitError struct {\n\tSentinel error // ErrMaxPacketReached 或 ErrPacketRateLimited\n\tLimit    int64\n\tCurrent  int64\n}\n\nfunc (e *PacketLimitError) Error() string {\n\tif e.Sentinel == ErrMaxPacketReached {\n\t\treturn i18n.Tr(\"packet_limit_max_reached\", e.Limit)\n\t}\n\treturn i18n.Tr(\"packet_limit_rate_limited\", e.Limit)\n}\n\nfunc (e *PacketLimitError) Unwrap() error {","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/common/globals.go#L73-L109","documentation":"Sentinel error indicating the global packet-count cap (-pn/-max packet limit in Config) has been reached; wrapped in a PacketLimitError with Sentinel=ErrMaxPacketReached so callers can test with errors.Is. Fires when the currentTotal sent across the scan reaches maxPacketCount, causing CanSendPacket to refuse further sends.","triggerScenarios":"Thrown at common/globals.go:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Raise or disable the packet limit flag (e.g. -pn 0 / larger -num) if the traffic volume is expected","Check the limit/current fields on PacketLimitError to confirm the cap that fired","Split the scan into multiple runs with smaller target sets"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}