<?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>Inspirated &#187; Code</title>
	<atom:link href="http://inspirated.com/tag/code/feed" rel="self" type="application/rss+xml" />
	<link>http://inspirated.com</link>
	<description>krkhan&#039;s blog</description>
	<lastBuildDate>Thu, 05 Apr 2012 16:19:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>slicehosts: Extract host-based traffic out of pcap dumps</title>
		<link>http://inspirated.com/2012/03/18/slicehosts-extract-host-based-traffic-out-of-pcap-dumps</link>
		<comments>http://inspirated.com/2012/03/18/slicehosts-extract-host-based-traffic-out-of-pcap-dumps#comments</comments>
		<pubDate>Sun, 18 Mar 2012 09:56:46 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Botnets]]></category>
		<category><![CDATA[BSG]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[glib]]></category>
		<category><![CDATA[libpcap]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Pcap]]></category>
		<category><![CDATA[slicehosts]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=377</guid>
		<description><![CDATA[During the course of my work on botnet security we have had to deal with mammoth traffic traces captured at a local ISP. While analyzing the traffic we needed to extract traffic for some certain hosts out of large pcap files. An obvious solution would be to run tshark once for each host, filtering the [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>During the course of my work on botnet security we have had to deal with mammoth traffic traces captured at a local ISP. While analyzing the traffic we needed to extract traffic for some certain hosts out of large <code>pcap</code> files. An obvious solution would be to run <code>tshark</code> once for each host, filtering the traffic for that particular IP and writing it to a separate <code>pcap</code> file. However with the number of hosts approaching thousands and the pcap traces approaching terabytes in size <code>tshark</code> didn&#8217;t really fit the bill.</p>
<p>Initially I thought of writing a splitter in Python but my colleague&#8217;s aversion for <a href="http://etheryell.com/technical/playing-with-alot-of-network-traffic/">using Python on large network traces</a> coupled with lack of maintenance of <code>libpcap</code> bindings resulted in me going for C/<code>libpcap</code> directly. The new C-based slicer is available at <a href="https://github.com/krkhan/bsg/tree/master/slicehosts">our GitHub respository</a>. It needs <code>glib</code> to compile though, as I needed a hash table implementation for maintaining the list of hosts that need to be sliced. The <code>Makefile</code> in the repository should take care of compiling with the appropriate flags.</p>
<p>Onto the performance, the speed of slicing is only throttled by <code>libpcap</code>&#8216;s own read/write throughput as most of the remaining work is done in constant time. It took only 71 minutes (or 1.1 hours) to slice 1019 hosts out of a 180 GB pcap file on 2.5 GHz CPU. In simpler words, it&#8217;s <em>lightning</em> fast.</p>
<p>Right now the script does its job well enough. If someone needs to package it I&#8217;ll prefer removing the <code>glib</code> dependency in favor of perhaps <code>glibc</code>&#8216;s own hash table implementation (<code>search.h</code>). In any case, I hope it proves helpful for other people playing with large <code>pcap</code> files.</p>
<div class="shr-publisher-377"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2012/03/18/slicehosts-extract-host-based-traffic-out-of-pcap-dumps">Permalink</a> |
<a href="http://inspirated.com/2012/03/18/slicehosts-extract-host-based-traffic-out-of-pcap-dumps#comments">2 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/botnets" rel="tag">Botnets</a>, <a href="http://inspirated.com/tag/bsg" rel="tag">BSG</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/glib" rel="tag">glib</a>, <a href="http://inspirated.com/tag/libpcap" rel="tag">libpcap</a>, <a href="http://inspirated.com/tag/networking" rel="tag">Networking</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pcap" rel="tag">Pcap</a>, <a href="http://inspirated.com/tag/slicehosts" rel="tag">slicehosts</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2012/03/18/slicehosts-extract-host-based-traffic-out-of-pcap-dumps/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Summing up Google Summer of Code 2011</title>
		<link>http://inspirated.com/2011/10/04/summing-up-gsoc-2011</link>
		<comments>http://inspirated.com/2011/10/04/summing-up-gsoc-2011#comments</comments>
		<pubDate>Tue, 04 Oct 2011 07:32:49 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>
		<category><![CDATA[Vidalia]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=363</guid>
		<description><![CDATA[Due to a number of commitments which I had pinned back during the summer for GSoC I was unable to attend much to the Internet over the past few weeks. Now that I&#8217;m back a summary of this year&#8217;s coding festival is in order: The Program This year I was working with Electronic Frontier Foundation/The [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Due to a number of commitments which I had pinned back during the summer for GSoC I was unable to attend much to the Internet over the past few weeks. Now that I&#8217;m back a summary of this year&#8217;s coding festival is in order:</p>
<h3>The Program</h3>
<p>This year I was working with Electronic Frontier Foundation/<a href="http://www.torproject.org/">The Tor Project</a> for improving the Anonymizing Relay Monitor (arm). The original proposal can be downloaded from <a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">this link</a> are accessed via a browser at <a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>. However, do note that not all of the goals from the proposal were met. Some were modified, some were removed altogether while some new ones were added &#8212; the details of which I&#8217;ll be explaining in the following sections.</p>
<p>Overall the program has been an extraordinarily enjoyable and learning experience for me. My involvement with Ubuntu last year had already taught me how invaluable it is to merge with your mentoring organizing&#8217;s developer community. This year most of my collaboration took place in <code>#tor-dev</code> on OFTC. Many times when I was stuck or heading towards an improper direction with my code the core Tor developers helped me and provided advice for design decisions as well as general guidance about the way things work in Tor. It wasn&#8217;t only a privilege to be helped by such rockstars, but was also vital as I can see in hindsight how disastrous it would have been if I had attempted to work through the program entirely on my own.</p>
<p>A <em>huge</em> thanks goes to my mentor <a href="http://www.atagar.com/">Damian</a>. Most of the credit for making this program an enjoyable and stimulating experience for me goes directly to him. He has one of the best combinations of code-people skills among people I&#8217;ve known. I would&#8217;ve loved meeting him and the Tor community in PETS &#8217;11 but couldn&#8217;t travel due to some paperwork fiasco which was entirely a result of my slothful attitude towards anything involving government offices. Nevertheless, I do hope to meet the guys next year in PETS &#8217;12.</p>
<h3>The Code</h3>
<p>In order to not sound repetitious, I&#8217;ll provide a quick summary of the milestones while linking to the posts which explain them in detail:</p>
<h4>Menus for arm CLI</h4>
<p>My first task was to <a href="http://inspirated.com/2011/06/01/summer-of-code-progress-cursing-with-python">add dropdown menus</a> for the curses interface to arm. Even though the menus were replaced by Damian&#8217;s rewrite, they went a long way in helping me assimilate myself with the arm codebase:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-menus.png"><img src="http://inspirated.com/uploads/arm-menus-thumb.jpg" alt="Drop-down menus for arm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<h4>Graphs and logs for arm GUI</h4>
<p>GTK+ was chosen as the toolkit for developing the arm GUI prototype. While GTK+ has its own disadvantages when compared to Qt (platform portability &#8212; or the lack thereof &#8212; being the foremost), it fared well in light-weight Unix environment such as Live CDs (e.g., <a href="http://tails.boum.org/">Tails</a>). <a href="http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid">Bandwidth graphs and logs</a> for various arm events were added to the prototype:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-bwstats-cli.png"><img src="http://inspirated.com/uploads/arm-bwstats-cli-thumb.jpg" alt="CLI bandwidth stats for arm" /></a></p>
<p style="text-align: center; font-size: x-small"><img src="http://inspirated.com/uploads/down-arrow.jpg" alt="Down arrow" /></p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-bwstats-gui.png"><img src="http://inspirated.com/uploads/arm-bwstats-gui-thumb.jpg" alt="GUI bandwidth stats for arm" /></a><br />
(Click on the thumbnails for larger version.)</p>
<h4>Connections and general stats for arm GUI</h4>
<p><a href="http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1">Moving on with the GUI</a>, next up was to improve its conformity with the rest of the user&#8217;s desktop:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-graphs.png"><img src="http://inspirated.com/uploads/garm-0.1-graphs-thumb.jpg" alt="Graphs panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>And then re-use arm&#8217;s CLI connection resolvers in order to display stats about Tor circuits and control connections:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-conn.png"><img src="http://inspirated.com/uploads/garm-0.1-conn-thumb.jpg" alt="Connections panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>A small addition was migration of the &#8220;sticky&#8221; panel from CLI which was moved under a &#8220;General&#8221; tab and provided miscellaneous info about Tor and arm:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-general.png"><img src="http://inspirated.com/uploads/garm-0.1-general-thumb.jpg" alt="General panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<h4>Configuration panel for GUI</h4>
<p>Another important panel in the arm CLI was its configuration interface which provided a nice and documented approach to altering Tor&#8217;s settings. It was <a href="http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration">migrated to GUI</a> with nice dialogs for validating user input:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-config.png"><img src="http://inspirated.com/uploads/garm-config-thumb.jpg" alt="Configuration panel for garm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Along with the configuration panel a few patches to Tor and Vidalia were developed which would allow arm to be notified of changes made by an external program via a <code>CONF_CHANGED</code> event. The support for <code>CONF_CHANGED</code> still isn&#8217;t solid in all Tor controllers yet which I plan on addressing in coming months.</p>
<h4>Exit node selector for arm CLI &#038; GUI</h4>
<p>A popular feature request among Tor users was to be able to select the country for their exit nodes. While I initially planned on providing them more fine-grained control over their circuits (such as path length), Tor developers advised against it and hence the selection was limited to the exit-node&#8217;s locale:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-exitnode-selector.png"><img src="http://inspirated.com/uploads/garm-exitnode-selector-thumb.jpg" alt="Exit node selector for garm" /></a><br />
<a href="http://inspirated.com/uploads/arm-exitnode-selector.png"><img src="http://inspirated.com/uploads/arm-exitnode-selector-thumb.jpg" alt="Exit node selector for arm" /></a><br />
(Click on the thumbnails for larger version.)</p>
<h3>The Nutshell</h3>
<blockquote><p>&#8220;It goes on forever &#8212; and &#8212; oh my God &#8212; it&#8217;s full of stars!&#8221;</p></blockquote>
<p>It&#8217;s just that awesome, seriously. Stars from the FLOSS strata gather around and help inexperienced and aspiring developers all over the globe for two months in order to bring more code and &#8212; more importantly &#8212; more people to the open-source world. The experience with GSoC not only helps me in general open-source development, but also proves to be <em>priceless</em> at my workplace for my research in software defined networks. If you&#8217;re even remotely interested in open-source do keep an eye on the <a href="http://code.google.com/soc/">program&#8217;s website</a> for future updates.</p>
<div class="shr-publisher-363"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/10/04/summing-up-gsoc-2011">Permalink</a> |
<a href="http://inspirated.com/2011/10/04/summing-up-gsoc-2011#comments">One comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a>, <a href="http://inspirated.com/tag/vidalia" rel="tag">Vidalia</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/10/04/summing-up-gsoc-2011/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Summer of Code Progress: Exit node selection</title>
		<link>http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection</link>
		<comments>http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection#comments</comments>
		<pubDate>Sun, 04 Sep 2011 08:49:02 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=361</guid>
		<description><![CDATA[Summer of Code Archive Inspirated Code Original Proposal Google Docs PDF Repository Tor Project Git Mentor Blog arm Development Log The final weeks of GSoC 2011 were spent by me working on exit node selection for Tor users. The GUI controller can now be used to define a list of countries, after which only those [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><table align="center" summary="Intro" width="75%">
<tr>
<td align="right" class="cell">
Summer of Code Archive
</td>
<td align="left" class="cell">
<a href="http://code.inspirated.com/gsoc/">Inspirated Code</a>
</td>
</tr>
<tr>
<td align="right" class="cell" rowspan="2">
Original Proposal
</td>
<td align="left" class="cell">
<a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>
</td>
</tr>
<tr>
<td align="left" class="cell">
<a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">PDF</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Repository
</td>
<td align="left" class="cell">
<a href="https://gitweb.torproject.org/user/krkhan/arm.git">Tor Project Git</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Mentor Blog
</td>
<td align="left" class="cell">
<a href="http://www.atagar.com/arm/log.php">arm Development Log</a>
</td>
</tr>
</table>
<p>The final weeks of GSoC 2011 were spent by me working on exit node selection for Tor users. The GUI controller can now be used to define a list of countries, after which only those exit nodes shall be used which lie in one of the specified territories:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-exitnode-selector.png"><img src="http://inspirated.com/uploads/garm-exitnode-selector-thumb.jpg" alt="Exit node selector for garm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>For the CLI, Damian decided that the general use case for exit node selection is specification of a <em>single</em> country so pressing &#8216;E&#8217; in the connections panel brings up a list from which one can be chosen:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-exitnode-selector.png"><img src="http://inspirated.com/uploads/arm-exitnode-selector-thumb.jpg" alt="Exit node selector for arm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Please note that the exit node restriction works only for circuits built <em>after</em> the selection. Therefore it might be a good idea to send a <code>NEWNYM</code> to Tor after specifying the countries &#8212; which you&#8217;ll have to do manually for the time being until I add the feature to (g)arm controllers.</p>
<p>In my next post I&#8217;ll cover a summary of my involvement with GSoC this year, that is, after I finish with the regular chores of code submission etc.</p>
<div class="shr-publisher-361"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection">Permalink</a> |
<a href="http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/09/04/summer-of-code-progress-exit-node-selection/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tarball generator for Git commits</title>
		<link>http://inspirated.com/2011/08/23/tarball-generator-for-git-commits</link>
		<comments>http://inspirated.com/2011/08/23/tarball-generator-for-git-commits#comments</comments>
		<pubDate>Mon, 22 Aug 2011 19:56:31 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Summer of Code]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=359</guid>
		<description><![CDATA[While working for GSoC last year I kept track of Bazaar patches I sent in for Arsenal. This year I was using Git and as the need arose to generate a submission tarball for my commits I wrote this small utility script: git-generate-tarball.py. To invoke the script, change into your Git repository and provide an [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>While working for GSoC last year I kept track of Bazaar patches I sent in for Arsenal. This year I was using Git and as the need arose to generate a submission tarball for my commits I wrote this small utility script: <a href="http://inspirated.com/uploads/git-generate-tarball.tar.gz">git-generate-tarball.py</a>.</p>
<p>To invoke the script, change into your Git repository and provide an author name and a file as an argument:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>krkhan<span style="color: #000000; font-weight: bold;">@</span>orthanc tor<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>git-generate-tarball.py <span style="color: #ff0000;">&quot;Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>tor-gsoc-krkhan.tar.gz</pre></div></div>

<blockquote><p>generating tarball for commits between Mon May 23 00:00:00 2011 +0000 and Mon Aug 22 19:00:00 2011 +0000<br />
generating patch for commit 5a801a8c8b71c9551a80913398135809cb10cecd<br />
&#8230;<br />
/home/krkhan/Downloads/tor-gsoc-krkhan.tar.gz created
</p></blockquote>
<p>The default starting and ending dates for the commits correspond to the schedule for GSoC 2011. You can specify a starting date for the commits you want to be packaged using the <code>--since</code> argument:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>krkhan<span style="color: #000000; font-weight: bold;">@</span>orthanc arm<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>git-generate-tarball.py <span style="color: #660033;">--since</span>=<span style="color: #ff0000;">&quot;August 1, 2011&quot;</span> <span style="color: #ff0000;">&quot;Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>arm-gsoc-krkhan.tar.bz2</pre></div></div>

<blockquote><p>generating tarball for commits between August 1, 2011 and Mon Aug 22 19:00:00 2011 +0000<br />
generating patch for commit 546ca73259d7863e3efe5e11e09c023c2790a2f6<br />
&#8230;<br />
/home/krkhan/Downloads/arm-gsoc-krkhan.tar.bz2 created</p></blockquote>
<p>Same goes for the <code>--before</code> argument:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>krkhan<span style="color: #000000; font-weight: bold;">@</span>orthanc tor<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>git-generate-tarball.py <span style="color: #660033;">--before</span>=<span style="color: #ff0000;">&quot;August 14, 2011&quot;</span> <span style="color: #ff0000;">&quot;Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>tor-gsoc-krkhan.tar.gz</pre></div></div>

<blockquote><p>generating tarball for commits between Mon May 23 00:00:00 2011 +0000 and August 14, 2011<br />
generating patch for commit 5a801a8c8b71c9551a80913398135809cb10cecd<br />
&#8230;<br />
/home/krkhan/Downloads/tor-gsoc-krkhan.tar.gz created
</p></blockquote>
<p>Or a combination of both:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>krkhan<span style="color: #000000; font-weight: bold;">@</span>orthanc arm<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>git-generate-tarball.py <span style="color: #660033;">--since</span>=<span style="color: #ff0000;">&quot;August 1, 2011&quot;</span> <span style="color: #660033;">--before</span>=<span style="color: #ff0000;">&quot;August 14, 2011&quot;</span> <span style="color: #ff0000;">&quot;Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>arm-gsoc-krkhan.tar.gz</pre></div></div>

<blockquote><p>generating tarball for commits between August 1, 2011 and August 14, 2011<br />
generating patch for commit 546ca73259d7863e3efe5e11e09c023c2790a2f6<br />
&#8230;<br />
/home/krkhan/Downloads/arm-gsoc-krkhan.tar.gz created
</p></blockquote>
<p>If you want to leave the dates undefined you can leave the arguments empty. For example, the following command shall process <em>all</em> commits before June 1, 2011:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>krkhan<span style="color: #000000; font-weight: bold;">@</span>orthanc arm<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>git-generate-tarball.py <span style="color: #660033;">--since</span>= <span style="color: #660033;">--before</span>=<span style="color: #ff0000;">&quot;June 1, 2011&quot;</span> <span style="color: #ff0000;">&quot;Kamran Riaz Khan &lt;krkhan@inspirated.com&gt;&quot;</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>krkhan<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>arm-gsoc-krkhan.tar.gz</pre></div></div>

<blockquote><p>generating tarball for commits before June 1, 2011<br />
generating patch for commit 8b4dc162f75d5129e41f028c7253b7b265c8af76<br />
&#8230;<br />
/home/krkhan/Downloads/arm-gsoc-krkhan.tar.gz created</p></blockquote>
<p>Hope this helps fellow GSoCers.</p>
<div class="shr-publisher-359"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/08/23/tarball-generator-for-git-commits">Permalink</a> |
<a href="http://inspirated.com/2011/08/23/tarball-generator-for-git-commits#comments">5 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/git" rel="tag">Git</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/08/23/tarball-generator-for-git-commits/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Summer of Code Progress: Tor configuration</title>
		<link>http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration</link>
		<comments>http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration#comments</comments>
		<pubDate>Thu, 11 Aug 2011 23:52:40 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>
		<category><![CDATA[Vidalia]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=358</guid>
		<description><![CDATA[Summer of Code Archive Inspirated Code Original Proposal Google Docs PDF Repository Tor Project Git Mentor Blog arm Development Log &#8220;O Marvelous! what new configuration will come next? I am bewildered with multiplicity.&#8221; &#8212; William Carlos Williams Up until now my GSoC development was dealing with the &#8220;monitoring&#8221; aspects of arm. In addition to being [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><table align="center" summary="Intro" width="75%">
<tr>
<td align="right" class="cell">
Summer of Code Archive
</td>
<td align="left" class="cell">
<a href="http://code.inspirated.com/gsoc/">Inspirated Code</a>
</td>
</tr>
<tr>
<td align="right" class="cell" rowspan="2">
Original Proposal
</td>
<td align="left" class="cell">
<a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>
</td>
</tr>
<tr>
<td align="left" class="cell">
<a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">PDF</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Repository
</td>
<td align="left" class="cell">
<a href="https://gitweb.torproject.org/user/krkhan/arm.git">Tor Project Git</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Mentor Blog
</td>
<td align="left" class="cell">
<a href="http://www.atagar.com/arm/log.php">arm Development Log</a>
</td>
</tr>
</table>
<blockquote><p>&#8220;O Marvelous! what new configuration will come next? I am bewildered with multiplicity.&#8221; &#8212; <em>William Carlos Williams</em></p></blockquote>
<p>Up until now my GSoC development was dealing with the &#8220;monitoring&#8221; aspects of arm. In addition to being a monitor a Tor controller is also supposed to, well, control the Tor client. Tor offers a detailed <a href="https://gitweb.torproject.org/torspec.git/blob/HEAD:/control-spec.txt">specification</a> which can be used to interact with a running client and control it in a myriad of ways. This specification is then used by controllers like arm and Vidalia to fetch and/or update the client configuration.</p>
<p>The CLI configuration panel for arm already understood the control specification quite well. The first step towards reusing those portions for the GUI was to rewrite the inheritance code so that underlying data structures of the CLI were automagically connected to the Gtk+ models. That made the actual implementation of GUI configuration panel a whole lot cleaner. As things are, the panel detects the data types of configuration options and opens pertinent dialogs for user input:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-config.png"><img src="http://inspirated.com/uploads/garm-config-thumb.jpg" alt="Configuration panel for garm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Next item in to-do list was implementing a path selection panel in arm. After a thorough discussion on IRC with the core Tor developers it was decided that giving end-users <em>complete</em> access to the <code>PathSupport</code> component of TorCtl would ultimately hurt their anonymity with little (<a href="https://trac.torproject.org/projects/tor/wiki/doc/TorFAQ#Youshouldletpeoplechoosetheirpathlength.">if any</a>) pay-off. Letting them choose the country of their exit relay was still seen as a useful feature which is what I&#8217;m working on right now.</p>
<p>Meanwhile, while setting the configuration options needed to choose an exit country I figured that arm should be notified of any changes made by other controllers to the options in question. Damian pointed me to ticket <a href="https://trac.torproject.org/projects/tor/ticket/1692">#1692</a> which proposed an enhancement for this very purpose. He had already created a patch for the job but few quirks needed to be addressed before the patch was ready for being merged. Thanks to help from Nick Mathewson and Robert Ransom I was able to fix the code and get it inside the <a href="https://gitweb.torproject.org/tor.git?a=search&#038;st=author&#038;s=krkhan%40inspirated.com">tor</a> and <a href="https://gitweb.torproject.org/torspec.git?a=search&#038;st=author&#038;s=krkhan%40inspirated.com">tor-spec</a> repositories.</p>
<p>To make use of the new <code>CONF_CHANGED</code> event I also wrote patches for TorCtl and Vidalia. The TorCtl patch shall help me in making arm aware of configuration changes. While the Vidalia one is a proof-of-concept which created a signal and connected it to a debug function which for the time being just logs the options changed for the running Tor instance.</p>
<p>I hope to be done with exit node selection within a couple of days after which I&#8217;ll port the feature to CLI version of arm. It&#8217;ll be a good little exercise to start decoupling the arm interfaces from its backend so that future development is more streamlined and fun.</p>
<div class="shr-publisher-358"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration">Permalink</a> |
<a href="http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a>, <a href="http://inspirated.com/tag/vidalia" rel="tag">Vidalia</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/08/12/summer-of-code-progress-tor-configuration/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summer of Code Progress: garm 0.1</title>
		<link>http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1</link>
		<comments>http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1#comments</comments>
		<pubDate>Sun, 17 Jul 2011 12:16:25 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=353</guid>
		<description><![CDATA[Summer of Code Archive Inspirated Code Original Proposal Google Docs PDF Repository Tor Project Git Mentor Blog arm Development Log Damian and I have decided that the GUI prototype for arm should be released to the public for a feedback round. As always, the code is available from the Git repository. So far, the graphs [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><table align="center" summary="Intro" width="75%">
<tr>
<td align="right" class="cell">
Summer of Code Archive
</td>
<td align="left" class="cell">
<a href="http://code.inspirated.com/gsoc/">Inspirated Code</a>
</td>
</tr>
<tr>
<td align="right" class="cell" rowspan="2">
Original Proposal
</td>
<td align="left" class="cell">
<a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>
</td>
</tr>
<tr>
<td align="left" class="cell">
<a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">PDF</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Repository
</td>
<td align="left" class="cell">
<a href="https://gitweb.torproject.org/user/krkhan/arm.git">Tor Project Git</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Mentor Blog
</td>
<td align="left" class="cell">
<a href="http://www.atagar.com/arm/log.php">arm Development Log</a>
</td>
</tr>
</table>
<p>Damian and I have decided that the GUI prototype for arm should be released to the public for a feedback round. As always, the code is available from the Git <a href="https://gitweb.torproject.org/user/krkhan/arm.git">repository</a>.</p>
<p>So far, the graphs and logs now support a look more conforming with the rest of the GTK+ theme:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-graphs.png"><img src="http://inspirated.com/uploads/garm-0.1-graphs-thumb.jpg" alt="Graphs panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>The connections panel lists circuits and control ports in use. The resolvers in use are in fact, the same ones used by the CLI so the results are pretty consistent:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-conn.png"><img src="http://inspirated.com/uploads/garm-0.1-conn-thumb.jpg" alt="Connections panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>The &#8220;sticky&#8221; or &#8220;header&#8221; panel which provided general Tor/arm info has been moved to the notebook for giving it more horizontal space:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/garm-0.1-general.png"><img src="http://inspirated.com/uploads/garm-0.1-general-thumb.jpg" alt="General panel for garm 0.1" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>Owing to my lack of creativity the GUI was named &#8220;garm&#8221;. Which coincidentally turned out to be the name of a talking dog from <a href="http://en.wikipedia.org/wiki/Farmer_Giles_of_Ham">one</a> of Tolkein&#8217;s short stories. Proving once again that Tolkein/Middle Earth/Norse mythology are any geek&#8217;s safe fallback plan for being imaginative.</p>
<p>While the GUI is still in infancy, we&#8217;d love any feedback we can get. If you have a suggestion you can post a comment here, drop by at <code>#tor-dev</code> or (preferably) mail your thoughts to <a href="https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk">tor-talk</a>. I&#8217;ll be grateful for any ideas that end up making garm more useful for relay operators.</p>
<div class="shr-publisher-353"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1">Permalink</a> |
<a href="http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/07/17/summer-of-code-progress-garm-0-1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summer of Code Progress: Graphs, logs and acid</title>
		<link>http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid</link>
		<comments>http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid#comments</comments>
		<pubDate>Tue, 28 Jun 2011 14:06:59 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PyGTK]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=350</guid>
		<description><![CDATA[Summer of Code Archive Inspirated Code Original Proposal Google Docs PDF Repository Tor Project Git Mentor Blog arm Development Log The great thing about a command line application is being able to SSH into the thing from anywhere and with anything. Nevertheless, the general public appeal of GUIs has always remained undeniable. After all, over [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><table align="center" summary="Intro" width="75%">
<tr>
<td align="right" class="cell">
Summer of Code Archive
</td>
<td align="left" class="cell">
<a href="http://code.inspirated.com/gsoc/">Inspirated Code</a>
</td>
</tr>
<tr>
<td align="right" class="cell" rowspan="2">
Original Proposal
</td>
<td align="left" class="cell">
<a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>
</td>
</tr>
<tr>
<td align="left" class="cell">
<a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">PDF</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Repository
</td>
<td align="left" class="cell">
<a href="https://gitweb.torproject.org/user/krkhan/arm.git">Tor Project Git</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Mentor Blog
</td>
<td align="left" class="cell">
<a href="http://www.atagar.com/arm/log.php">arm Development Log</a>
</td>
</tr>
</table>
<p>The great thing about a command line application is being able to SSH into the thing from anywhere and with anything. Nevertheless, the general public appeal of GUIs has always remained undeniable. After all, over the decades one of the favorite pass times of Steve Jobs &#8212; the man who knows a thing or two about public appeal &#8212; <a href="http://community.seattletimes.nwsource.com/archive/?date=19930602&#038;slug=1704430">has</a> <a href="http://www.engadget.com/2011/04/18/apple-sues-samsung-over-for-copying-the-iphone-and-ipad/">been</a> <a href="http://www.engadget.com/2010/03/02/apple-vs-htc-a-patent-breakdown/">suing</a> and/or <a href="http://www.nytimes.com/1989/12/20/business/xerox-vs-apple-standard-dashboard-is-at-issue.html">getting sued</a> for patents related to GUI. It&#8217;s not to say that we are planning an iTorMonitor for App Store (you still have <a href="http://www.zinger-soft.com/iSSH_features.html">iSSH</a> if you&#8217;d like), but a graphical interface shall hopefully go a long way for attracting newbie relay operators.</p>
<p>The first items to be ported to GUI were the bandwidth graphs. After a thorough discussion on <code>#tor-dev</code> regarding how to achieve graphing with respect to feature sets, packaging issues and wheel reinvention; <a href="http://code.google.com/p/cagraph/">cagraph</a> was chosen as the way to go (among Matplotlib and drawing directly to GDK surfaces). I took screenshots of both interfaces running side-by-side in order to judge how accurate the graphs were and the results look fine:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-bwstats-cli.png"><img src="http://inspirated.com/uploads/arm-bwstats-cli-thumb.jpg" alt="CLI bandwidth stats for arm" /></a></p>
<p style="text-align: center; font-size: x-small"><img src="http://inspirated.com/uploads/down-arrow.jpg" alt="Down arrow" /></p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-bwstats-gui.png"><img src="http://inspirated.com/uploads/arm-bwstats-gui-thumb.jpg" alt="GUI bandwidth stats for arm" /></a><br />
(Click on the thumbnails for larger version.)</p>
<p>Next up were the log messages dispatched by arm or Tor. While Damian would not be entirely happy with the fact that I&#8217;m not terribly innovative with the UI translation <img src='http://inspirated.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  , I did stumble upon an interesting side-feature of using timestamp based sorting. The user can sort the entries in ascending order and he&#8217;ll always see the recent-most entry as it pops up in the view, or he can revert the order and see old entries at his leisure while the new entries populate elsewhere below.</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-log.png"><img src="http://inspirated.com/uploads/arm-log-thumb.jpg" alt="Log panel for arm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>One other aspect I noticed while designing the UIs was that I have atrocious color selection skills. The color scheme of the entire application isn&#8217;t consistent and might even invite a backlash once it goes public. Therefore I plan on discarding all hardcoded colors in favor of theme colors from GTK+ itself &#8212; lest the GUI be packaged into a separate <code>arm-trippy</code> once it makes to major distros.</p>
<div class="shr-publisher-350"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid">Permalink</a> |
<a href="http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid#comments">One comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/pygtk" rel="tag">PyGTK</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/06/28/summer-of-code-progress-graphs-logs-and-acid/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Summer of Code Progress: Cursing with Python</title>
		<link>http://inspirated.com/2011/06/01/summer-of-code-progress-cursing-with-python</link>
		<comments>http://inspirated.com/2011/06/01/summer-of-code-progress-cursing-with-python#comments</comments>
		<pubDate>Wed, 01 Jun 2011 14:26:31 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=345</guid>
		<description><![CDATA[Summer of Code Archive Inspirated Code Original Proposal Google Docs PDF Repository Tor Project Git Mentor Blog arm Development Log The first thing that comes to mind after seeing &#8220;curses&#8221; and &#8220;Python&#8221; in the same sentence is &#8220;go away or I shall taunt you a second time&#8221;. After spending a while trying to write text-mode [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><table align="center" summary="Intro" width="75%">
<tr>
<td align="right" class="cell">
Summer of Code Archive
</td>
<td align="left" class="cell">
<a href="http://code.inspirated.com/gsoc/">Inspirated Code</a>
</td>
</tr>
<tr>
<td align="right" class="cell" rowspan="2">
Original Proposal
</td>
<td align="left" class="cell">
<a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">Google Docs</a>
</td>
</tr>
<tr>
<td align="left" class="cell">
<a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">PDF</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Repository
</td>
<td align="left" class="cell">
<a href="https://gitweb.torproject.org/user/krkhan/arm.git">Tor Project Git</a>
</td>
</tr>
<tr>
<td align="right" class="cell">
Mentor Blog
</td>
<td align="left" class="cell">
<a href="http://www.atagar.com/arm/log.php">arm Development Log</a>
</td>
</tr>
</table>
<p>The first thing that comes to mind after seeing &#8220;curses&#8221; and &#8220;Python&#8221; in the same sentence is &#8220;go away or I shall taunt you a second time&#8221;. After spending a while trying to write text-mode interfaces, it only starts ringing truer.</p>
<p>Coding period for Google Summer of Code 2011 officially began last week. Because of exams and some subsequent issues involving my university I had been lagging behind my intended schedule. With help from <a href="http://www.atagar.com/">Damian Johnson</a> though I was able to get my feet wet quickly and start integrating menus in arm. Luckily, the arm codebase was very well-written and neatly organized which simplified my task and allowed me to end up with a functional implementation by the end of first week:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/arm-menus.png"><img src="http://inspirated.com/uploads/arm-menus-thumb.jpg" alt="Drop-down menus for arm" /></a><br />
(Click on the thumbnail for larger version.)</p>
<p>The code can be accessed via my <a href="https://gitweb.torproject.org/user/krkhan/arm.git">Git repository</a> at Tor Project. In addition to that I also now own a shiny <em>krkhan@torproject.org</em> email address which is currently setup to forward messages to my primary mail.</p>
<p>Menus still needs a bit of polishing as the controls are not completely intuitive and I still need to bug-hunt thoroughly on varying screen sizes. For the time being they work well enough to control all aspects of arm except for quitting or resetting Tor, which I shall be fixing after figuring out a few quirks.</p>
<blockquote><p>&#8220;As a child my family&#8217;s menu consisted of two choices: take it or leave it.&#8221; &#8212; <em>Buddy Hackett</em></p></blockquote>
<div class="shr-publisher-345"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/06/01/summer-of-code-progress-cursing-with-python">Permalink</a> |
<a href="http://inspirated.com/2011/06/01/summer-of-code-progress-cursing-with-python#comments">2 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/06/01/summer-of-code-progress-cursing-with-python/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>There and Back Again &#8212; Google Summer of Code 2011</title>
		<link>http://inspirated.com/2011/04/26/there-and-back-again-google-summer-of-code-2011</link>
		<comments>http://inspirated.com/2011/04/26/there-and-back-again-google-summer-of-code-2011#comments</comments>
		<pubDate>Mon, 25 Apr 2011 22:43:01 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[EFF]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[GSoC]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Summer of Code]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=338</guid>
		<description><![CDATA[After completing my project for last year&#8216;s Summer of Code my degree was delayed for a while because of flunking a few courses. Glass half full, this gave me the chance to participate once more before I finally graduate this summer &#8212; Deo volente. In a repeat of last year I once again became a [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p style="text-align: center"><a href="http://code.google.com/soc/"><img src="http://inspirated.com/uploads/gsoc-11.jpg" alt="GSoC 2011 Logo" /></a></p>
<p>After completing my project for <a href="http://inspirated.com/2010/04/27/finally-there-google-summer-of-code-2010">last year</a>&#8216;s Summer of Code my degree was delayed for a while because of flunking a few courses. Glass half full, this gave me the chance to participate once more before I finally graduate this summer &#8212; Deo volente.</p>
<p>In a repeat of last year I once again became a duplicate student as my proposals for both Fedora and Tor projects ended up in top slots. Both organizations were really nice in the de-duplication process and inquired about my preference which inclined towards Tor since it allowed me to contribute to fields of privacy and anonymity. In words of <a href="http://www.fsf.org/news/2010-free-software-awards-announced">Free Software Foundation</a>:</p>
<blockquote><p>Using free software, Tor has enabled roughly 36 million people around the world to experience freedom of access and expression on the Internet while keeping them in control of their privacy and anonymity. Its network has proved pivotal in dissident movements in both Iran and more recently Egypt.</p></blockquote>
<p>This by no means implies any lesser significance for Fedora in my life and I would have been as much enthused had it been my mentoring organization for the summer instead of EFF. However, since I <em>had</em> to make a choice I went for the option where I would be contributing more directly to privacy enhancing technologies.</p>
<p>My project this summer revolves around improving the excellent <a href="http://www.atagar.com/arm/">Anonymizing Relay Monitor</a> (arm) which is used by the Tor community to monitor and control bridges and relays. The complete proposal can be read <a href="https://docs.google.com/viewer?a=v&#038;pid=explorer&#038;chrome=true&#038;srcid=0B55i8hMIrEj_ODc2ZjdjN2QtNTE5Mi00Y2NhLThhMTgtZDQ2YzcxZDBhMjE0&#038;hl=en">here</a> (or via the <a href="http://inspirated.com/uploads/tor-gsoc-11.pdf">original PDF</a>). It contains nitty-gritty details of my summer aspirations as well as non-technical stuff like why I want to contribute to this particular field.</p>
<p>I Know What I Did Last Summer, and I&#8217;m looking forward to doing it again. Quoting myself from <a href="http://en.flossmanuals.net/GSoCStudentGuide/ch002_why-should-i-apply/">FLOSS Manuals</a>:</p>
<blockquote><p>&#8220;Summer of Code is about much more than just code. The sheer fun of integrating with the open-source community and your mentoring organization can in fact outweigh the gratification of actual coding. &#8220;</p></blockquote>
<div class="shr-publisher-338"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/04/26/there-and-back-again-google-summer-of-code-2011">Permalink</a> |
<a href="http://inspirated.com/2011/04/26/there-and-back-again-google-summer-of-code-2011#comments">2 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/arm" rel="tag">arm</a>, <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/eff" rel="tag">EFF</a>, <a href="http://inspirated.com/tag/fedora" rel="tag">Fedora</a>, <a href="http://inspirated.com/tag/google" rel="tag">Google</a>, <a href="http://inspirated.com/tag/gsoc" rel="tag">GSoC</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/rants" rel="tag">Rants</a>, <a href="http://inspirated.com/tag/summer-of-code" rel="tag">Summer of Code</a>, <a href="http://inspirated.com/tag/tor" rel="tag">Tor</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/04/26/there-and-back-again-google-summer-of-code-2011/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GSmolt: A GTK+ frontend for Smolt</title>
		<link>http://inspirated.com/2011/03/30/gsmolt-a-gtk-frontend-for-smolt</link>
		<comments>http://inspirated.com/2011/03/30/gsmolt-a-gtk-frontend-for-smolt#comments</comments>
		<pubDate>Tue, 29 Mar 2011 20:46:03 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[GSmolt]]></category>
		<category><![CDATA[GTK+]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[Smolt]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=333</guid>
		<description><![CDATA[Smolt is a hardware profiler for Linux distributions which makes it easier for end-users to report back their machine configurations to a centralized database. Mike McGrath provides an excellent backend for developing Smolt GUIs which I have coupled with GTK+ for GSmolt: (Click on the thumbnails for larger versions.) The script can be found at [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a href="https://fedorahosted.org/smolt/">Smolt</a> is a hardware profiler for Linux distributions which makes it easier for end-users to report back their machine configurations to a centralized database. Mike McGrath provides an excellent backend for developing Smolt GUIs which I have coupled with GTK+ for GSmolt:</p>
<p style="text-align: center; font-size: x-small"><a href="http://inspirated.com/uploads/gsmolt.png"><img src="http://inspirated.com/uploads/gsmolt-thumb.jpg" alt="GSmolt Screenshot" /></a><br />
<a href="http://inspirated.com/uploads/gsmolt-send.png"><img src="http://inspirated.com/uploads/gsmolt-send-thumb.jpg" alt="GSmolt Send Screenshot" /></a><br />
(Click on the thumbnails for larger versions.)</p>
<p>The script can be found at the <a href="https://github.com/krkhan/gsmolt">gsmolt repository</a> on GitHub. Things on todo list include profile reporting in a separate thread and better error handling. I&#8217;ll provide RPM and Deb packages when the code is ready for a public release.</p>
<p>As a side note, this is the first project I have tracked using GitHub (as opposed to <a href="https://code.launchpad.net/~inspirated">Launchpad</a> + Bazaar). While Launchpad has its added advantage of PPAs which make it easier to push out public releases for Debian derivatives, I&#8217;m liking the Git experience so far. Hopefully some day <a href="http://fedoraproject.org/wiki/Category:Copr">Copr</a> shall mature to a point where it can be the end-all, be-all Launchpad alternative for Fedora users.</p>
<div class="shr-publisher-333"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2011/03/30/gsmolt-a-gtk-frontend-for-smolt">Permalink</a> |
<a href="http://inspirated.com/2011/03/30/gsmolt-a-gtk-frontend-for-smolt#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/code" rel="tag">Code</a>, <a href="http://inspirated.com/tag/fedora" rel="tag">Fedora</a>, <a href="http://inspirated.com/tag/git" rel="tag">Git</a>, <a href="http://inspirated.com/tag/github" rel="tag">GitHub</a>, <a href="http://inspirated.com/tag/gsmolt" rel="tag">GSmolt</a>, <a href="http://inspirated.com/tag/gtk" rel="tag">GTK+</a>, <a href="http://inspirated.com/tag/gui" rel="tag">GUI</a>, <a href="http://inspirated.com/tag/linux" rel="tag">Linux</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/opensuse" rel="tag">openSUSE</a>, <a href="http://inspirated.com/tag/smolt" rel="tag">Smolt</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2011/03/30/gsmolt-a-gtk-frontend-for-smolt/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.070 seconds -->

