<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Alex' Blog &#187; XPS</title>
	<atom:link href="http://bremora.wordpress.com/category/net/xps/feed/" rel="self" type="application/rss+xml" />
	<link>http://bremora.wordpress.com</link>
	<description>Infotainment</description>
	<lastBuildDate>Wed, 07 Jan 2009 00:57:40 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='bremora.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/6303691707732a02daa43c442d55b350?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Alex' Blog &#187; XPS</title>
		<link>http://bremora.wordpress.com</link>
	</image>
			<item>
		<title>Deobfuscate fonts in an XPS document</title>
		<link>http://bremora.wordpress.com/2007/06/10/de-obfuscate-fonts-in-an-xps-document/</link>
		<comments>http://bremora.wordpress.com/2007/06/10/de-obfuscate-fonts-in-an-xps-document/#comments</comments>
		<pubDate>Sun, 10 Jun 2007 17:47:16 +0000</pubDate>
		<dc:creator>Alexander Bremora</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[XPS]]></category>

		<guid isPermaLink="false">http://bremora.wordpress.com/2007/06/10/de-obfuscate-fonts-in-an-xps-document/</guid>
		<description><![CDATA[XPS is the new portable format from Microsoft. The file structure consists of several parts, which includes the text (the so called &#8222;fixed documents&#8220;) and, of course, all resources. Images and fonts are embedded in a specific folder but as a general rule fonts are obfuscated to &#8222;protect&#8220; the copyrights of the author.
To extract the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bremora.wordpress.com&blog=1001917&post=12&subd=bremora&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>XPS is the new portable format from Microsoft. The file structure consists of several parts, which includes the text (the so called &#8222;fixed documents&#8220;) and, of course, all resources. Images and fonts are embedded in a specific folder but as a general rule fonts are obfuscated to &#8222;protect&#8220; the copyrights of the author.</p>
<p>To extract the text (which is by the way a subset of XAML) all resources have to be extracted, too. But obfuscated fonts cannot be read, therefore a decryption is required.<br />
The encryption is rather simple: The first 32 bytes are XOR with the GUID of the file (it is also documented in the <a href="http://msdn2.microsoft.com/en-us/library/ms771596.aspx" target="_blank">MSDN</a>). To reverse all font files repeat the exclusive disjunction with the GUID (the file name implies the GUID, thank you) and you will receive the original source (for a better understanding see: <a href="http://en.wikipedia.org/wiki/XOR" target="_blank">http://en.wikipedia.org/wiki/XOR</a>).</p>
<p>I attached a little example. Pass the obfuscated font path and streamOut will return the deobfuscated stream. To save the stream to disc, call streamOut.Position = 0 first.</p>
<p><span style="font-weight:bold;">Edit 2008-10-26:</span><br />
Here you can find my solution:<br />
<a class="moz-txt-link-freetext" href="http://www.bremora.com/index.php/xps-font-deobfuscator">http://www.bremora.com/index.php/xps-font-deobfuscator</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bremora.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bremora.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bremora.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bremora.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bremora.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bremora.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bremora.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bremora.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bremora.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bremora.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bremora.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bremora.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bremora.wordpress.com&blog=1001917&post=12&subd=bremora&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bremora.wordpress.com/2007/06/10/de-obfuscate-fonts-in-an-xps-document/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/868ba763846c41acec6d2476cb2a7b62?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bremora</media:title>
		</media:content>
	</item>
	</channel>
</rss>