Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug] Duplicate File Logs for Emulations

Aperta
#73 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Inizia in BaseEmulation e verifica come i gestori della console e dei file vengono associati a self.elogger. Riproduci il problema tramite SWAT Shell con un’emulazione OOTB, quindi esamina il relativo file in logs/. L’attività è completata quando ogni chiamata a self.elogger.* compare una sola volta nel log dell’emulazione corrispondente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

🐛 Bug Report

Describe the bug

When running an emulation, there is a separate console and file handler set to self.elogger within BaseEmulation. This allows emulations to use a secondary logger to separate logging. The log files written to are within the logs/ directory where the log file name represents the emulation.

There is a bug currently that is duplicating logs within each respective emulation log file.

Steps to reproduce

Steps to reproduce the behavior:

  1. Start SWAT Shell
  2. Authenticate with OAuth credentials
  3. Run any OOTB emulation
  4. Review log file in logs/

Expected behavior

The logging should only be happening once per self.elogger.* call.

Screenshots

2023-08-12 15:15:32,486 - initial_access.gmail_phishing_form_link - INFO - Created Google Form: 17b0DwhmBY0Ihv_q85zuZj2fJdPYOFQuiuhuZvbGSgAg (gmail_phishing_form_link.py:47)
2023-08-12 15:15:32,486 - initial_access.gmail_phishing_form_link - INFO - Created Google Form: 17b0DwhmBY0Ihv_q85zuZj2fJdPYOFQuiuhuZvbGSgAg (gmail_phishing_form_link.py:47)
2023-08-12 15:15:32,488 - initial_access.gmail_phishing_form_link - INFO - Created email with Google Form link (gmail_phishing_form_link.py:59)
2023-08-12 15:15:32,488 - initial_access.gmail_phishing_form_link - INFO - Created email with Google Form link (gmail_phishing_form_link.py:59)
2023-08-12 15:15:33,333 - initial_access.gmail_phishing_form_link - INFO - Sent email to [email protected] from [email protected] (gmail_phishing_form_link.py:65)
2023-08-12 15:15:33,333 - initial_access.gmail_phishing_form_link - INFO - Sent email to [email protected] from [email protected] (gmail_phishing_form_link.py:65)

SWAT version

0.0.1

Checklist

Please ensure you've completed the following tasks:

  • I've described the bug in as much detail as possible
  • I've provided steps to reproduce the bug
  • I've added any relevant screenshots or other information
Lingua principale
Python
Stelle
171
Fork
9
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di elastic/SWAT

Tutte le issue di elastic/SWAT

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.