Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultResponseDir = "katana_response"
)
Variables ¶
View Source
var CustomFieldsMap = make(map[string]CustomFieldConfig)
CustomFieldsMap is the global custom field data instance it is used for parsing the header and body of request
View Source
var DefaultFieldConfigData = []CustomFieldConfig{ { Name: "email", Type: "regex", Part: Response.ToString(), Regex: []string{`([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)`}, }, }
View Source
var FieldNames = []string{
"url",
"path",
"fqdn",
"rdn",
"rurl",
"qurl",
"qpath",
"file",
"key",
"value",
"kv",
"dir",
"udir",
}
FieldNames is a list of supported field names
Functions ¶
This section is empty.
Types ¶
type CustomFieldConfig ¶
type CustomFieldConfig struct { Name string `yaml:"name,omitempty"` Type string `yaml:"type,omitempty"` Part string `yaml:"part,omitempty"` Group int `yaml:"group,omitempty"` Regex []string `yaml:"regex,omitempty"` CompileRegex []*regexp.Regexp `yaml:"-"` }
CustomFieldConfig contains suggestions for field filling
func (*CustomFieldConfig) GetName ¶
func (c *CustomFieldConfig) GetName() string
func (*CustomFieldConfig) SetCompiledRegexp ¶
func (c *CustomFieldConfig) SetCompiledRegexp(r *regexp.Regexp)
type Options ¶
type Options struct { Colors bool JSON bool Verbose bool StoreResponse bool OutputFile string Fields string StoreFields string StoreResponseDir string FieldConfig string ErrorLogFile string }
Options contains the configuration options for output writer
type Result ¶
type Result struct { // Timestamp is the current timestamp Timestamp time.Time `json:"timestamp,omitempty"` // Method is the method for the result Method string `json:"method,omitempty"` // Body contains the body for the request Body string `json:"body,omitempty"` // URL is the URL of the result URL string `json:"endpoint,omitempty"` // Source is the source for the result Source string `json:"source,omitempty"` // Tag is the tag for the result Tag string `json:"tag,omitempty"` // Attribute is the attribute for the result Attribute string `json:"attribute,omitempty"` // customField matched output CustomFields map[string][]string `json:"-"` }
Result is a result structure for the crawler
type StandardWriter ¶
type StandardWriter struct {
// contains filtered or unexported fields
}
StandardWriter is an standard output writer structure
func (*StandardWriter) Close ¶
func (w *StandardWriter) Close() error
Close closes the output writer
func (*StandardWriter) Write ¶
func (w *StandardWriter) Write(event *Result, resp *http.Response) error
Write writes the event to file and/or screen.
func (*StandardWriter) WriteErr ¶
func (w *StandardWriter) WriteErr(errMessage *Error) error
Click to show internal directories.
Click to hide internal directories.