projectdiscovery/katana · info
result is filtered out
Error message
result is filtered out
What it means
StandardWriter.Write returns this when w.filterOutput(result) returns true, meaning the result matched one of the configured output filter (exclude) conditions. This is an intentional exclusion: the result was valid but explicitly filtered out by user-supplied filter rules.
Source
Thrown at pkg/output/output.go:200
// Skip empty responses (e.g., from similarity filtering)
if result.Response != nil && result.Response.Resp == nil && result.Response.Body == "" && result.Error == "" {
return errors.New("response filtered by similarity detection")
}
if len(w.storeFields) > 0 {
storeFields(result, w.storeFields)
}
if !w.extensionValidator.ValidatePath(result.Request.URL) {
return errors.New("result does not match extension filter")
}
if !w.matchOutput(result) {
return errors.New("result does not match output")
}
if w.filterOutput(result) {
return errors.New("result is filtered out")
}
if len(w.filterPageType) > 0 && result.Response != nil && result.Response.KnowledgeBase != nil {
if pageType, ok := result.Response.KnowledgeBase["PageType"].(string); ok {
for _, ft := range w.filterPageType {
if strings.EqualFold(pageType, ft) {
return errors.New("result filtered by page type")
}
}
}
}
var data []byte
var err error
if w.storeResponse && result.HasResponse() {
if fileName, fileWriter, err := getResponseFile(w.storeResponseDir, result.Response.Resp.Request.URL.String()); err == nil {
if absPath, err := filepath.Abs(fileName); err == nil {
fileName = absPath
}View on GitHub (pinned to e3e742739c)
Solutions
- Review the filter configuration (-fs/-fc/-f flags) and tighten or remove over-broad filters.
- Log which result gets filtered and test each filter condition against it to find the offending rule.
- Escaping/adjust regex-based body filters that unintentionally match valid pages.
- Keep filter rules minimal and add them incrementally, verifying output after each change.
Example fix
// before katana -u https://example.com -f body:"not found" // regex matches far too many pages // after katana -u https://example.com -fs 404,500 // filter only on status codes
Defensive patterns
Strategy: try-catch
Try / catch
if err := writer.Write(result); err != nil {
if err.Error() == "result is filtered out" {
return nil // intentionally excluded by filter rules
}
return err
} Prevention
- Keep filter rules (-fs/-fc/-f) minimal and specific
- Regex body filters should be anchored to avoid over-matching
- Verify filter behavior with a small known URL set first
When it happens
Trigger: Calling Write(result) when filter conditions are configured (filter-status, filter-body, filter-regex, filter-cdn, etc.) and the result matches any of them, causing filterOutput to return true.
Common situations: Using katana's -fs/-fc/-f filtering options to exclude 404s, CDN assets, or soft-404 bodies and then wondering why certain URLs never appear in output; filters matching more broadly than expected (e.g. a body regex that matches nearly every page).
Related errors
- response filtered by similarity detection
- result does not match extension filter
- result does not match output
- result filtered by page type
- result is empty
AI-assisted analysis of projectdiscovery/katana@e3e742739c (2026-09-03).
Data as JSON: /api/errors/3fee1faa1ff358fd.
Report an issue: GitHub.