types

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentSession

type AgentSession struct {
	ID        uint      `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	Status    string    `json:"status"`
}

AgentSession tracks agent interactions with a chat session

type AgentSessionMessage

type AgentSessionMessage struct {
	Type       MessageType `json:"type"`
	SessionID  uint        `json:"session_id"`
	AuthorID   uint        `json:"author_id"`
	AuthorRole UserRole    `json:"author_role"`
	Content    string      `json:"content"`
	Timestamp  time.Time   `json:"timestamp,omitempty"`
}

func (*AgentSessionMessage) GetType

func (m *AgentSessionMessage) GetType() MessageType

type AttackCompleteMessage

type AttackCompleteMessage struct {
	Type MessageType `json:"type"`
}

func (*AttackCompleteMessage) GetType

func (m *AttackCompleteMessage) GetType() MessageType

type AttackResultMessage

type AttackResultMessage struct {
	Type             MessageType `json:"type"`
	EndpointID       uint        `json:"endpoint_id"` // reaper endpoint id
	TemplateName     string      `json:"template_name"`
	TemplateAuthor   string      `json:"template_author"`
	TemplateSeverity string      `json:"template_severity"`
	TemplateTags     string      `json:"template_tags"`
	TemplateType     string      `json:"template_type"`
	Hostname         string      `json:"hostname"`
	Port             string      `json:"port"`
	Scheme           string      `json:"scheme"`
	URL              string      `json:"url"`
	Endpoint         string      `json:"endpoint"`
	Request          string      `json:"request"`
	Response         string      `json:"response"`
	IpAddress        string      `json:"ip_address"`
	Command          string      `json:"command"` // curl command to reproduce the request
	Timestamp        time.Time   `json:"timestamp,omitempty"`
}

func (*AttackResultMessage) GetType

func (a *AttackResultMessage) GetType() MessageType

type DomainMessage

type DomainMessage struct {
	Type      MessageType `json:"type"`
	Domain    string      `json:"domain"`
	Source    string      `json:"source"`
	Timestamp time.Time   `json:"timestamp,omitempty"`
}

func (*DomainMessage) GetType

func (d *DomainMessage) GetType() MessageType

type DomainStatus

type DomainStatus string
const (
	DomainStatusPending  DomainStatus = "pending"
	DomainStatusScanning DomainStatus = "scanning"
	DomainStatusProbing  DomainStatus = "probing"
	DomainStatusIdle     DomainStatus = "idle"
)

type DomainSyncMessage

type DomainSyncMessage struct {
	Type          MessageType  `json:"type"`
	ID            uint         `json:"id"`
	Status        DomainStatus `json:"status"`
	HostCount     int          `json:"host_count"`
	LastScannedAt *time.Time   `json:"last_scanned_at"`
}

func (*DomainSyncMessage) GetType

func (m *DomainSyncMessage) GetType() MessageType

type ExploreEndpointMessage

type ExploreEndpointMessage struct {
	Type      MessageType `json:"type"`
	Path      string      `json:"path"`
	Host      string      `json:"host"`
	Timestamp time.Time   `json:"timestamp,omitempty"`
}

func (*ExploreEndpointMessage) GetType

func (h *ExploreEndpointMessage) GetType() MessageType

type ExploreHostMessage

type ExploreHostMessage struct {
	Type      MessageType `json:"type"`
	Name      string      `json:"name"`
	Timestamp time.Time   `json:"timestamp,omitempty"`
}

func (*ExploreHostMessage) GetType

func (h *ExploreHostMessage) GetType() MessageType

type HostMessage

type HostMessage struct {
	Type      MessageType `json:"type"`
	Host      string      `json:"host"`
	IP        string      `json:"ip"`
	Timestamp time.Time   `json:"timestamp,omitempty"`
}

func (*HostMessage) GetType

func (h *HostMessage) GetType() MessageType

type MessageType

type MessageType string
const (
	MessageTypeExploreHost         MessageType = "explore_host"
	MessageTypeExploreEndpoint     MessageType = "explore_endpoint"
	MessageTypeScanDomain          MessageType = "scan.domain"
	MessageTypeScanDomainResult    MessageType = "scan.domain.result"
	MessageTypeScanSyncDomain      MessageType = "scan.domain.sync"
	MessageTypeNavigationFollow    MessageType = "navigation.follow"
	MessageTypeExploreRequest      MessageType = "explore.request"
	MessageTypeExploreResponse     MessageType = "explore.response"
	MessageTypeAttackResult        MessageType = "attack.result"
	MessageTypeAttackResultClear   MessageType = "attack.result.clear"
	MessageTypeAttackComplete      MessageType = "attack.complete"
	MessageTypeReportStatus        MessageType = "report.status"
	MessageTypeReportSync          MessageType = "report.sync"
	MessageTypeAgentSessionMessage MessageType = "agent.session.message"
)
type NavigationFollowMessage struct {
	Type      MessageType `json:"type"`
	From      string      `json:"from"`
	To        string      `json:"to"`
	Timestamp time.Time   `json:"timestamp,omitempty"`
}
func (m *NavigationFollowMessage) GetType() MessageType

type ProxyMessage

type ProxyMessage struct {
	Type   MessageType `json:"type"`
	Host   string      `json:"host"`
	Method string      `json:"method"`
	Path   string      `json:"path"`
	Status int         `json:"status"`
}

func (*ProxyMessage) GetType

func (p *ProxyMessage) GetType() MessageType

type ReplayInput

type ReplayInput struct {
	Method  string `json:"method"`
	URL     string `json:"url"`
	Headers string `json:"headers"`
	Body    string `json:"body"`
}

type ReplayResponse

type ReplayResponse struct {
	Status     string      `json:"status"`
	StatusCode int         `json:"status_code"`
	Headers    http.Header `json:"headers"`
	Body       []byte      `json:"body"`
}

type ReportMessage

type ReportMessage struct {
	Type      MessageType `json:"type"`
	Domain    string      `json:"domain"`
	Markdown  string      `json:"markdown"`
	Timestamp time.Time   `json:"timestamp,omitempty"`
}

func (*ReportMessage) GetType

func (m *ReportMessage) GetType() MessageType

type ReportStatus

type ReportStatus string
const (
	ReportStatusCreated ReportStatus = "created"
	ReportStatusPending ReportStatus = "pending"
	ReportStatusDone    ReportStatus = "done"
)

type RequestSource

type RequestSource string
const (
	RequestSourceUser      RequestSource = "user"
	RequestSourceProxy     RequestSource = "proxy"
	RequestSourceSubfinder RequestSource = "subfinder"
	RequestSourceHttpx     RequestSource = "httpx"
	RequestSourceFuzzer    RequestSource = "fuzzer"
	RequestSourceReplay    RequestSource = "replay"
)

type SubfinderResultMessage

type SubfinderResultMessage struct {
	Type   MessageType `json:"type"`
	Domain string      `json:"domain"`
	Host   string      `json:"host"`
	Source string      `json:"source"`
}

func (*SubfinderResultMessage) GetType

func (m *SubfinderResultMessage) GetType() MessageType

type UserRole

type UserRole string
const (
	UserRoleAgent  UserRole = "agent"
	UserRoleAdmin  UserRole = "admin"
	UserRoleViewer UserRole = "viewer"
)

Jump to

Keyboard shortcuts

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