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

Updated mitm6.py to include logging capabilities #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

altjx
Copy link

@altjx altjx commented May 2, 2022

Added an option (-o) to allow outputting the results of mitm6 into a log file. I find this to be very useful for my scenario since tee'ing the output of mitm6 doesn't seem to actually do anything until mitm6 closes. For my use case, I need to monitor mitm6's output in realtime and terminate it depending on conditions.

@Zamanry
Copy link

Zamanry commented Jan 4, 2023

image
I had to modify line 32 to say if config.outfile is not None:. And then add line 53 area to be:

else:
    self.outfile = None

@Zamanry
Copy link

Zamanry commented Jan 4, 2023

You may consider adding a UTC timestamp by default into the outfile. I prefer %Y-%M-%DT%h:%m:%sZ (e.g., 2022-08-11T12:04:01Z) which is ISO 8601 compliant. This way if someone were to pushback on what time/date something happened, I can provide the exact timeline for them. I used to previously do the below until I realized tee doesn't work with mitm6 (but works with other tools):

(date && sudo mitm6 ...) 2>&1 | tee -a 'mitm6.txt'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants