Popular voice and chat messaging program Skype stores chat logs in some rather weird binary file format, some sort of database. I had
to convert those logs to plain text (for some sort of "investigation")
While decoding the log file, i noticed some curious easter egg in skype: the timestamps gonna overflow (or change format)
on Friday, 13th July 2012, 12:00 GMT. Which is pretty funny indeed :-) I posted about that on my blog.
Skype chatlogs (chatmsg256.dbb , chatmsg1024.dbb , and so on)
Different chat log files (chatmsg256.dbb , chatmsg1024.dbb) have same kind of data, but contain messages of different length.
You need to combine messages extracted from all chatmsg*.dbb files to get full history.
The chat logs are not encrypted in any way, however, them contain binary data so you cannot view them with text editor.
Hex editor to the rescue :-)
Sample entry from chatmsg256.dbb, with highlighting of interesting portions:
Please note that human-readable date here is merely part of message itself .
Skype sound test service (echo123) replies to chat messages with your name, time, and echo of your message
Highlighted parts: list of skype names of people in chatroom,
skype's binary timestamp,
sender's skype name,
Notably, the data seems to be prefixed with XX 03 markers.
"Parsing" the data
While theres data to read:
Skip to and including "\xE0\x03\x23" list of skype names of people in chatroom = Read until ";"
Skip to and including "\xE5\x03" skype's binary timestamp = Read 4 bytes
Skip to and including "\xE8\x03" sender's skype name, = read until zero char
Skip until and including "\xFC\x03" message text = read until zero char
Optionally, you can read other stuff like assigned "full names" of people in chat, again just by skipping and reading until specific pattern.
It is very weird. The highest bits of all 4 timestamp bytes are always 1.
After some more experimenting i determined that if i toss out first bits and interpret this as 28-bit number,
it gives number of seconds from some pretty nonsentical time, approx Sat 10 Jan 2004 14:35:42 GMT (skype was released somewhere around 2004)
Then i got curious when those 28 bits gonna overflow. It overflows on Friday 13 July 2012 12:00:00 GMT.
Now that sure doesnt look like random nonsentical time! :-)
This also explains why first bits are 1 . It is negative signed chars.
I tried setting date on my computer to past 13 July 2012 12:00:00 GMT, however, in the chat logs, skype still used correct time from today.
Apparently, skype timestamps use server time, or time based on sender's clock, rather than your computer's local time.
This information applies to skype 2.0.13 . Other versions of skype might have slightly, or not so slightly different format
I am not affilated with Skype Inc. or eBay in any way, and this is not official documentation.
All the trademarks are property of their respective owners.
(C) 2004..2013 Dmytry Lavrov.
Want to say something or ask some question? Contact: