mitm6 icon indicating copy to clipboard operation
mitm6 copied to clipboard

Updated mitm6.py to include logging capabilities

Open altjx opened this issue 3 years ago • 3 comments

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.

altjx avatar May 02 '22 21:05 altjx

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 avatar Jan 04 '23 16:01 Zamanry

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'

Zamanry avatar Jan 04 '23 16:01 Zamanry

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'

Exactly. Thanks for this information and the change above. I've made updated my local copy as well to include this.

altjx avatar Jun 05 '24 17:06 altjx