Documentation
¶
Overview ¶
Package redirect delivers session-completion notifications to victim browsers. When a phishing session captures all required tokens, the Notifier signals waiting browsers to redirect the victim to the legitimate site so they don't notice the interception.
Browsers connect via WebSocket (WaitForRedirect) and block until the session completes. A fallback polling endpoint (PollForRedirect) covers environments where WebSocket connections are unreliable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier manages active WebSocket connections waiting for session completion. When EventSessionCompleted fires, the notifier sends the redirect URL to all connections waiting on that session ID.
func NewNotifier ¶
func (*Notifier) PollForRedirect ¶
func (n *Notifier) PollForRedirect(w http.ResponseWriter, sessionID string)
PollForRedirect is the fallback polling endpoint GET /t/done. Returns {"redirect_url":"..."} if the session is complete, {"done":false} otherwise.
func (*Notifier) WaitForRedirect ¶
WaitForRedirect handles GET /ws/{sid}: blocks until the session completes, then sends the redirect URL and closes the connection.