<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Yahoo! messenger archive file format</title>
	<atom:link href="http://www.0xcafefeed.com/2007/12/yahoo-messenger-archive-file-format/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.0xcafefeed.com/2007/12/yahoo-messenger-archive-file-format/</link>
	<description>Thoughts on Java™, Java EE™ and web application development</description>
	<lastBuildDate>Fri, 30 Apr 2010 07:48:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Rajiv</title>
		<link>http://www.0xcafefeed.com/2007/12/yahoo-messenger-archive-file-format/comment-page-1/#comment-298</link>
		<dc:creator>Rajiv</dc:creator>
		<pubDate>Fri, 30 Apr 2010 07:48:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.0xcafefeed.com/?p=20#comment-298</guid>
		<description>Hi Kyle, thanks for the note!

The blog entry does not discuss the file format in detail. One of the details not documented being the format in which an integer is stored/read. 

The attached file Parser.java is a more &quot;complete reference&quot; (to the extent I have understood). If you see the readInt method in the file you will notice the bytes are read in reverse like you mentioned.</description>
		<content:encoded><![CDATA[<p>Hi Kyle, thanks for the note!</p>
<p>The blog entry does not discuss the file format in detail. One of the details not documented being the format in which an integer is stored/read. </p>
<p>The attached file Parser.java is a more &#8220;complete reference&#8221; (to the extent I have understood). If you see the readInt method in the file you will notice the bytes are read in reverse like you mentioned.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle E. Domingo</title>
		<link>http://www.0xcafefeed.com/2007/12/yahoo-messenger-archive-file-format/comment-page-1/#comment-297</link>
		<dc:creator>Kyle E. Domingo</dc:creator>
		<pubDate>Tue, 27 Apr 2010 06:04:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.0xcafefeed.com/?p=20#comment-297</guid>
		<description>Just to inform you guys, I tried to code a reader for YM archives but this format (though the segments are still the same) is already not applicable in my current YM version (9.0.0.1912). For this version, bytes in each segment is reversed.

For example, the four byte representation of the timestamp now (1272351546) is 4B D6 8B 3A. This is encoded in the archive file as 3A 8B D6 4B. same goes for the to_or_from, the message length (example, 0200 0000 for a 2 letter message), and i think, the message as well.</description>
		<content:encoded><![CDATA[<p>Just to inform you guys, I tried to code a reader for YM archives but this format (though the segments are still the same) is already not applicable in my current YM version (9.0.0.1912). For this version, bytes in each segment is reversed.</p>
<p>For example, the four byte representation of the timestamp now (1272351546) is 4B D6 8B 3A. This is encoded in the archive file as 3A 8B D6 4B. same goes for the to_or_from, the message length (example, 0200 0000 for a 2 letter message), and i think, the message as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Dassin</title>
		<link>http://www.0xcafefeed.com/2007/12/yahoo-messenger-archive-file-format/comment-page-1/#comment-287</link>
		<dc:creator>Joe Dassin</dc:creator>
		<pubDate>Sat, 26 Dec 2009 16:03:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.0xcafefeed.com/?p=20#comment-287</guid>
		<description>Ok can someone do it the other way around ? I mean a YIM! Archives ENCODER .....</description>
		<content:encoded><![CDATA[<p>Ok can someone do it the other way around ? I mean a YIM! Archives ENCODER &#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KermodeBear</title>
		<link>http://www.0xcafefeed.com/2007/12/yahoo-messenger-archive-file-format/comment-page-1/#comment-263</link>
		<dc:creator>KermodeBear</dc:creator>
		<pubDate>Thu, 01 Oct 2009 03:39:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.0xcafefeed.com/?p=20#comment-263</guid>
		<description>It doesn&#039;t make sense for the message length to be 1 byte, since messages can be over 256 characters in length. I&#039;m also not convinced that the timestamp is 5 bytes either - it may be, but when I have decoded the archive files, the time stamps have always been accurate.

That said, I haven&#039;t tested this on the newest versions of the Yahoo! IM software, so something might have changed. Maybe it&#039;s time to give it another go around and see what happens. (o:</description>
		<content:encoded><![CDATA[<p>It doesn&#8217;t make sense for the message length to be 1 byte, since messages can be over 256 characters in length. I&#8217;m also not convinced that the timestamp is 5 bytes either &#8211; it may be, but when I have decoded the archive files, the time stamps have always been accurate.</p>
<p>That said, I haven&#8217;t tested this on the newest versions of the Yahoo! IM software, so something might have changed. Maybe it&#8217;s time to give it another go around and see what happens. (o:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JSG</title>
		<link>http://www.0xcafefeed.com/2007/12/yahoo-messenger-archive-file-format/comment-page-1/#comment-248</link>
		<dc:creator>JSG</dc:creator>
		<pubDate>Thu, 06 Aug 2009 15:56:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.0xcafefeed.com/?p=20#comment-248</guid>
		<description>I think the format is actually:
---------------------------------
1. timestamp (5 bytes)
2. padding   (3 bytes)
3. toOrFrom  (1 bytes)
4. padding   (3 bytes)
5. mesg_len  (1 bytes)
6. padding   (3 bytes)

Some of that is up for debate but the timestamp is definitely 5 bytes.</description>
		<content:encoded><![CDATA[<p>I think the format is actually:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. timestamp (5 bytes)<br />
2. padding   (3 bytes)<br />
3. toOrFrom  (1 bytes)<br />
4. padding   (3 bytes)<br />
5. mesg_len  (1 bytes)<br />
6. padding   (3 bytes)</p>
<p>Some of that is up for debate but the timestamp is definitely 5 bytes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KermodeBear</title>
		<link>http://www.0xcafefeed.com/2007/12/yahoo-messenger-archive-file-format/comment-page-1/#comment-197</link>
		<dc:creator>KermodeBear</dc:creator>
		<pubDate>Mon, 01 Dec 2008 05:48:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.0xcafefeed.com/?p=20#comment-197</guid>
		<description>Seems that the &#039;code&#039; tag still hates less-than symbols inside. Tsk tsk. Giving this another try.

&lt;code&gt;
#/usr/bin/php
&lt;?php
/**
 * Usage:
 * ./decodeYahoo.php account contact file
 *
 * &#039;account&#039; is the Y!M account name.
 * &#039;recipient&#039; is the name of the contact
 * &#039;file&#039; is the file to parse.
 *
 * Please note: There is no error checking
 * in the code below. If you want to use
 * this code for anything important, please
 * add some. Also, fopen/fread would be more
 * memory efficient than a file_get_contents,
 * but again, I&#039;m being super lazy today. (o:
 */

$account = $argv[1];
$contact = $argv[2];
$data    = file_get_contents($argv[3]);
$p       = 0; // Position in the file&#039;s data.

while ($p &lt; strlen($data)) {
    $result = array();

    $pieces = unpack(&#039;ltime/lunknown/ltoFrom/llength&#039;, substr($data, $p, $p + 16));

    $p += 16;

    $result[&#039;date&#039;] = date(&#039;r&#039;, $pieces[&#039;time&#039;]);
    $result[&#039;to&#039;] = $pieces[&#039;toFrom&#039;] ? $contact : $account;
    $cypherText = substr($data, $p, $pieces[&#039;length&#039;]);

    $p += $pieces[&#039;length&#039;];

    // Generates the XOR key by repeating the account name
    // then chopping off extra characters so the entire message
    // can be XOR in one operation.
    $key = str_repeat($to, ceil($pieces[&#039;length&#039;] / strlen($to)));
    $key = substr($key, 0, strlen($cypherText));
    $result[&#039;text&#039;] = $key ^ $cypherText;

    // There seems to be an extra 4 bytes of junk here.
    $p+=4;

    // Nov 01, 2008 12:34 PersonTalking: That&#039;s what SHE said.
    echo &quot;{$result[&#039;date&#039;]} {$result[&#039;to&#039;]}: {$result[&#039;text&#039;]}\n&quot;;
}
?&gt;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Seems that the &#8216;code&#8217; tag still hates less-than symbols inside. Tsk tsk. Giving this another try.</p>
<p><code><br />
#/usr/bin/php<br />
&lt;?php<br />
/**<br />
 * Usage:<br />
 * ./decodeYahoo.php account contact file<br />
 *<br />
 * 'account' is the Y!M account name.<br />
 * 'recipient' is the name of the contact<br />
 * 'file' is the file to parse.<br />
 *<br />
 * Please note: There is no error checking<br />
 * in the code below. If you want to use<br />
 * this code for anything important, please<br />
 * add some. Also, fopen/fread would be more<br />
 * memory efficient than a file_get_contents,<br />
 * but again, I'm being super lazy today. (o:<br />
 */</p>
<p>$account = $argv[1];<br />
$contact = $argv[2];<br />
$data    = file_get_contents($argv[3]);<br />
$p       = 0; // Position in the file's data.</p>
<p>while ($p &lt; strlen($data)) {<br />
    $result = array();</p>
<p>    $pieces = unpack('ltime/lunknown/ltoFrom/llength', substr($data, $p, $p + 16));</p>
<p>    $p += 16;</p>
<p>    $result['date'] = date('r', $pieces['time']);<br />
    $result['to'] = $pieces['toFrom'] ? $contact : $account;<br />
    $cypherText = substr($data, $p, $pieces['length']);</p>
<p>    $p += $pieces['length'];</p>
<p>    // Generates the XOR key by repeating the account name<br />
    // then chopping off extra characters so the entire message<br />
    // can be XOR in one operation.<br />
    $key = str_repeat($to, ceil($pieces['length'] / strlen($to)));<br />
    $key = substr($key, 0, strlen($cypherText));<br />
    $result['text'] = $key ^ $cypherText;</p>
<p>    // There seems to be an extra 4 bytes of junk here.<br />
    $p+=4;</p>
<p>    // Nov 01, 2008 12:34 PersonTalking: That's what SHE said.<br />
    echo "{$result['date']} {$result['to']}: {$result['text']}\n";<br />
}<br />
?&gt;<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KermodeBear</title>
		<link>http://www.0xcafefeed.com/2007/12/yahoo-messenger-archive-file-format/comment-page-1/#comment-196</link>
		<dc:creator>KermodeBear</dc:creator>
		<pubDate>Mon, 01 Dec 2008 05:46:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.0xcafefeed.com/?p=20#comment-196</guid>
		<description>Hey! Thank you VERY much for posting this information. I found it to be incredibly useful. I had been wanting to export my conversations with some friends to text files for quite a while, but was not interested in paying for utilities that do this. With your help I was able quickly write up some PHP to do the job. Yes, I know, PHP isn&#039;t the ideal language for this kind of thing, but it is the language in which I am most adept.

decodeYahoo.php
&lt;code&gt;
#/usr/bin/php
&lt;?php
/**
 * Usage:
 * ./decodeYahoo.php account contact file
 *
 * &#039;account&#039; is the Y!M account name.
 * &#039;recipient&#039; is the name of the contact
 * &#039;file&#039; is the file to parse.
 *
 * Please note: There is no error checking
 * in the code below. If you want to use
 * this code for anything important, please
 * add some. Also, fopen/fread would be more
 * memory efficient than a file_get_contents,
 * but again, I&#039;m being super lazy today. (o:
 */

$account = $argv[1];
$contact = $argv[2];
$data    = file_get_contents($argv[3]);
$p       = 0; // Position in the file&#039;s data.

while ($p 
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hey! Thank you VERY much for posting this information. I found it to be incredibly useful. I had been wanting to export my conversations with some friends to text files for quite a while, but was not interested in paying for utilities that do this. With your help I was able quickly write up some PHP to do the job. Yes, I know, PHP isn&#8217;t the ideal language for this kind of thing, but it is the language in which I am most adept.</p>
<p>decodeYahoo.php<br />
<code><br />
#/usr/bin/php<br />
&lt;?php<br />
/**<br />
 * Usage:<br />
 * ./decodeYahoo.php account contact file<br />
 *<br />
 * 'account' is the Y!M account name.<br />
 * 'recipient' is the name of the contact<br />
 * 'file' is the file to parse.<br />
 *<br />
 * Please note: There is no error checking<br />
 * in the code below. If you want to use<br />
 * this code for anything important, please<br />
 * add some. Also, fopen/fread would be more<br />
 * memory efficient than a file_get_contents,<br />
 * but again, I'm being super lazy today. (o:<br />
 */</p>
<p>$account = $argv[1];<br />
$contact = $argv[2];<br />
$data    = file_get_contents($argv[3]);<br />
$p       = 0; // Position in the file's data.</p>
<p>while ($p<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
