Documentation
¶
Overview ¶
Package ws will provide websocket functionality to keep the browser windows in sync
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a middleman between the websocket connection and the hub.
type HTTPEvent ¶
type HTTPEvent struct {
Type string `json:"type"` // "http"
Method string `json:"method"` // "GET", "POST", "PUT", "DELETE"
URL string `json:"url"` // full URL including query string
Body string `json:"body"` // request/response body
Parameters string `json:"parameters"` // query parameters
Headers map[string]string `json:"headers"` // HTTP headers
Source string `json:"source"` // client IP:port
UserAgent string `json:"useragent"` // browser/user agent string
Status int `json:"status"` // HTTP status code
Timestamp time.Time `json:"timestamp"`
}
type Hub ¶
type Hub struct {
// Inbound messages from the clients.
Broadcast chan []byte
// Ring BUffers - capped storage survives client reconnect
HTTPLog *RingBuffer
DNSLog *RingBuffer
SMTPLog *RingBuffer
SMBLog *RingBuffer
// contains filtered or unexported fields
}
Hub maintains the set of active clients and broadcasts messages to the clients.
type NTLMEvent ¶
type NTLMEvent struct {
Type string `json:"type"` // "ntlm"
Username string `json:"username"` // username
Domain string `json:"domain"` // domain
Workstation string `json:"workstation"` // workstation
Challenge string `json:"challenge"` // challenge
Hash string `json:"hash"` // hashcat line
HashType string `json:"hashType"` // Distinguishing between NetNTLMv1/2, SSP, LM, etc.
HashcatMode string `json:"hashcatMode"` // hashcat mode (v2 5600, v1 5500, 3000 LM, 1000 NTLM)
CrackedPassword string `json:"crackedPassword"` // plaintext password if cracked, empty otherwise
Source string `json:"source"` // source
Timestamp time.Time `json:"timestamp"`
}
type Packet ¶
type Packet struct {
Type string `json:"type"`
Content json.RawMessage
}
Packet defines a packet struct
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
RingBuffer is a fixed-capacity thread-safe circular buffer. When full, the oldest entry is dropped to make room for the new one.
func NewRingBuffer ¶
func NewRingBuffer(max int) *RingBuffer
func (*RingBuffer) Add ¶
func (r *RingBuffer) Add(item []byte)
Add appends an item, evicting the oldest if at capacity.
func (*RingBuffer) Last ¶
func (r *RingBuffer) Last(n int) [][]byte
Last returns the most recent n items (or all if fewer exist), in oldest-first order, ready to replay on the client.
type SMTPAttachment ¶
type SMTPEvent ¶
type SMTPEvent struct {
Type string `json:"type"` // "smtp"
From string `json:"from"`
To []string `json:"to"`
CC []string `json:"cc"`
BCC []string `json:"bcc"`
Subject string `json:"subject"`
Body string `json:"body"`
HTMLBody string `json:"htmlBody"`
RawHeader string `json:"rawHeader"`
Attachments []SMTPAttachment `json:"attachments"`
Timestamp time.Time `json:"timestamp"`
}
type SendPacket ¶
SendPacket represents a response package from server to browser
Click to show internal directories.
Click to hide internal directories.