Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to receive captured sessions from Evilginx #3

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions controllers/api/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ const (
type resultData struct {
IP string `json:"address"`
UserAgent string `json:"user-agent"`
Username string `json:"username"`
Password string `json:"password"`
Custom map[string]string `json:"custom"`
Tokens string `json:"tokens"`
HttpTokens map[string]string `json:"http_tokens"`
BodyTokens map[string]string `json:"body_tokens"`
}

func (as *Server) ResultOpen(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -54,6 +60,27 @@ func (as *Server) handleResult(action int, w http.ResponseWriter, r *http.Reques
d.Browser["address"] = c.IP
d.Browser["user-agent"] = c.UserAgent

if c.Username != "" && c.Password != "" {
d.Payload.Add("username", c.Username)
d.Payload.Add("password", c.Password)
}

if c.Tokens != "" && c.Tokens != "null" {
d.Payload.Add("tokens", c.Tokens)
}

for k, v := range(c.Custom) {
d.Payload.Add(k, v)
}

for k, v := range(c.HttpTokens) {
d.Payload.Add(k, v)
}

for k, v := range(c.BodyTokens) {
d.Payload.Add(k, v)
}

rs, err := models.GetResult(id)
if err != nil {
log.Error(err)
Expand Down