<?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/"
	>

<channel>
	<title>Silly Science</title>
	<atom:link href="http://www.silly-science.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.silly-science.co.uk</link>
	<description>Electronics, Programming and Hacking About</description>
	<lastBuildDate>Tue, 10 Jan 2012 14:21:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Stupid things you should not do #1</title>
		<link>http://www.silly-science.co.uk/2012/01/10/stupid-things-you-should-not-do-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=stupid-things-you-should-not-do-1</link>
		<comments>http://www.silly-science.co.uk/2012/01/10/stupid-things-you-should-not-do-1/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 14:21:22 +0000</pubDate>
		<dc:creator>The Silly Scientist</dc:creator>
				<category><![CDATA[Stupid things you should not do]]></category>
		<category><![CDATA[stupid things you should not do]]></category>

		<guid isPermaLink="false">http://www.silly-science.co.uk/?p=230</guid>
		<description><![CDATA[&#62; python generator.py --help Opening --help Outputting start code... Outputting template... Writing out finish... Done Do'h!! &#62; ls --help generator.py &#62; rm --help rm: illegal option -- - usage: rm [-f &#124; -i] [-dPRrvW] file ... unlink file &#62; rm "--help" rm: illegal option -- - usage: rm [-f &#124; -i] [-dPRrvW] file ... unlink [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;count=none&amp;text=Stupid%20things%20you%20should%20not%20do%20%231" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;count=none&amp;text=Stupid%20things%20you%20should%20not%20do%20%231" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;title=Stupid%20things%20you%20should%20not%20do%20%231" id="wpa2a_2">Share/Bookmark</a></p><blockquote><p>&gt; python generator.py --help<br />
Opening --help<br />
Outputting start code...<br />
Outputting template...<br />
Writing out finish...<br />
Done</p></blockquote>
<p>Do'h!!</p>
<blockquote><p>&gt; ls<br />
--help generator.py</p>
<p>&gt; rm --help<br />
rm: illegal option -- -<br />
usage: rm [-f | -i] [-dPRrvW] file ...<br />
unlink file</p>
<p>&gt; rm "--help"<br />
rm: illegal option -- -<br />
usage: rm [-f | -i] [-dPRrvW] file ...<br />
unlink file</p></blockquote>
<p>Gah! and hooray for GUIs</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;count=none&amp;text=Stupid%20things%20you%20should%20not%20do%20%231" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;count=none&amp;text=Stupid%20things%20you%20should%20not%20do%20%231" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2012%2F01%2F10%2Fstupid-things-you-should-not-do-1%2F&amp;title=Stupid%20things%20you%20should%20not%20do%20%231" id="wpa2a_4">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.silly-science.co.uk/2012/01/10/stupid-things-you-should-not-do-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Can you crack it? Stage 3 solution</title>
		<link>http://www.silly-science.co.uk/2011/12/03/can-you-crack-it-stage-3-solution/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=can-you-crack-it-stage-3-solution</link>
		<comments>http://www.silly-science.co.uk/2011/12/03/can-you-crack-it-stage-3-solution/#comments</comments>
		<pubDate>Sat, 03 Dec 2011 23:57:13 +0000</pubDate>
		<dc:creator>The Silly Scientist</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[can you crack it]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[disassembly]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[GCHQ]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[reverse engineering]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://www.silly-science.co.uk/?p=234</guid>
		<description><![CDATA[Once getting through stage 2 you will have an EXE file. It requires windows (I ran it in a VirtualBox VM seeing as I had no idea what it would do - can't be too careful!), cygwin and the crypt library when installing cygwin. Running the EXE you will see that you require some kind of [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;count=none&amp;text=Can%20you%20crack%20it%3F%20Stage%203%20solution" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;count=none&amp;text=Can%20you%20crack%20it%3F%20Stage%203%20solution" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;title=Can%20you%20crack%20it%3F%20Stage%203%20solution" id="wpa2a_6">Share/Bookmark</a></p><p>Once getting through <a title="Can you crack it? – Stage 2 Solution" href="http://www.silly-science.co.uk/2011/12/02/can-you-crack-it-stage-2-solution/">stage 2</a> you will have an EXE file. It requires windows (I ran it in a VirtualBox VM seeing as I had no idea what it would do - can't be too careful!), <a title="Cygwin" href="http://cygwin.com/" target="_blank">cygwin</a> and the crypt library when installing cygwin.</p>
<p>Running the EXE you will see that you require some kind of license.txt - if you create an empty one then you get an error about it being invalid. The next stage is working out what is required to make the license.txt file valid. Being new to this realm of reverse engineering, but being comfortable with work with ASM I tried a number of tools - strace, objdump and strings. Each yielded useful bits of information - especially strings.</p>
<p>However the real breakthrough came when I ran the exe file through a tool called <a title="IDA Pro" href="http://www.hex-rays.com/products/ida/support/download.shtml" target="_blank">IDA Pro</a> - the freeware version is sufficient for this exercise.</p>
<p>Running the binary through IDA Pro produces a very comprehensive flow of the program. If you navigate this flow you will being to see calls to <em>printf</em> which relate to the message we get on the screen.</p>
<p><span id="more-234"></span></p>
<div id="attachment_235" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.silly-science.co.uk/wp-content/uploads/2011/12/Screen-Shot-2011-12-03-at-22.56.15.png"><img class="size-thumbnail wp-image-235" title="Can you crack it stage 3 exe entry point" src="http://www.silly-science.co.uk/wp-content/uploads/2011/12/Screen-Shot-2011-12-03-at-22.56.15-150x150.png" alt="Can you crack it stage 3 exe entry point" width="150" height="150" /></a><p class="wp-caption-text">Entry Point of Code Check for argument count</p></div>
<p style="text-align: left;">Manually following the flow allows you to ascertain what the programme is checking for in license.txt. After seeing a call to fopen64 you will find a <em>cmp</em> instruction on the first 4 bytes of the file. It compares it with this 32 bit hex value 0x71686367 - if you convert this into an ASCII string you will see that it translates to 'gchq'. This is the 'magic word' that the license.txt file begins with.</p>
<div id="attachment_238" class="wp-caption aligncenter" style="width: 160px"><a href="http://www.silly-science.co.uk/wp-content/uploads/2011/12/Screen-Shot-2011-12-03-at-22.59.50.png"><img class="size-thumbnail wp-image-238" title="Can You Crack It - file read and magic word check" src="http://www.silly-science.co.uk/wp-content/uploads/2011/12/Screen-Shot-2011-12-03-at-22.59.50-150x150.png" alt="Can You Crack It - file read and magic word check" width="150" height="150" /></a><p class="wp-caption-text">File read and magic word check</p></div>
<p>Adding the those four characters to the license.txt file will result in you getting the message about license.txt being invalid - it needs something more. So continue to follow the program flow and we see the following steps -</p>
<div id="attachment_239" class="wp-caption alignright" style="width: 160px"><a href="http://www.silly-science.co.uk/wp-content/uploads/2011/12/Screen-Shot-2011-12-03-at-23.21.06.png"><img class="size-thumbnail wp-image-239" title="Can you crack it stage 3 - Crypt and comparison" src="http://www.silly-science.co.uk/wp-content/uploads/2011/12/Screen-Shot-2011-12-03-at-23.21.06-150x150.png" alt="Can you crack it stage 3 - Crypt and comparison" width="150" height="150" /></a><p class="wp-caption-text">Loading salt, calling crypt and doing the comparison</p></div>
<ul>
<li>Load a string from memory - the string is <em><em>hqDTK7b8K2rvw</em></em></li>
<li>Pass the above string as the salt and the string from license.txt to the <a title="crypt(3) man page" href="http://www.kernel.org/doc/man-pages/online/pages/man3/crypt.3.html" target="_blank">crypt(3)</a> function</li>
<li>Compare the result to <em>hqDTK7b8K2rvw </em>and set a flag if it they match using <em>strcmp()</em></li>
</ul>
<p>The challenging step here is to decrypt the password. There are a couple of helpful clues - <em>crypt(3)</em> uses DES the result is used in the salt. The output of <em>crypt(3)</em> includes the salt at the beginning of the string. So the salt is 'hq'. We also know that <em>crypt(3)</em>does not allow a password of more than 8 characters, and we can assume that this isn't going to be too challenging so an attack on it with a lower case string / dictionary is a good place to start. We also know that the password is 8 characters long as the pointer to the read in string from license.txt is incremented by 8 later one.</p>
<p>I'll leave this part of the challenge as an exercise to the reader - there are plenty of tools - think rainbow tables, john the ripper, crack etc... (as an aside, it took my Macbook Pro around 2 hours to crack it).</p>
<p>The program continues -</p>
<div id="attachment_242" class="wp-caption alignright" style="width: 160px"><a href="http://www.silly-science.co.uk/wp-content/uploads/2011/12/Screen-Shot-2011-12-03-at-23.39.39.png"><img class="size-thumbnail wp-image-242" title="Can you crack it stage 3 - generating the URL" src="http://www.silly-science.co.uk/wp-content/uploads/2011/12/Screen-Shot-2011-12-03-at-23.39.39-150x150.png" alt="Can you crack it stage 3 - generating the URL" width="150" height="150" /></a><p class="wp-caption-text">Generating the URL to get the final solution</p></div>
<ul>
<li>It prints out two loading "stage 1" and "stage 2" keys - which is a massive clue as to what goes next in the license.txt file. I always wondered what those unused values in the previous challenge were kicking around for...</li>
<li>If we are successful in the above password step then the program processes four values - the above <em>crypt</em> hash, and the three 32 words read from the text file (note you have to have these in the license.txt file as binary values, not text - so you'll need a script to output that or a hex editor to create the file).</li>
<li>The four values are formatted into a URL (as per the other challenges) which will lead you to the final solution to the entire problem.</li>
</ul>
<p>Now, sit back... relax, and enjoy a well earned break or apply for the job... your call...</p>
<p>I just thought I would present some personal comments/reflections on this challenge - firstly as an engineer who works day to day with very low level embedded this was an interesting tangent to that circle of work. I often have to dig assembly and understand the finer points of computer architectures, so much of the above feels familiar - albeit with a very different architecture and slant on what you are trying to achieve. All in all it was a bit of fun, I learnt some stuff and walked out of my usual circles. I might even continue to expand on these skills when I find a suitable project...</p>
</div>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;count=none&amp;text=Can%20you%20crack%20it%3F%20Stage%203%20solution" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;count=none&amp;text=Can%20you%20crack%20it%3F%20Stage%203%20solution" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F03%2Fcan-you-crack-it-stage-3-solution%2F&amp;title=Can%20you%20crack%20it%3F%20Stage%203%20solution" id="wpa2a_8">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.silly-science.co.uk/2011/12/03/can-you-crack-it-stage-3-solution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Can you crack it? Stage 2 Solution</title>
		<link>http://www.silly-science.co.uk/2011/12/02/can-you-crack-it-stage-2-solution/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=can-you-crack-it-stage-2-solution</link>
		<comments>http://www.silly-science.co.uk/2011/12/02/can-you-crack-it-stage-2-solution/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 20:13:17 +0000</pubDate>
		<dc:creator>The Silly Scientist</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Misc.]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[can you crack it]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[GCHQ]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[simulator]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[virtual machine]]></category>

		<guid isPermaLink="false">http://www.silly-science.co.uk/?p=227</guid>
		<description><![CDATA[There has been a lot of news about the "Can you crack it?" challenge that is currently to publicise GCHQ recruiting. Here is my solution for stage 2 - the implementation of the Virtual Machine, or emulator. It's actually pretty straight forward when you get a hold of a few of the nuances. I'll put [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;count=none&amp;text=Can%20you%20crack%20it%3F%20Stage%202%20Solution" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;count=none&amp;text=Can%20you%20crack%20it%3F%20Stage%202%20Solution" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;title=Can%20you%20crack%20it%3F%20Stage%202%20Solution" id="wpa2a_10">Share/Bookmark</a></p><p>There has been a lot of news about the <a title="Can you crack it?" href="http://www.canyoucrackit.com/" target="_blank">"Can you crack it?"</a> challenge that is currently to publicise GCHQ recruiting. Here is my solution for <a title="Can you crack it stage 2 challenge" href="http://www.canyoucrackit.co.uk/15b436de1f9107f3778aad525e5d0b20.js" target="_blank">stage 2</a> - the implementation of the Virtual Machine, or emulator. It's actually pretty straight forward when you get a hold of a few of the nuances. I'll put a list of hints here, and then present the full solution after the fold.</p>
<ol>
<li>As of stage 1 - everything is centred around the x86 architecture, this means that your instructions need to mirror the behaviour of their x86 equivalents</li>
<li>Firmware seems to be irrelevant - don't worry about it.</li>
<li>There is no real trickery here - it's just a straight forward instruction set simulator implementation</li>
<li>The programme will finish on a HALT instruction</li>
</ol>
<p>This is actually quite a neat little program that works by decrypting itself further programme code which it then runs and decrypts the message to get to the next stage... enjoy...</p>
<p><span id="more-227"></span> </p>
<p>My implementation is in C... I don't like javascript - it is tested using GCC on an Intel Mac. It's a rough and ready implementation, so don't judge me too much.</p>
<blockquote>
<pre>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

#define MEM_LEN 768
#define FW_LEN  8

unsigned char mem[] = {
    0x31, 0x04, 0x33, 0xaa, 0x40, 0x02, 0x80, 0x03, 0x52, 0x00, 0x72, 0x01, 0x73, 0x01, 0xb2, 0x50,
    0x30, 0x14, 0xc0, 0x01, 0x80, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

    0x98, 0xab, 0xd9, 0xa1, 0x9f, 0xa7, 0x83, 0x83, 0xf2, 0xb1, 0x34, 0xb6, 0xe4, 0xb7, 0xca, 0xb8,
    0xc9, 0xb8, 0x0e, 0xbd, 0x7d, 0x0f, 0xc0, 0xf1, 0xd9, 0x03, 0xc5, 0x3a, 0xc6, 0xc7, 0xc8, 0xc9,
    0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9,
    0xda, 0xdb, 0xa9, 0xcd, 0xdf, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9,
    0x26, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
    0x7d, 0x1f, 0x15, 0x60, 0x4d, 0x4d, 0x52, 0x7d, 0x0e, 0x27, 0x6d, 0x10, 0x6d, 0x5a, 0x06, 0x56,
    0x47, 0x14, 0x42, 0x0e, 0xb6, 0xb2, 0xb2, 0xe6, 0xeb, 0xb4, 0x83, 0x8e, 0xd7, 0xe5, 0xd4, 0xd9,
    0xc3, 0xf0, 0x80, 0x95, 0xf1, 0x82, 0x82, 0x9a, 0xbd, 0x95, 0xa4, 0x8d, 0x9a, 0x2b, 0x30, 0x69,
    0x4a, 0x69, 0x65, 0x55, 0x1c, 0x7b, 0x69, 0x1c, 0x6e, 0x04, 0x74, 0x35, 0x21, 0x26, 0x2f, 0x60,
    0x03, 0x4e, 0x37, 0x1e, 0x33, 0x54, 0x39, 0xe6, 0xba, 0xb4, 0xa2, 0xad, 0xa4, 0xc5, 0x95, 0xc8,
    0xc1, 0xe4, 0x8a, 0xec, 0xe7, 0x92, 0x8b, 0xe8, 0x81, 0xf0, 0xad, 0x98, 0xa4, 0xd0, 0xc0, 0x8d,
    0xac, 0x22, 0x52, 0x65, 0x7e, 0x27, 0x2b, 0x5a, 0x12, 0x61, 0x0a, 0x01, 0x7a, 0x6b, 0x1d, 0x67,
    0x75, 0x70, 0x6c, 0x1b, 0x11, 0x25, 0x25, 0x70, 0x7f, 0x7e, 0x67, 0x63, 0x30, 0x3c, 0x6d, 0x6a,
    0x01, 0x51, 0x59, 0x5f, 0x56, 0x13, 0x10, 0x43, 0x19, 0x18, 0xe5, 0xe0, 0xbe, 0xbf, 0xbd, 0xe9,
    0xf0, 0xf1, 0xf9, 0xfa, 0xab, 0x8f, 0xc1, 0xdf, 0xcf, 0x8d, 0xf8, 0xe7, 0xe2, 0xe9, 0x93, 0x8e,
    0xec, 0xf5, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

    0x37, 0x7a, 0x07, 0x11, 0x1f, 0x1d, 0x68, 0x25, 0x32, 0x77, 0x1e, 0x62, 0x23, 0x5b, 0x47, 0x55,
    0x53, 0x30, 0x11, 0x42, 0xf6, 0xf1, 0xb1, 0xe6, 0xc3, 0xcc, 0xf8, 0xc5, 0xe4, 0xcc, 0xc0, 0xd3,
    0x85, 0xfd, 0x9a, 0xe3, 0xe6, 0x81, 0xb5, 0xbb, 0xd7, 0xcd, 0x87, 0xa3, 0xd3, 0x6b, 0x36, 0x6f,
    0x6f, 0x66, 0x55, 0x30, 0x16, 0x45, 0x5e, 0x09, 0x74, 0x5c, 0x3f, 0x29, 0x2b, 0x66, 0x3d, 0x0d,
    0x02, 0x30, 0x28, 0x35, 0x15, 0x09, 0x15, 0xdd, 0xec, 0xb8, 0xe2, 0xfb, 0xd8, 0xcb, 0xd8, 0xd1,
    0x8b, 0xd5, 0x82, 0xd9, 0x9a, 0xf1, 0x92, 0xab, 0xe8, 0xa6, 0xd6, 0xd0, 0x8c, 0xaa, 0xd2, 0x94,
    0xcf, 0x45, 0x46, 0x67, 0x20, 0x7d, 0x44, 0x14, 0x6b, 0x45, 0x6d, 0x54, 0x03, 0x17, 0x60, 0x62,
    0x55, 0x5a, 0x4a, 0x66, 0x61, 0x11, 0x57, 0x68, 0x75, 0x05, 0x62, 0x36, 0x7d, 0x02, 0x10, 0x4b,
    0x08, 0x22, 0x42, 0x32, 0xba, 0xe2, 0xb9, 0xe2, 0xd6, 0xb9, 0xff, 0xc3, 0xe9, 0x8a, 0x8f, 0xc1,
    0x8f, 0xe1, 0xb8, 0xa4, 0x96, 0xf1, 0x8f, 0x81, 0xb1, 0x8d, 0x89, 0xcc, 0xd4, 0x78, 0x76, 0x61,
    0x72, 0x3e, 0x37, 0x23, 0x56, 0x73, 0x71, 0x79, 0x63, 0x7c, 0x08, 0x11, 0x20, 0x69, 0x7a, 0x14,
    0x68, 0x05, 0x21, 0x1e, 0x32, 0x27, 0x59, 0xb7, 0xcf, 0xab, 0xdd, 0xd5, 0xcc, 0x97, 0x93, 0xf2,
    0xe7, 0xc0, 0xeb, 0xff, 0xe9, 0xa3, 0xbf, 0xa1, 0xab, 0x8b, 0xbb, 0x9e, 0x9e, 0x8c, 0xa0, 0xc1,
    0x9b, 0x5a, 0x2f, 0x2f, 0x4e, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

unsigned char firmware[] = {
    0xd2, 0xab, 0x1f, 0x05, 0xda, 0x13, 0xf1, 0x10
};

typedef struct S_CPU_STATE
{

    unsigned int ip;

    unsigned int r[4];

    unsigned int cs;
    unsigned int ds;

    unsigned int fl;
} s_cpu_state;

int stop_cpu = 0;

void dump_cpu( s_cpu_state cpu )
{
    int i;

    printf("ip        =&gt; %d\n", cpu.ip);
    for (i = 0; i &lt; 4; i++)
    {
        printf("r%d       =&gt; %d\n", i, cpu.r[i]);
    }
    printf("cs        =&gt; %d\n", cpu.cs);
    printf("ds        =&gt; %d\n", cpu.ds);
    printf("fl        =&gt; %d\n\n", cpu.fl);

    for (i = 0; i &lt; MEM_LEN; i++ )
    {
        if (i % 16 == 0)
            printf("\n");

        printf("0x%02x, ", mem[i]);
    }

    for (i = 0; i &lt; MEM_LEN; i++ )
    {
        if (i % 16 == 0)
            printf("\n");

        printf("%c", mem[i]);
    }

    return;
}

int read_reg( unsigned int *v, s_cpu_state *cpu, unsigned int ix )
{
    if (ix &lt; 4)
    {
        *v = cpu-&gt;r[ix];
        return 0;
    }
    else if (ix == 4)
    {
        *v = cpu-&gt;cs;
        return 0;
    }
    else if (ix == 5)
    {
        *v = cpu-&gt;ds;
        return 0;
    }
    else
        return 1;
}

int write_reg(s_cpu_state *cpu, unsigned int ix, unsigned int v )
{
    if (ix &lt; 4)
    {
        cpu-&gt;r[ix] = v;
        return 0;
    }
    else if (ix == 4)
    {
        cpu-&gt;cs = v;
        return 0;
    }
    else if (ix == 5)
    {
        cpu-&gt;ds = v;
        return 0;
    }
    else
        return 1;
}

void siginthandler(int param)
{
    stop_cpu = 1;
}

unsigned int decode_instruction( unsigned char instr[2], s_cpu_state *cpu )
{
    unsigned char opcode = (0xE0 &amp; instr[0]) &gt;&gt; 5;
    unsigned char mod = (0x10 &amp; instr[0]) &gt;&gt; 4;
    unsigned int op1 = 0xF &amp; instr[0];
    unsigned int op2 = 0xFF &amp; instr[1];
    unsigned int ip_inc = 0;
    unsigned int v1, v2, tmp, addr;

    printf("ibuf = 0x%02x %02x =&gt; ",instr[0], instr[1]);

    /* mod 0 instructions */
    if (mod == 0)
    {
        switch (opcode)
        {
        case 0x0:
            /* jmp r1 */
            printf("jmp r[%d]\n",op1);

            if (read_reg(&amp;v1, cpu, op1))
                return 1;

            cpu-&gt;ip = (cpu-&gt;cs*16) + v1;

            printf("\tjump to %d\n", cpu-&gt;ip);

            ip_inc = 0; // 0 increment as we modify IP
            break;
        case 0x1:
            /* movr r1,r2 */
            printf("movr r[%d],r[%d]\n", op1, op2);

            if (read_reg(&amp;v2, cpu, op2))
                return 1;
            if (write_reg(cpu, op1, v2))
                return 1;
            printf("\twrote %x to r[%d]\n", v2, op1);

            ip_inc = 2;
            break;
        case 0x2:
            /* movm r1, [ds:r2] */
            printf("movm r[%d], [ds:r[%d]]\n", op1, op2 );

            if (read_reg(&amp;v2, cpu, op2))
                return 1;

            addr = (cpu-&gt;ds * 16) + v2;
            while (addr &gt; MEM_LEN)
            {
                printf("\toutside of memory\n");
                return 1;
            }
            tmp = mem[addr];

            if (write_reg(cpu, op1, tmp))
                return 1;

            printf("\tfrom addr: 0x%x got val: 0x%x\n", addr, tmp);

            ip_inc = 2;
            break;
        case 0x3:
            /* add r1,r2 */
            printf("add r[%d], r[%d]\n", op1, op2);

            if (read_reg(&amp;v1, cpu, op1))
                return 1;

            if (read_reg(&amp;v2, cpu, op2))
                return 1;

            tmp = v1 + v2;

            if (write_reg(cpu, op1, tmp))
                return 1;

            printf("\t 0x%x + 0x%x = 0x%x \n", v1, v2, tmp);

            ip_inc = 2;
            break;
        case 0x4:
            /* xor r1,r2 */
            printf("xor r[%d], r[%d]\n", op1, op2);

            if (read_reg(&amp;v1, cpu, op1))
                return 1;

            if (read_reg(&amp;v2, cpu, op2))
                return 1;

            tmp = v1 ^ v2;

            if (write_reg(cpu, op1, tmp))
                return 1;

            printf("\t 0x%x ^ 0x%x = 0x%x \n", v1, v2, tmp);
            ip_inc = 2;
            break;
        case 0x5:
            /* cmp r1, r2 */
            printf("cmp r[%d], r[%d]\n", op1, op2);
            if (read_reg(&amp;v1, cpu, op1))
                return 1;

            if (read_reg(&amp;v2, cpu, op2))
                return 1;

            if (v1 == v2)
                cpu-&gt;fl = 0;
            else if (v1 &lt; v2)
                cpu-&gt;fl = 0xff;
            else if (v1 &gt; v2)
                cpu-&gt;fl = 0x1;

            printf("\tv1 = %d, v2 = %d, fl is now 0x%x\n", v1, v2, cpu-&gt;fl);

            ip_inc = 2;
            break;
        case 0x6:
            /* jmpe r1 */
            printf("jmpe r[%d]\n", op1);
            if (cpu-&gt;fl == 0)
            {
                if (read_reg(&amp;v1, cpu, op1))
                    return 1;

                cpu-&gt;ip = (cpu-&gt;cs*16) + v1;
                printf("\tjump to %d\n", cpu-&gt;ip);

                ip_inc = 0; // jump, no increment
            }
            else
            {
                printf("\tNOP\n");
                ip_inc = 1; // jump, nop
            }

            break;
        case 0x7:
            /* halt */
            printf("halt\n");
            return 1;
        default:
            return 1;
        }
    }
    else if (mod == 1)
    {
        switch (opcode)
        {
        case 0x0:
            /* jmp r2:r1 */
            printf("jmp %d:r[%d]\n", op2, op1);

            if (read_reg(&amp;v1, cpu, op1))
                return 1;

            tmp = (op2*16) + v1;

            cpu-&gt;cs = op2;
            cpu-&gt;ip = tmp;

            printf("\tjump to %d\n", cpu-&gt;ip);

            ip_inc = 0;
            break;
        case 0x1:
            /* movr rx, imm */
            printf("movr r[%d], 0x%x\n", op1, op2);

            if (write_reg(cpu, op1, op2))
                return 1;

            printf("\twrote 0x%x to r[%d]\n", op2, op1);

            ip_inc = 2;
            break;
        case 0x2:
            /* movm [ds:rs], r2 */
            printf("movm [ds:r[%d]], r[%d]\n", op1, op2);

            if (read_reg(&amp;v1, cpu, op1))
                return 1;
            if (read_reg(&amp;v2, cpu, op2))
                return 1;

            addr = (cpu-&gt;ds * 16) + v1;

            while (addr &gt; MEM_LEN)
            {
                printf("\toutside of memory\n");
                return 1;
            }

            mem[addr] = v2;

            printf("\twrote 0x%x to mem[%d]\n", v2, addr);

            ip_inc = 2;
            break;
        case 0x3:
            /* add r1, imm */
            printf("add r[%d], 0x%x\n", op1, op2);

            if (read_reg(&amp;v1, cpu, op1))
                return 1;

            tmp = v1 + op2;

            if (write_reg(cpu, op1, tmp))
                return 1;

            printf("\t 0x%x + 0x%x = 0x%x \n", v1, op2, tmp);

            ip_inc = 2;
            break;
        case 0x4:
            /* xor r1, imm */
            printf("xor r[%d], 0x%x\n", op1, op2);

            if (read_reg(&amp;v1, cpu, op1))
                return 1;

            tmp = v1 ^ op2;

            if (write_reg(cpu, op1, tmp))
                return 1;

            printf("\t 0x%x ^ 0x%x = 0x%x \n", v1, op2, tmp);

            ip_inc = 2;
            break;
        case 0x5:
            /* cmp r1, imm */
            printf("cmp r[%d], 0x%x\n",op1, op2);

            if (read_reg(&amp;v1, cpu, op1))
                return 1;

            if (v1 == op2)
                cpu-&gt;fl = 0;
            else if (v1 &lt; op2)
                cpu-&gt;fl = 0xff;
            else if (v1 &gt; op2)
                cpu-&gt;fl = 0x1;

            printf("\tv1 = %d, op2 = %d, fl is now 0x%x\n", v1, op2, cpu-&gt;fl);

            ip_inc = 2;
            break;
        case 0x6:
            /* jmpe r2:r1 */
            printf("jmpe 0x%x:r[%d]\n",op2, op1);
            if (cpu-&gt;fl == 0)
            {
                if (read_reg(&amp;v1, cpu, op1))
                    return 1;

                cpu-&gt;cs = op2;
                cpu-&gt;ip = (op2 * 16) + v1;
                printf("\tjump to %d\n", cpu-&gt;ip);

                ip_inc = 0; // jump, no increment
            }
            else
            {
                printf("\tNOP\n");
                ip_inc = 2; // jump, nop
            }
            break;
        case 0x7:
            /* halt */
            printf("halt\n");
            return 1;
        default:
            return 1;
        }
    } else return 1;

    cpu-&gt;ip += ip_inc;
    return 0;
}

int main (void)
{
    unsigned char instr_buf[2] = {0,0};
    int i;

    s_cpu_state cpu;

    /* initialise CPU state */
    cpu.ip = 0x0;

    cpu.r[0] = 0x00;
    cpu.r[1] = 0x00;
    cpu.r[2] = 0x00;
    cpu.r[3] = 0x00;

    cpu.cs = 0;
    cpu.ds = 0x10;

    cpu.fl = 0;

    signal(SIGINT, siginthandler);

    while (cpu.ip+1 &lt; MEM_LEN  &amp;&amp; stop_cpu == 0)
    {
        instr_buf[0] = mem[cpu.ip];
        instr_buf[1] = mem[cpu.ip+1];

        printf("@ 0x%x -&gt; ", cpu.ip);
        if (decode_instruction( instr_buf, &amp;cpu ))
        {
            printf("error! Dumping...\n");
            dump_cpu( cpu );

            exit(1);
        }
        printf("\n");

    }

    if (stop_cpu)
    {
        printf("Interrupted... dumping - \n");
        dump_cpu(cpu);
        exit(0);
    }

    printf("left the bounds of memory!!\n");
    exit(0);

    return 0;
}</pre>
</blockquote>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;count=none&amp;text=Can%20you%20crack%20it%3F%20Stage%202%20Solution" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;count=none&amp;text=Can%20you%20crack%20it%3F%20Stage%202%20Solution" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F12%2F02%2Fcan-you-crack-it-stage-2-solution%2F&amp;title=Can%20you%20crack%20it%3F%20Stage%202%20Solution" id="wpa2a_12">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.silly-science.co.uk/2011/12/02/can-you-crack-it-stage-2-solution/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Humorous Scam E-Mails</title>
		<link>http://www.silly-science.co.uk/2011/08/17/humorous-scam-e-mails/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=humorous-scam-e-mails</link>
		<comments>http://www.silly-science.co.uk/2011/08/17/humorous-scam-e-mails/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 16:32:00 +0000</pubDate>
		<dc:creator>The Silly Scientist</dc:creator>
				<category><![CDATA[Misc.]]></category>
		<category><![CDATA[419]]></category>
		<category><![CDATA[advanced fee fraud]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[scam]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.silly-science.co.uk/?p=208</guid>
		<description><![CDATA[I usually totally ignore these 419 emails, they drop right into my Spam box - but this one was really quite funny, and oddly came from HK/China (they usually appear from Africa!). Anyway, I was massively excited by a whole $17.3 - wow! And he has done the underground works - totally legal - awesome! [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;count=none&amp;text=Humorous%20Scam%20E-Mails" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;count=none&amp;text=Humorous%20Scam%20E-Mails" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;title=Humorous%20Scam%20E-Mails" id="wpa2a_14">Share/Bookmark</a></p><p>I usually totally ignore these 419 emails, they drop right into my Spam box - but this one was really quite funny, and oddly came from HK/China (they usually appear from Africa!).</p>
<p>Anyway, I was massively excited by a whole $17.3 - wow! And he has done the underground works - totally legal - awesome!</p>
<p>&nbsp;</p>
<blockquote><p>Attn:</p>
<p>&nbsp;</p>
<p>I am contacting you as the senior manager in a bank in China and financial advisor and account officer to a private investor about fund deposit totaling $17.3. I assure that the transaction is 100% risk free and legal having done all the underground works.</p>
<p>&nbsp;</p>
<p>As soon as I receive a response for your interest, I will send you the complete details of the successful completion of this transaction. Please contact on my private email below for further clarification.</p>
<p>Best regards,</p>
<p>&nbsp;</p>
<p>Jan Yiun</p></blockquote>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;count=none&amp;text=Humorous%20Scam%20E-Mails" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;count=none&amp;text=Humorous%20Scam%20E-Mails" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F08%2F17%2Fhumorous-scam-e-mails%2F&amp;title=Humorous%20Scam%20E-Mails" id="wpa2a_16">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.silly-science.co.uk/2011/08/17/humorous-scam-e-mails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a PDF of images (PNG, JPG, GIF etc) on Mac OS X with Preview</title>
		<link>http://www.silly-science.co.uk/2011/07/28/create-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x</link>
		<comments>http://www.silly-science.co.uk/2011/07/28/create-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 17:28:58 +0000</pubDate>
		<dc:creator>The Silly Scientist</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bmp2pdf]]></category>
		<category><![CDATA[collate]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[gif2pdf]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[jpg]]></category>
		<category><![CDATA[jpg2pdf]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[png2pdf]]></category>
		<category><![CDATA[preview]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.silly-science.co.uk/?p=165</guid>
		<description><![CDATA[I recently wanted to compile several images into a single PDF document - after searching for a relevant tool and discounting Word or iWork as too time consuming I hit upon the following very simple solution... Open one of the images you want to put into your document in Preview Now open the 'Sidebar' (if [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;count=none&amp;text=Create%20a%20PDF%20of%20images%20%28PNG%2C%20JPG%2C%20GIF%20etc%29%20on%20Mac%20OS%20X%20with%20Preview" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;count=none&amp;text=Create%20a%20PDF%20of%20images%20%28PNG%2C%20JPG%2C%20GIF%20etc%29%20on%20Mac%20OS%20X%20with%20Preview" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;title=Create%20a%20PDF%20of%20images%20%28PNG%2C%20JPG%2C%20GIF%20etc%29%20on%20Mac%20OS%20X%20with%20Preview" id="wpa2a_18">Share/Bookmark</a></p><p><img class="size-thumbnail wp-image-199 alignright" title="PDF Document" src="http://www.silly-science.co.uk/wp-content/uploads/2011/07/pdf_icon-150x150.png" alt="PDF document icon" width="90" height="90" /></p>
<p>I recently wanted to compile several images into a single PDF document - after searching for a relevant tool and discounting Word or iWork as too time consuming I hit upon the following very simple solution...</p>
<ol>
<li>Open one of the images you want to put into your document in Preview</li>
<li>Now open the 'Sidebar' (if it isn't already open)</li>
<li>Drag the rest of the images into sidebar in the order you wish them to appear in your PDF document</li>
<li>Select all the images in the sidebar (Cmd+A)</li>
<li>Do 'File -&gt; Print' and click the 'Save as PDF'</li>
<li>Follow the prompts to save the file and you should now have a PDF containing all your images!</li>
</ol>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;count=none&amp;text=Create%20a%20PDF%20of%20images%20%28PNG%2C%20JPG%2C%20GIF%20etc%29%20on%20Mac%20OS%20X%20with%20Preview" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;count=none&amp;text=Create%20a%20PDF%20of%20images%20%28PNG%2C%20JPG%2C%20GIF%20etc%29%20on%20Mac%20OS%20X%20with%20Preview" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2011%2F07%2F28%2Fcreate-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x%2F&amp;title=Create%20a%20PDF%20of%20images%20%28PNG%2C%20JPG%2C%20GIF%20etc%29%20on%20Mac%20OS%20X%20with%20Preview" id="wpa2a_20">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.silly-science.co.uk/2011/07/28/create-a-pdf-of-images-png-jpg-gif-etc-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing gitorious on Ubuntu 10.04 HOWTO</title>
		<link>http://www.silly-science.co.uk/2010/12/12/installing-gitorious-on-ubuntu-10-04-howto/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=installing-gitorious-on-ubuntu-10-04-howto</link>
		<comments>http://www.silly-science.co.uk/2010/12/12/installing-gitorious-on-ubuntu-10-04-howto/#comments</comments>
		<pubDate>Sun, 12 Dec 2010 12:52:34 +0000</pubDate>
		<dc:creator>The Silly Scientist</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[gitorious]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://www.silly-science.co.uk/?p=166</guid>
		<description><![CDATA[I like using Git for my projects and I tend to host them outside of the computer I work on. I was finding the current way I was managing projects a bit cubersome so I decided to install Gitorious which gives you a nice web interface to manage it all! Here are some instructions on [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;count=none&amp;text=Installing%20gitorious%20on%20Ubuntu%2010.04%20HOWTO" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;count=none&amp;text=Installing%20gitorious%20on%20Ubuntu%2010.04%20HOWTO" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;title=Installing%20gitorious%20on%20Ubuntu%2010.04%20HOWTO" id="wpa2a_22">Share/Bookmark</a></p><p>I like using Git for my projects and I tend to host them outside of the computer I work on. I was finding the current way I was managing projects a bit cubersome so I decided to install Gitorious which gives you a nice web interface to manage it all!</p>
<p>Here are some instructions on installing <a title="Gitorious homepage" href="http://www.gitorious.org" target="_blank">Gitorious</a> on your own Ubuntu 10.04 LTS server. The instructions from gitorious were a little out of date/confusing so I thought I would show you what I did to get it working successfully. It is based upon instructions from both <a title="Gitorious Ubuntu install instructions" href="http://www.gitorious.org/gitorious/pages/UbuntuInstallation" target="_blank">gitorious' own instructions</a> and some <a title="alternative gitorious instructions" href="http://cjohansen.no/en/ruby/setting_up_gitorious_on_your_own_server" target="_blank">others they link to</a>, plus some other digging/googling around <a title="Gitorious on CentOS" href="http://www.tikalk.com/alm/blog/installing-gitorious-centos-55" target="_blank">[1]</a>, <a title="Broken login" href="http://groups.google.com/group/gitorious/browse_thread/thread/3f07e651c3e77199" target="_blank">[2]</a> and <a title="Ubuntu recipe" href="http://gitorious.org/gitorious/mainline/blobs/master/doc/recipes/install-ubuntu.txt" target="_blank">[3]</a>.</p>
<p><strong>Updated:</strong> Added some fixes/clarifications from the comments below! (If you spot any errors do please tell me!)</p>
<p><strong>A few notes on this tutorial: </strong><em>Firstly - </em>This tutorial is approaching it's first birthday which means (as with all things like this) it is getting somewhat outdated. With that in mind - approach with trepidation. I would read up on the relevant documentation from the developers yourself and make up your mind how helpful / relevant to you this whole process is.</p>
<p><em>Secondly</em> - I have now moved to indefero (see <a href="http://www.indefero.net/open-source/">http://www.indefero.net/open-source/</a>) this is a lot easier to install and manage - offers all of the functionality that I have needed - which more than makes up for the lack of prettiness that gitorious had...</p>
<p><span id="more-166"></span></p>
<p>This is all done as root unless otherwise specified (a root prompt is indicated with a <code>#</code> and a normal user prompt is indicated with a <code>$</code>).</p>
<ol>
<ol>
<li>Install some packages using Apt:<br />
<code># apt-get update</code><br />
<code># apt-get install build-essential zlib1g-dev tcl-dev libexpat-dev libcurl4-openssl-dev postfix apache2 mysql-server mysql-client apg geoip-bin libgeoip1 libgeoip-dev sqlite3 libsqlite3-dev imagemagick libpcre3 libpcre3-dev zlib1g zlib1g-dev libyaml-dev libmysqlclient15-dev apache2-dev libonig-dev phpmyadmin libmagick++-dev zip unzip memcached git-core git-svn git-doc git-cvs irb sphinxsearch</code></li>
<li>Setup ActiveMQ:<br />
<code># apt-get install uuid uuid-dev openjdk-6-jre</code><br />
<code># wget http://www.powertech.no/apache/dist/activemq/apache-activemq/5.2.0/apache-activemq-5.2.0-bin.tar.gz</code><br />
<code># tar xzvf apache-activemq-5.2.0-bin.tar.gz -C /usr/local/</code><br />
<code># echo "export ACTIVEMQ_HOME=/usr/local/apache-activemq-5.2.0" &gt;&gt; /etc/activemq.conf</code><br />
<code># echo "export JAVA_HOME=/usr/" &gt;&gt; /etc/activemq.conf</code><br />
<code># adduser --system --no-create-home activemq</code><br />
<code># chown -R activemq /usr/local/apache-activemq-5.2.0/data</code></li>
<li>Now to turn off the default multicasting activemq does, or other brokers on the same network will receive your queue items. Edit the networkConnectors setting in /usr/local/apache-activemq-5.2.0/conf/activemq.xml to something like this:<br />
<code>&lt;networkConnectors&gt;<br />
&lt;!-- by default just auto discover the other brokers --&gt;<br />
&lt;!-- Example of a static configuration: --&gt;<br />
&lt;networkConnector name="localhost" uri="static://(tcp://127.0.0.1:61616)"/&gt;<br />
&lt;/networkConnectors&gt;</code></li>
<li>Now setup the startup script for ActiveMQ<br />
<code># cd /tmp</code><br />
<code># wget http://launchpadlibrarian.net/15645459/activemq</code><br />
<code># mv activemq /etc/init.d/activemq</code><br />
<code># chmod +x /etc/init.d/activemq</code><br />
<code># update-rc.d activemq defaults</code><br />
<code># service activemq start</code></li>
<li>Download <a title="Ruby Enterprise Edition download page" href="http://www.rubyenterpriseedition.com/download.html" target="_blank">Ruby Enterprise Edition</a> and install:<br />
<code># dpkg -i ruby-enterprise_1.8.7-2010.02_amd64_ubuntu10.04.deb</code></li>
<li>Now get the latest version of the <a title="RubyGems" href="http://rubyforge.org/frs/?group_id=126" target="_blank">RubyGems</a> software (download into a temporary directory):<br />
<code># cd /tmp</code><br />
<code># wget &lt;ruby gems&gt;</code><br />
<code># tar xzvf rubygems-1.3.7.tgz</code><br />
<code># cd rubygems-1.3.7</code><br />
<code># ruby setup.rb </code><br />
<code># ln -s /usr/bin/gem1.8 /usr/bin/gem</code></li>
<li>Now time to install the required gems:<br />
<code># gem install -b --no-ri --no-rdoc rmagick chronic geoip daemons hoe echoe ruby-yadis ruby-openid mime-types diff-lcs json rack ruby-hmac rake stompserver passenger rails ultrasphinx mysql</code><br />
<code># gem install -b --no-ri --no-rdoc -v 1.0.1 rack</code><br />
<code># gem install -b --no-ri --no-rdoc -v 1.3.1.1 rdiscount</code><br />
<code># gem install -b --no-ri --no-rdoc -v 1.1 stomp</code></li>
<li>Setup links to the correct versions:</li>
</ol>
</ol>
<p><code># ln -s /var/lib/gems/1.8/gems/rake-0.8.7/bin/rake /usr/bin/rake</code><br />
<code># ln -s /var/lib/gems/1.8/gems/stompserver-0.9.9/bin/stompserver /usr/bin/stompserver</code></p>
<ol>
<li>Download the gitorious package:<br />
<code># git clone git://gitorious.org/gitorious/mainline.git /var/www/gitorious</code></li>
<li>Copy the required init.d files:<br />
<code># cp /var/www/gitorious/doc/templates/ubuntu/git-daemon /etc/init.d/</code><br />
<code># cp /var/www/gitorious/doc/templates/ubuntu/git-ultrasphinx /etc/init.d/</code></li>
<li>Change <code>/etc/init.d/git-daemon</code> to have the following line:<br />
<code> GIT_DAEMON="/usr/bin/ruby /var/www/gitorious/script/git-daemon -d" </code></li>
<li>Create the git-poller and stomp initialisation scripts from the <a title="Gitorious tutorial" href="http://www.gitorious.org/gitorious/pages/UbuntuInstallation" target="_blank">gitorious tutorial</a></li>
<li>Set the correct permissions and activate the initialisation files:<br />
<code># chmod 755 /etc/init.d/git-ultrasphinx /etc/init.d/git-daemon /etc/init.d/stomp /etc/init.d/git-poller</code><br />
<code># update-rc.d stomp defaults</code><br />
<code># update-rc.d git-daemon defaults</code><br />
<code># update-rc.d git-ultrasphinx defaults</code><br />
<code># update-rc.d git-poller defaults</code></li>
<li>Run apache setup script and follow the instructions:<br />
<code># /usr/local/bin/passenger-install-apache2-module</code></li>
<li>Create <code>/etc/apache2/mods-available/passenger.load</code> with the following contents:<br />
<code>LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.14/ext/apache2/mod_passenger.so<br />
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.14<br />
PassengerRuby /usr/local/bin/ruby</code></li>
<li>Enable apache2 modules and default ssl site:<br />
<code># a2enmod passenger</code><br />
<code># a2enmod rewrite</code><br />
<code># a2enmod ssl</code><br />
<code># a2ensite default-ssl</code></li>
<li>Restart apache:<br />
<code># service apache2 restart</code></li>
<li>Add a 'git' user to MySQL with global create privileges. Also give it all privileges on gitorious_production.</li>
<li>Create <code>/etc/apache2/sites-available/gitorious</code> and <code>/etc/apache2/sites-available/gitorious-ssl</code> using the listings on the <a title="Gitorious tutorial" href="http://www.gitorious.org/gitorious/pages/UbuntuInstallation" target="_blank">gitorious tutorial</a> (the SSL is required for login!)</li>
<li>Enable and disable the appropriate sites as follows:<br />
<code># a2dissite default</code><br />
<code># a2dissite default-ssl</code><br />
<code># a2ensite gitorious</code><br />
<code># a2ensite gitorious-ssl</code></li>
<li>Add a user 'git' to the system:<br />
<code># adduser --system --home /var/www/gitorious/ --no-create-home --group --shell /bin/bash git</code></li>
<li>Set permissions on the gitorious tree:<br />
<code># chown -R git:git /var/www/gitorious </code></li>
<li>Now run the following sequence of commands:<br />
<code># su - git</code><br />
<code>$ cd /var/www/gitorious</code><br />
<code>$ mkdir .ssh</code><br />
<code>$ touch .ssh/authorized_keys</code><br />
<code>$ chmod 700 .ssh</code><br />
<code>$ chmod 600 .ssh/authorized_keys</code><br />
<code>$ mkdir tmp/pids</code><br />
<code>$ mkdir repositories</code><br />
<code>$ mkdir tarballs</code><br />
<code>$ cp config/database.sample.yml config/database.yml</code><br />
<code>$ cp config/gitorious.sample.yml config/gitorious.yml</code><br />
<code>$ cp config/broker.yml.example config/broker.yml</code></li>
<li>Edit config/database.yml: Remove every section but production</li>
<li>Edit config/gitorious.yml: Remove every section but production (so at the top tab level only <code>production:</code> should exist)</li>
<li>Set the gitorious.yml lines configurations like so (other entries not listed are to be left as defaults):<br />
<code>cookie_secret: [set to output of apg -m 64]</code><br />
<code>repository_base_path: "/var/www/gitorious/repositories"</code><br />
<code>gitorious_client_port: 80</code><br />
<code>gitorious_client_host: your.gitorious.domain.here</code><br />
<code>gitorious_host: your.gitorious.domain.here</code><br />
<code>archive_cache_dir: "/var/www/gitorious/tarballs"</code><br />
<code>archive_work_dir: "/tmp/tarballs-work"</code><br />
<code>hide_http_clone_urls: true</code><br />
<code>is_gitorious_dot_org: false</code></li>
<li>Run the following (note if you have to drop out to root again because it tells you that you missed some gems then remember to do the export again when you have su'd back into the git user!):<br />
<code>$ export RAILS_ENV=production</code><br />
<code>$ rake db:create</code><br />
<code>$ rake db:migrate</code><br />
<code>$ rake ultrasphinx:bootstrap</code></li>
<li>Add the following line to the crontab:<br />
<code>* * * * * cd /var/www/gitorious &amp;&amp; /usr/bin/rake ultrasphinx:index RAILS_ENV=production</code></li>
<li>Now create an admin user:<br />
<code>$ env RAILS_ENV=production ruby script/create_admin</code></li>
<li>Exit being the 'git' user and restart apache as root<br />
<code># service apache2 restart</code></li>
<li>Now start the <code>git-daemon</code> service:<br />
<code># service git-daemon start</code></li>
<li>Now you may find the login page not working, to fix this do the following (thanks to <a title="Broken login" href="http://groups.google.com/group/gitorious/browse_thread/thread/3f07e651c3e77199" target="_blank">[2]</a>):<br />
<code># gem uninstall i18n</code><br />
<code># gem install i18n -v=0.1</code><br />
<code># service apache2 restart</code></li>
<li>Now create the adminstrator user:<br />
<code>$ env RAILS_ENV=production ruby script/create_admin</code></li>
</ol>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;count=none&amp;text=Installing%20gitorious%20on%20Ubuntu%2010.04%20HOWTO" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;count=none&amp;text=Installing%20gitorious%20on%20Ubuntu%2010.04%20HOWTO" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F12%2Finstalling-gitorious-on-ubuntu-10-04-howto%2F&amp;title=Installing%20gitorious%20on%20Ubuntu%2010.04%20HOWTO" id="wpa2a_24">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.silly-science.co.uk/2010/12/12/installing-gitorious-on-ubuntu-10-04-howto/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>rsync Backup / Dropbox style setup</title>
		<link>http://www.silly-science.co.uk/2010/12/08/rsync-backup-dropbox-style-setup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rsync-backup-dropbox-style-setup</link>
		<comments>http://www.silly-science.co.uk/2010/12/08/rsync-backup-dropbox-style-setup/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 22:39:09 +0000</pubDate>
		<dc:creator>The Silly Scientist</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[lsyncd]]></category>
		<category><![CDATA[nas]]></category>
		<category><![CDATA[netgear]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[stora]]></category>

		<guid isPermaLink="false">http://www.silly-science.co.uk/?p=154</guid>
		<description><![CDATA[Introduction This tutoral/HOWTO is designed to help you setup an rsync back/dropbox style synced folder on the Netgear stora. The aim of this is to have a synced folder that will automatically back up to a remote location. The main reason that I wanted to do this was so that I could have a folder [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;count=none&amp;text=rsync%20Backup%20%2F%20Dropbox%20style%20setup" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;count=none&amp;text=rsync%20Backup%20%2F%20Dropbox%20style%20setup" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;title=rsync%20Backup%20%2F%20Dropbox%20style%20setup" id="wpa2a_26">Share/Bookmark</a></p><p><strong>Introduction</strong><br />
This tutoral/HOWTO is designed to help you setup an rsync back/dropbox style synced folder on the Netgear stora. The aim of this is to have a synced folder that will automatically back up to a remote location. The main reason that I wanted to do this was so that I could have a folder of documents backed up to my VPS and synced to my work machine and laptops.</p>
<p>It is similar in style to the 'dropbox' service. It is largely based on this <a title="fak3r dropbox howto" href="http://fak3r.com/2009/09/14/howto-build-your-own-open-source-dropbox-clone/ " target="_blank">HOWTO</a>. It just covers a number of points for installing on the Stora!<br />
This guide assumes you have a fully working package management system as described here - <a title="Installing a package manager on the stora" href="http://www.openstora.com/wiki/index.php?title=Installing_a_package_manager" target="_blank">Installing a package manager</a> and also assumes that you have SSH fully working.</p>
<div><span id="more-154"></span></div>
<div><strong>SSH Setup</strong></div>
<div>Setup your ssh keys to your remote server by doing the following:</div>
<ol>
<li>Generate your keys (don't enter a password - this enables you to have the syncing done without user intervention!) <code>ssh-keygen -N -f ~/.ssh/id_dsa</code></li>
<li>Copy public key to server so you can login <code>ssh-copy-id -i ~/.ssh/id_dsa.pub user@REMOTE_SERVER</code></li>
<li>Tidy up permissions <code>ssh user@REMOTE_SERVER 'chmod 700 .ssh'</code></li>
<li>Check you can login without a password <code>ssh user@REMOTE_SERVER</code></li>
</ol>
<p><strong>Software Install</strong></p>
<ol>
<li>Now prepare for the <code>lsyncd</code> build by installing the following packages by running the command <code>sudo ipkg install &lt;pkg name&gt;</code>
<ol>
<li>gcc</li>
<li>lua</li>
<li>make</li>
<li>pkgconfig</li>
<li>rsync</li>
</ol>
</li>
<li>Download and untar lsyncd from the <a title="http://code.google.com/p/lsyncd/" rel="nofollow" href="http://code.google.com/p/lsyncd/">lsyncd project</a></li>
<li>Configure the build by running <code>./configure --prefix=/opt/local --exec-prefix=/opt</code> (this assumes your addition software is on /opt, otherwise tailor to your needs, but avoid the onboard flash!)</li>
<li>Modify the <code>Makefile</code> to set the following:
<ol>
<li><code>LDFLAGS = -ldl</code></li>
</ol>
</li>
<li>Assuming you got no errors from the configure do <code>make all</code></li>
<li>Now do <code>sudo -E make install</code> (the -E just utilises the same environment settings of the current user as when doing sudo PATH seems to disappear and it won't be able to find the commands!)</li>
<li>Now run <code>sudo ln -s /opt/lib/liblua.so /usr/lib/liblua.so</code> so that <code>lsyncd</code> can locate the library</li>
<li>Now run <code>lsyncd -help</code> to see if all is well (you should get a list of options)!</li>
</ol>
<p><strong>Configuration</strong></p>
<p>(Please refer to the <a title="http://code.google.com/p/lsyncd/wiki/Lsyncd20Manual#The_Configuration_File" rel="nofollow" href="http://code.google.com/p/lsyncd/wiki/Lsyncd20Manual#The_Configuration_File">lsync manual</a> for comprehensive guidance)</p>
<ol>
<li>Copy <code>example/lrsyncssh.lua</code> to a location of your choice (I created <code>$HOME/sync_config</code>)</li>
<li>Fill out the configuration file sync_conf.lua with the appropriate details (the file can be put anywhere):</li>
</ol>
<p><code>sync{default.rsyncssh, source="/path/to/src", host="user@REMOTE_SERVER", targetdir="/path/to/dst", rsyncOps=""}</code></p>
<ol>
<li>Run <code>lsyncd</code> in no daemon mode to check for errors:</li>
</ol>
<p><code>lsyncd -nodaemon sync_conf.lua</code></p>
<ol>
<li>Drop some files in the watched directory and make sure they get uploaded properly with no errors</li>
<li>Run <code>lsyncd</code> in daemon mode to have it watch the folder:</li>
</ol>
<p><code>lsyncd sync_conf.lua</code></p>
<p><strong>Reverse Sync</strong></p>
<p><strong> </strong>Adding the following crontab line is particularly useful if you want to have your laptop or other machines sync up, or at least have the Stora pull from the remote server.</p>
<p><code>* * * * * rsync -ltur user@REMOTE_SERVER:/path/to/src/ /path/to/dst &gt;&gt; /path/to/log/dir/rsync_pull.log</code></p>
<p><strong>Final Comments</strong></p>
<p>This setup can be replicated on your laptop and work machines to create the full dropbox like experience.</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;count=none&amp;text=rsync%20Backup%20%2F%20Dropbox%20style%20setup" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;count=none&amp;text=rsync%20Backup%20%2F%20Dropbox%20style%20setup" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F12%2F08%2Frsync-backup-dropbox-style-setup%2F&amp;title=rsync%20Backup%20%2F%20Dropbox%20style%20setup" id="wpa2a_28">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.silly-science.co.uk/2010/12/08/rsync-backup-dropbox-style-setup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Useful Server Setup Tutorials</title>
		<link>http://www.silly-science.co.uk/2010/09/25/useful-server-setup-tutorials/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=useful-server-setup-tutorials</link>
		<comments>http://www.silly-science.co.uk/2010/09/25/useful-server-setup-tutorials/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 17:49:58 +0000</pubDate>
		<dc:creator>The Silly Scientist</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://www.silly-science.co.uk/?p=121</guid>
		<description><![CDATA[So I decided to take a leap and move VPS providers. Moving servers turns out to be hard work. Here is a list of useful stuff that I had to dig out again when setting up the new one - Spamassasin Setup Gitosis setup Some lighttpd alias setup info - leading to a whole host [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;count=none&amp;text=Useful%20Server%20Setup%20Tutorials" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;count=none&amp;text=Useful%20Server%20Setup%20Tutorials" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;title=Useful%20Server%20Setup%20Tutorials" id="wpa2a_30">Share/Bookmark</a></p><p>So I decided to take a leap and move VPS providers. Moving servers turns out to be hard work. Here is a list of useful stuff that I had to dig out again when setting up the new one -</p>
<ul>
<li><a title="Spamassasin setup" href="http://townx.org/blog/elliot/simple_spamassassin_setup_with_postfix_and_dovecot_on_ubuntu_breezy" target="_blank">Spamassasin Setup</a></li>
<li><a title="Gitosis setup" href="http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way" target="_blank">Gitosis setup</a></li>
<li>Some <a title="Lighttpd alias setup" href="http://www.cyberciti.biz/tips/configure-lighttpd-alias-mod_alias.html" target="_blank">lighttpd alias setup info</a> - leading to a whole host of other server admin tutorials</li>
</ul>
<p>As I find more of these I will update them as and when...</p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;count=none&amp;text=Useful%20Server%20Setup%20Tutorials" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;count=none&amp;text=Useful%20Server%20Setup%20Tutorials" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F09%2F25%2Fuseful-server-setup-tutorials%2F&amp;title=Useful%20Server%20Setup%20Tutorials" id="wpa2a_32">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.silly-science.co.uk/2010/09/25/useful-server-setup-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netgear Stora and Time Machine Setup</title>
		<link>http://www.silly-science.co.uk/2010/07/17/netgear-stora-and-time-machine-setup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=netgear-stora-and-time-machine-setup</link>
		<comments>http://www.silly-science.co.uk/2010/07/17/netgear-stora-and-time-machine-setup/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 14:08:42 +0000</pubDate>
		<dc:creator>The Silly Scientist</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[nas]]></category>
		<category><![CDATA[stora]]></category>
		<category><![CDATA[time machine]]></category>

		<guid isPermaLink="false">http://www.silly-science.co.uk/?p=104</guid>
		<description><![CDATA[Having just got a Netgear Stora I wanted to use it as my time machine backup (I have an old ibook G4 and 10.5 so some of this may or may not work for 10.6 - i haven't tried it!). It turns out this isn't a simple operation (despite ease of use supposedly being a [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;count=none&amp;text=Netgear%20Stora%20and%20Time%20Machine%20Setup" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;count=none&amp;text=Netgear%20Stora%20and%20Time%20Machine%20Setup" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;title=Netgear%20Stora%20and%20Time%20Machine%20Setup" id="wpa2a_34">Share/Bookmark</a></p><p><a href="http://www.silly-science.co.uk/2010/07/17/netgear-stora-and-time-machine-setup/"><img class="alignleft size-thumbnail wp-image-115" title="Netgear Stora" src="http://www.silly-science.co.uk/wp-content/uploads/2010/07/netgear-stora-150x150.jpg" alt="Netgear Stora NAS box" width="150" height="150" /></a>Having just got a Netgear Stora I wanted to use it as my time machine backup (I have an old ibook G4 and 10.5 so some of this may or may not work for 10.6 - i haven't tried it!). It turns out this isn't a simple operation (despite ease of use supposedly being a big selling feature of the Stora...). Here are the steps I eventually worked my way through to get this working:<br />
<span id="more-104"></span><br />
<br/></p>
<ol>
<li>Enable unsupported time machine devices. In the Mac terminal type:<br />
<code>defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1</code></li>
<li>Enable "Computer Backups" on the Stora through the web interface - this is an option in preferences. Select a password and set the changes through "Submit"</li>
<li>Mount the share in finder by going to Finder -&gt; Go -&gt; Connect to Server. Use smb://ComputersBackup@Stora/ComputersBackup</li>
<li>Enter the password (username should be ComputersBackup)</li>
<li>Open up a terminal and create a "sparsebundle" image locally by following the steps below:
<ol>
<li> In a local directory run:<br />
<code>hdiutil create -library SPUD -size $SIZESPEC -fs HFS+ -type SPARSEBUNDLE $MACHINENAME_$MAC_ADDRESS.sparsebundle</code><br />
where <code>$SIZESPEC</code> is the size (in bytes, or suffixed with <code>g</code> or <code>t</code> for Gigabytes and Terabytes - note you can resize it later, but you can't make it bigger than the space on your HD. <code>$MACHINENAME</code> is the 'name' of your machine and <code>$MAC_ADDRESS</code> is the mac address (seen in Network Preferences) in the form <code>aabbccddeeff</code> (i.e. no colons!).</li>
<li>Copy it to your network drive by typing<br />
<code>cp -r $MACHINENAME_$MAC_ADDRESS.sparsebundle /Volumes/ComputersBackup\$/</code><br />
you can now delete the local .sparsebundle file</li>
<li>Resize to the size of backup you want by running the following command on the network mount:<br />
<code>hdiutil resize -size $SIZEg $MACHINENAME_$MAC_ADDRESS.sparsebundle</code><br />
where <code>$SIZE</code> is the size in GB (note the <code>g</code> after the size number</li>
<li>Load up time machine and select the ComputersBackup mount for backup. It should now detect the image and start backing up to it, using only the size of image that you have created (e.g. 200GB, rather than filling the entire drive!)</li>
</ol>
</li>
<li>Pat yourself on the back get a cup of tea which it backs up and wonder why it wasn't easier!</li>
</ol>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;count=none&amp;text=Netgear%20Stora%20and%20Time%20Machine%20Setup" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;count=none&amp;text=Netgear%20Stora%20and%20Time%20Machine%20Setup" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F07%2F17%2Fnetgear-stora-and-time-machine-setup%2F&amp;title=Netgear%20Stora%20and%20Time%20Machine%20Setup" id="wpa2a_36">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.silly-science.co.uk/2010/07/17/netgear-stora-and-time-machine-setup/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Open Workbench Logic Sniffer First Impressions</title>
		<link>http://www.silly-science.co.uk/2010/05/15/open-workbench-logic-sniffer-first-impressions/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=open-workbench-logic-sniffer-first-impressions</link>
		<comments>http://www.silly-science.co.uk/2010/05/15/open-workbench-logic-sniffer-first-impressions/#comments</comments>
		<pubDate>Sat, 15 May 2010 21:56:06 +0000</pubDate>
		<dc:creator>The Silly Scientist</dc:creator>
				<category><![CDATA[Other Peoples Projects]]></category>
		<category><![CDATA[fpga]]></category>
		<category><![CDATA[open source hardware]]></category>
		<category><![CDATA[open workbench logic sniffer]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[spartan]]></category>
		<category><![CDATA[xc-3]]></category>
		<category><![CDATA[xilinx]]></category>
		<category><![CDATA[xmos]]></category>

		<guid isPermaLink="false">http://www.silly-science.co.uk/?p=92</guid>
		<description><![CDATA[A while ago I spotted the Open Workbench Logic Sniffer on Hackaday. A logic sniffer . analyser is a useful tool have around the place and at ~$50 with some flying leads to make it up to the free shipping threshold. Seeing as it arrived the other day I thought I would share my first [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;count=none&amp;text=Open%20Workbench%20Logic%20Sniffer%20First%20Impressions" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;count=none&amp;text=Open%20Workbench%20Logic%20Sniffer%20First%20Impressions" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;title=Open%20Workbench%20Logic%20Sniffer%20First%20Impressions" id="wpa2a_38">Share/Bookmark</a></p><p><a href="http://www.silly-science.co.uk/wp-content/uploads/2010/05/sniffer_LRG.jpg"><img class="alignleft size-medium wp-image-93" title="Open Workbench Logic Sniffer" src="http://www.silly-science.co.uk/wp-content/uploads/2010/05/sniffer_LRG-300x225.jpg" alt="Open Workbench Logic Sniffer Board Photo" width="300" height="225" /></a> A while ago I spotted the Open Workbench Logic Sniffer on Hackaday. A logic sniffer . analyser is a useful tool have around the place and at ~$50 with some flying leads to make it up to the free shipping threshold. Seeing as it arrived the other day I thought I would share my first impressions of it...</p>
<p><span id="more-92"></span></p>
<p><strong>The Board</strong></p>
<p>The system comes shipped as a bare board - so I need to get some self adhesive rubber feet for it really - I will also keep my eye out for a potential case as well.</p>
<p>The main components is a Xilinx Spartan FPGA. The whole thing is based on the <a title="SUMP FPGA Logica Analyzer" href="http://www.sump.org/projects/analyzer/">SUMP FPGA base logic analyser</a> - so no big surprises that this is the main work horse!</p>
<p>It also has a Microchip 18F24 which looks like it is handling the USB interface.</p>
<p>The board also has several non-populated through hole headers which are for PIC ICSP, FPGA JTAG and some kind of expansion pins (as well as a set of four labelled TRG1 CK1 TRG0 and CK0). There is also a populated set of ROM ISP headers and what looks like some UART pin headers.</p>
<p>Alongside all this we have a number of indicator LEDs for ARM, Trigger, Power and USB Activity. Also some buttons for update and reset actions.</p>
<p>At the end of the board we have the analyser bus. This has a GND connection at both ends and 16 signals available for connecting flying leads to. The signals are fed into a <a title="LCX16245 Low voltage bidirectonal buffer" href="http://www.fairchildsemi.com/ds/74/74LCX16245.pdf" target="_blank">LCX16245</a> - which is a low voltage bidirectional buffer (so in theory the FPGA could drive the the signals out if you wanted to re-purpose the board!)</p>
<p>Anyway, for more detailed information on the project see the <a title="Logic Sniffer Gadget Factory page" href="http://www.gadgetfactory.net/gf/project/butterflylogic/" target="_blank">Gadget Factory page</a> - this has the <a title="Open Workbench Logic Sniffer User Guide" href="http://dangerousprototypes.com/2010/02/25/prototype-open-logic-sniffer-logic-analyzer-2/" target="_blank">user guide</a>, schematics, board design and software on it as well as installation videos and a video tutorial on UART analysis (something I will be trying soon!).</p>
<p><strong>Installation</strong></p>
<p>Once I had dug out a USB A to Mini-B cable and downloaded the software I was set to go. I had tried getting it to run on Linux (Ubuntu 10.04), but I gave up after about 20 minutes of fiddling and getting nowhere and decided to revert to good old windows XP - so if anyone has any easy to follow instructions on that one let me know!</p>
<p>After extracting the archives I plugged in the device, at which point windows requests a driver. Find the inf folder from the OpenLogic binaries archive, select that and the correct driver will be installed. This creates a virtual COM port. The number of the COM port can be found in the Device Manager (it is the one with Manufacturer = "Microchip Technology, Inc." and Location = "Location 0 (CDC RS-232 Emulation Demo)").</p>
<p>Once this is installed run the OB_Logic_Sniffer.exe file and you get the client.</p>
<p>Select Device -&gt; Capture and you get the Capture setup menu. This enables you to setup triggers, sampling rate and recording size.</p>
<p><strong>Testing</strong></p>
<p>To test it I grabbed my XMOS XC-3 and connected 8 of the the lines to the GPIO port (XS1_PORT_8C on Core 0). I wrote a simple XC program to simply count up in a sequence continuously in a loop at 25Mhz. Here is the setup I used for testing.</p>
<p><a href="http://www.silly-science.co.uk/wp-content/uploads/2010/05/DSC04907.jpg"><img class="aligncenter size-medium wp-image-96" title="Open Workbench Logic Sniffer Test Setup" src="http://www.silly-science.co.uk/wp-content/uploads/2010/05/DSC04907-300x200.jpg" alt="Open Workbench Logic Sniffer connected to XC-3 GPIO port" width="300" height="200" /></a></p>
<p>After fiddling around wondering why Bank 1 wasn't working, I enabled all the banks and discovered that the signals were on bank 3 (channels 16 -24). I have no idea why this is... but hey ho. It is working and the output is below.</p>
<p style="text-align: center;"><a href="http://www.silly-science.co.uk/wp-content/uploads/2010/05/capture.png"><img class="aligncenter size-large wp-image-94" title="First Logic Sniffer Capture" src="http://www.silly-science.co.uk/wp-content/uploads/2010/05/capture-1024x240.png" alt="First Logic Sniffer Capture Showing Binary Counting Sequence" width="1024" height="240" /></a></p>
<p style="text-align: left;"><strong>Conclusion</strong></p>
<p style="text-align: left;">Overall this has the all the makings of a strong tool. It is very affordable @ $45 shipped (available from <a title="Seeed Studio Open Workbench Logic Sniffer" href="http://www.seeedstudio.com/depot/open-workbench-logic-sniffer-p-612.html?cPath=61_68" target="_blank">Seeed Studio</a>) and 16/32 channels of logic analyser @ 100MSPS is certainly not to be sniffed at.</p>
<p style="text-align: left;">Quality of the software is one of the most important things in a logic analyser as without good analysis software they are a waste of time. The Logic Sniffer doesn't disappoint in this area- It has the capabilities to do simple single trigger or a complex 4 stage triggering and the analyser Java based client is easy and intuitive to use. While basic in the professional logic analyser world they are pretty good for most peoples needs. Extension of the triggering modes would be well worth the development time. Also simple improvements such as the ability to type in Hex values would be nice, rather than having to build a trigger mask with tick boxes.</p>
<p style="text-align: left;">Alongside the triggering features is the systems ability to analyse SPI, I2C and UART signals. Expanding this protocol analysis is something that should be actively worked on, though it has a good base (these features will hopefully be subject to another review at a later date).</p>
<p style="text-align: left;">However, the project in its entirety is currently it is a little rough around the edges. A couple of pointers for simple improvements would be:</p>
<ul>
<li>an integrated installer - especially the windows stuff. It's a small point, but they aren't hard to make and it makes the whole software installation process a lot less painful (rather than downloading two zips and having to extract them!)</li>
<li>a simpler firmware upgrade process ( i.e. more integrated PC side software) - the current one looks fairly daunting (even for someone like me who is a relatively experienced user of embedded hardware).</li>
</ul>
<p style="text-align: left;"><em>Over all, as an open source hacking tool, I would give this project 8/10, a few minor improvements would push it up. Open source hardware like this can be functionally good, but is often let down by the lack of polish in the user experience.</em></p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service google_plusone" src="https://plusone.google.com/u/0/_/%2B1/fastbutton?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;size=medium&amp;count=false" scrolling="no" style="border:none;overflow:hidden;width:32px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;count=none&amp;text=Open%20Workbench%20Logic%20Sniffer%20First%20Impressions" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;counturl=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;count=none&amp;text=Open%20Workbench%20Logic%20Sniffer%20First%20Impressions" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.silly-science.co.uk%2F2010%2F05%2F15%2Fopen-workbench-logic-sniffer-first-impressions%2F&amp;title=Open%20Workbench%20Logic%20Sniffer%20First%20Impressions" id="wpa2a_40">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.silly-science.co.uk/2010/05/15/open-workbench-logic-sniffer-first-impressions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

