Friday, 23 August 2013

Python timestamp for pcap files

Python timestamp for pcap files

I am fairly new to Python, and i came across some code that parsed through
a pcap file. The only problem is that this code contained the line
datetime.datetime.now() which it would use to print out the time stamp for
the connections in the file, however it prints out the times stamp of when
it was just accessed. What i want to do however is to print out the
original time stamps for the connections in the file.
For example, if i used the code to parse through the pcap file now, the
first connection would have a time stamp of August 23, 2013 9:04 (or
however specific it gets). Where as the file has the original time stamp
of July 3, 2008 3:05 (which is what i want to actually print out).
I was wondering if anyone knew a simple python solution or any other help
is appreciated.

No comments:

Post a Comment