#!/usr/bin/perl # # Copyright (C) 2007 Rodin Lyasoff # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to # The Free Software Foundation, Inc. # 51 Franklin Street, Fifth Floor # Boston, MA, 02110-1301, USA # ########################################################################### # Yahoo archive format, as reverse engineered by the author: # # DATE-eightmysterybytes-SIZE-MESSAGE-ZERO # V V2 V a{size} x2 # # + The date is a standard UNIX timestamp. # + The first of the mystery bytes seems to be 06 for a valid message. # I ignore it at the moment. The rest are zero, afaics. # + The message has a length of SIZE bytes. It is encoded by XORing it # with the username of the user who was logged in when the client did # the logging. This username is usually a part of the log filename. ########################################################################### my $username = ""; my $file = ""; $username = shift and $file = shift or die<