input

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountOffline

func CountOffline(path string, concurrency int, hasCustomConfig bool) (uint32, error)

CountOffline performing a fast pass to count total targets without parsing.

func IsFFFDirectory

func IsFFFDirectory(path string) bool

IsFFFDirectory checks if a directory matches the fff output structure.

func IsKatanaDirectory

func IsKatanaDirectory(path string) bool

IsKatanaDirectory checks if a directory matches the katana output structure.

func ParseOffline

func ParseOffline(path string, skipFunc func(string) bool, concurrency int, customCfg *custom.CompiledConfig) (<-chan model.OfflineInput, error)

ParseOffline dispatches the parsing to the correct handler based on detected format.

func ResolveInput

func ResolveInput(input string, offlineMode bool) ([]model.Target, error)

ResolveInput takes an input source (file, stdin, or direct arg) and returns a slice of targets.

Types

type OfflineFormat

type OfflineFormat string

OfflineFormat defines the type of offline input.

const (
	// FormatUnknown indicates an unidentified offline format.
	FormatUnknown OfflineFormat = "unknown"
	// FormatFFF indicates the fff tool output format.
	FormatFFF OfflineFormat = "fff"
	// FormatKatanaDir indicates a directory containing katana response files.
	FormatKatanaDir OfflineFormat = "katana-dir"
	// FormatKatanaFile indicates a single katana response file.
	FormatKatanaFile OfflineFormat = "katana-file"
	// FormatRawHTTP indicates a raw HTTP response dump.
	FormatRawHTTP OfflineFormat = "raw-http"
	// FormatBodyOnly indicates a file treated as a raw response body.
	FormatBodyOnly OfflineFormat = "body-only"
	// FormatCustom indicates an input parsed with a YAML config (json or regex).
	FormatCustom OfflineFormat = "custom"
)

func DetectOfflineFormat

func DetectOfflineFormat(path string, hasCustomConfig bool) OfflineFormat

DetectOfflineFormat identifies the format of the given path (file or directory).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL