shadow1ng/fscan · error
webscan_unknown_poc_format
webscan_unknown_poc_format
Error message
webscan_unknown_poc_format: %s
What it means
LoadUniversalPoc dispatches YAML/JSON POC data to a format-specific loader (fscan, nuclei, xray, afrog) based on the detected Format. If the file's format does not match any known adapter, the library rejects it with webscan_unknown_poc_format plus the filename.
Source
Thrown at webscan/lib/poc_adapter.go:133
return FormatUnknown
}
// LoadUniversalPoc 加载通用POC(自动识别格式)
func LoadUniversalPoc(filename string, data []byte) (UniversalPoc, error) {
format := DetectPocFormat(data)
switch format {
case FormatFscan:
return loadFscanPoc(data)
case FormatNuclei:
return loadNucleiPoc(data)
case FormatXray:
return loadXrayPoc(data)
case FormatAfrog:
return loadAfrogPoc(data)
default:
return nil, fmt.Errorf("%s: %s", i18n.GetText("webscan_unknown_poc_format"), filename)
}
}
// ============= fscan格式适配器 =============
// FscanPocAdapter fscan原生格式适配器
type FscanPocAdapter struct {
*Poc
}
func loadFscanPoc(data []byte) (*FscanPocAdapter, error) {
var poc Poc
if err := yaml.Unmarshal(data, &poc); err != nil {
return nil, fmt.Errorf("%s: %w", i18n.GetText("webscan_fscan_format_parse_failed"), err)
}
return &FscanPocAdapter{&poc}, nil
}
View on GitHub (pinned to 95cc12e753)
Solutions
- Convert the POC to one of the supported formats: fscan, nuclei, xray, or afrog.
- Check the file's top-level keys against a working example POC of each supported format.
- Verify the filename/extension and that the file is actually a POC, not another config.
- If the format should be supported, add a Format constant and loader case in poc_adapter.go.
Example fix
// before
// mypoc.yml uses an unknown custom schema -> webscan_unknown_poc_format
// after
// convert to nuclei format:
// id: my-poc
// info:
// name: My Poc
// http:
// - method: GET
// path: "/{{payload}}" Defensive patterns
Strategy: validation
Validate before calling
func looksLikeSupportedPoc(data []byte) bool {
var top map[string]interface{}
if yaml.Unmarshal(data, &top) != nil { return false }
for _, k := range []string{"rules", "id", "info"} {
if _, ok := top[k]; ok { return true }
}
return false
} Try / catch
poc, err := LoadUniversalPoc(path)
if err != nil {
if strings.Contains(err.Error(), "webscan_unknown_poc_format") {
log.Printf("skipping %s: unsupported POC format", path)
return nil // continue batch
}
return err
} Prevention
- Store POCs only in supported formats: fscan, nuclei, xray, afrog.
- Sanity-check top-level keys against example POCs before loading in bulk.
- Skip-and-log unknown files when loading a POC directory.
When it happens
Trigger: LoadUniversalPoc (via parsePocYAML) receives a POC file whose detected format constant is not FormatFscan, FormatNuclei, FormatXray, or FormatAfrog — e.g., an unrecognized YAML schema or a malformed file the format sniffer cannot classify.
Common situations: Loading a hand-written or third-party POC in an unsupported schema; a renamed/older format that the sniffer no longer recognizes; passing a non-POC YAML config file to the loader.
Related errors
- webscan_poc_convert_failed
- webscan_fscan_format_parse_failed
- webscan_nuclei_format_parse_failed
- webscan_xray_format_parse_failed
- %s: %w (webscan_afrog_format_parse_failed)
AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06).
Data as JSON: /api/errors/865aa1bac496acca.
Report an issue: GitHub.