types

package
v0.0.0-...-a3451e6 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Attr = iota
	Text
	NodeName
	AttrVal
	Comment
)

Constants used to track the categories for the HTMLLocationType of a tracer string.

View Source
const (
	LeafNode = iota
	LeafNodeScriptTag
	TagName
	LeafNodeCommentTag
	AttributeName
	AttributeNameHTTPResponse
	AttributeValueStartHref
	AttributeValueOnEventHandler
	AttributeValueHTTPResponse
)

Constants used to track the different reasons.

View Source
const (
	HTML = iota
	JSON
)

Constants used to track if the data is HTML or JSON. More formats might be supported in the future.

View Source
const (
	Header = iota
	QueryParam
	Body
)

Constants used to track the tracer string location type.

Variables

This section is empty.

Functions

This section is empty.

Types

type DOMContext

type DOMContext struct {
	gorm.Model
	TracerEventID     uint               `json:"TracerEventID" gorm:"not null; index"`
	EventContext      string             `json:"EventContext" gorm:"not null"`
	HTMLLocationType  uint               `json:"HTMLLocationType" gorm:"not null"`
	HTMLNodeType      string             `json:"HTMLNodeType" gorm:"not null"`
	Severity          uint               `json:"Severity" gorm:"not null"`
	Reason            uint               `json:"Reason" gorm:"not null"`
	ReproductionTests []ReproductionTest `json:"ReproductionTests"`
}

DOMContext is an event that marks when a particular tracer was viewed again.

type Error

type Error struct {
	gorm.Model
	ErrorID  uint   `json:"ErrorID" gorm:"not null"`
	ErrorMsg string `json:"ErrorMsg" gorm:"not null"`
}

Error is a database table that contains all the errors from the application.

type Notification

type Notification struct {
	Tracer Tracer
	Event  TracerEvent
}

Notification is a struct used to notify listeners for major changes to tracers or their associated events.

type NotificationWebSocket

type NotificationWebSocket struct {
	Notification Notification `json:"Notification"`
}

NotificationWebSocket is a struct that is used to pass new notifications back to clients connected to the websocket server.

type RawEvent

type RawEvent struct {
	gorm.Model
	Data   string `json:"Data" gorm:"not null;unique"`
	Format uint   `json:"Format" gorm:"not null"`
}

RawEvent is a structure for holding raw event data such as HTTP responses or DOM.

type Reproduction

type Reproduction struct {
	Tracer            Tracer             `json:Tracer`
	TracerEvent       TracerEvent        `json:TracerEvent`
	DOMContext        DOMContext         `json:DOMContext`
	ReproductionTests []ReproductionTest `json:ReproductionTests`
}

Reproduction is the struct that holds all the information a tab needs to in order to successfully reproduce a finding.

type ReproductionTest

type ReproductionTest struct {
	gorm.Model
	TracerEventID uint   `json:"TracerEventID" gorm:"not null"`
	Exploit       string `json:"Exploit" gorm:"not null"`
	Successful    bool   `json:"Successful" gorm:"not null"`
}

ReproductionTest is a struct that holds a single reproduction test case. Reproduction tests are associated with a particular event.

type ReproductionWebSocket

type ReproductionWebSocket struct {
	Reproduction Reproduction `json:Reproduction`
}

ReproductionWebSocket is a struct that is used to pass new reproduction data to the extension from the UI.x

type Request

type Request struct {
	gorm.Model
	RawRequest    string   `json:"RawRequest" gorm:"not null"`
	RequestURL    string   `json:"RequestURL" gorm:"not null"`
	RequestMethod string   `json:"RequestMethod" gorm:"not null"`
	Tracers       []Tracer `json:Tracers"`
}

Request is a structure for holding the request information that created a tracer.

type RequestWebSocket

type RequestWebSocket struct {
	Requests Request `json:"Request"`
}

RequestWebSocket is a struct that is used to pass new request data back to clients connected to the websocket server.

type Server

type Server struct {
	Hostname string `json:Hostname`
	Port     uint   `json:Port`
}

Server is a struct that holds a configured server that has been resolved to a set of IPs and a port number.

func (*Server) Addr

func (a *Server) Addr() string

Addr returns the address string of the Server to be used with libraries like http.Server.

func (*Server) Equal

func (a *Server) Equal(b *Server) bool

Equal makes sure the hostname and port match between two servers.

func (*Server) IsEmpty

func (a *Server) IsEmpty() bool

IsEmpty returns true if the Server is populated.

type Tracer

type Tracer struct {
	gorm.Model
	TracerString        string        `json:"TracerString" gorm:"not null;index"` // the tracer string used by the user (e.g. {{XSS}})
	OverallSeverity     uint          `json:"OverallSeverity" gorm:"not null"`
	RequestID           uint          `json:"RequestID" gorm:"not null;index"`
	TracerEvents        []TracerEvent `json:"TracerEvents" `
	TracerPayload       string        `json:"TracerPayload" gorm:"not null;index;unique_index:idx_tracer_string"` // the payload tracy convert the string into
	TracerLocationType  uint          `json:"TracerLocationType" gorm:"not null"`
	TracerLocationIndex uint          `json:"TracerLocationIndex"` // what is the index or where the tracer was located in the request
	HasTracerEvents     bool          `json:"HasTracerEvents" gorm:"not null"`
	Screenshot          string        `json:"Screenshot"`
}

Tracer is a marker for input into the application. This will be used to find outputs.

type TracerEvent

type TracerEvent struct {
	gorm.Model
	TracerID    uint         `json:"TracerID"    gorm:"not null;index;unique_index:idx_event_collision"`
	RawEventID  uint         `json:"RawEventID"  gorm:"not null;unique_index:idx_event_collision"`
	RawEvent    RawEvent     `json:"RawEvent"`
	EventURL    string       `json:"EventURL"    gorm:"not null; unique_index:idx_event_collision"`
	EventType   string       `json:"EventType"   gorm:"not null"`
	Extras      string       `json:"Extras"`
	DOMContexts []DOMContext `json:"DOMContexts"`
}

TracerEvent is an event that marks when a particular tracer was viewed again.

type TracerEventBulk

type TracerEventBulk struct {
	TracerPayloads []string    `json:"TracerPayloads"`
	TracerEvent    TracerEvent `json:"TracerEvent"`
}

TracerEventBulk is an event captured from the DOM. TracerEventBulk contains a list of all the tracer strings found in a DOM event.

type TracerEventsWebSocket

type TracerEventsWebSocket struct {
	TracerEvents TracerEvent `json:"TracerEvent"`
}

TracerEventsWebSocket is a struct that is used to pass new tracer events data back to clients connected to the websocket server.

type TracerWebSocket

type TracerWebSocket struct {
	Tracers Tracer `json:"Tracer"`
}

TracerWebSocket is a struct that is used to pass new tracer data back to clients connected to the websocket server.

Jump to

Keyboard shortcuts

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