<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Brandon&#039;s Thoughts</title>
	<atom:link href="http://brskari.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://brskari.wordpress.com</link>
	<description>Thoughts on programming</description>
	<lastBuildDate>Wed, 06 Jul 2011 05:34:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='brskari.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Brandon&#039;s Thoughts</title>
		<link>http://brskari.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://brskari.wordpress.com/osd.xml" title="Brandon&#039;s Thoughts" />
	<atom:link rel='hub' href='http://brskari.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Rounding function for bc</title>
		<link>http://brskari.wordpress.com/2011/04/23/rounding-values-in-bc/</link>
		<comments>http://brskari.wordpress.com/2011/04/23/rounding-values-in-bc/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 19:58:20 +0000</pubDate>
		<dc:creator>bskari</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://brskari.wordpress.com/?p=71</guid>
		<description><![CDATA[bc doesn&#8217;t include a way to round floating point values to the nearest integer, but you can write one yourself. Just type this in: If you don&#8217;t feel like typing this in every time, you can add it to a &#8230; <a href="http://brskari.wordpress.com/2011/04/23/rounding-values-in-bc/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=71&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Bc_programming_language" title="bc">bc</a> doesn&#8217;t include a way to round floating point values to the nearest integer, but you can write one yourself. Just type this in:<br />
<pre class="brush: cpp;">
define round(n)
{
    oldscale = scale
    if (n &gt; 0)
        value = n + 0.5
    if (n &lt; 0)
        value = n - 0.5
    scale = 0
    rounded = value / 1
    scale = oldscale
    return rounded
}
</pre></p>
<p>
If you don&#8217;t feel like typing this in every time, you can add it to a file that will be loaded when you start <tt>bc</tt>. Type it into a file, such as <tt>$HOME/.bcrc</tt> and then add the following to your <tt>.bashrc</tt> file:<br />
<code><br />
export BC_ENV_ARGS="$HOME/.bcrc"<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brskari.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brskari.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brskari.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brskari.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brskari.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brskari.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brskari.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brskari.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brskari.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brskari.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brskari.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brskari.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brskari.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brskari.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=71&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brskari.wordpress.com/2011/04/23/rounding-values-in-bc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8dc7ccf7db4e2405001c587ac576758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bskari</media:title>
		</media:content>
	</item>
		<item>
		<title>C++ Assignment Operator or: How I Learned to Stop Worrying and not Check for Self-Assignment</title>
		<link>http://brskari.wordpress.com/2011/02/24/c-assignment-operator-or-how-i-learned-to-stop-worrying-and-not-check-for-self-assignment/</link>
		<comments>http://brskari.wordpress.com/2011/02/24/c-assignment-operator-or-how-i-learned-to-stop-worrying-and-not-check-for-self-assignment/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 03:50:54 +0000</pubDate>
		<dc:creator>bskari</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://brskari.wordpress.com/?p=39</guid>
		<description><![CDATA[If you&#8217;re already here, I&#8217;m going to assume you know a lot of the intricacies of writing an assignment operator in C++. Getting all the ins and outs of writing assignment operators is tricky &#8211; if you want a good &#8230; <a href="http://brskari.wordpress.com/2011/02/24/c-assignment-operator-or-how-i-learned-to-stop-worrying-and-not-check-for-self-assignment/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=39&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re already here, I&#8217;m going to assume you know a lot of the intricacies of writing an assignment operator in C++. Getting all the ins and outs of writing assignment operators is tricky &#8211; if you want a good discussion of all the bits and pieces, I&#8217;d recommend taking a look at <a href="http://icu-project.org/docs/papers/cpp_report/the_anatomy_of_the_assignment_operator.html">The Anatomy of the Assignment Operator</a>. But that&#8217;s not why I&#8217;m here, so at the risk of being blasphemous, I&#8217;ll just get my main point out of the way.</p>
<p><b>If you are writing<br />
<tt>if (this != &amp;rhs)</tt><br />
in your assignment operator, you are probably doing it wrong, or at the very least, not as right as it should be.</b></p>
<p>That&#8217;s it. Take a deep breath, sit back, relax and just let it settle. I&#8217;ve been told to do it this way for years, and you probably have too, so it might be a bit of a shock. But please, please stop telling people to write it this way. It&#8217;s important to understand <i>why</i> people do it, but it&#8217;s just as important to understand why it&#8217;s wrong.</p>
<h2>Self-assignment</h2>
<p>Let&#8217;s look at why people recommend writing this check. Imagine we have the following class:<br />
<pre class="brush: cpp;">
class Foo
{
public:

    ...

private:
    Bar* myBar;
};
</pre></p>
<p>A first attempt at an assignment operator might look like the following:<br />
<pre class="brush: cpp;">
Foo&amp; operator=(const Foo&amp; rhs)
{
    delete myBar;
    myBar = new Bar(*rhs.myBar);
    return *this;
}
</pre><br />
The first thing that we do is delete the old copy of <tt>myBar</tt> so that no memory is leaked. Then, we make a copy of the right hand side&#8217;s <tt>myBar</tt>. This is where our problems start. What would happen in the above assignment operator if I tried to assign an object to itself? For example, if I wrote the following:<br />
<code><br />
Foo f;<br />
f = f;<br />
</code><br />
In this case, the parameter <tt>rhs</tt> would be the same as the current object. So when we try to run the line 3 in the assignment operator:<br />
<code><br />
delete myBar;<br />
</code><br />
the <i>rhs&#8217;s myBar is also being deleted</i>. So what happens when we try to run the next line?<br />
<code><br />
myBar = new Bar(*rhs.myBar);<br />
</code><br />
We&#8217;re trying to access and copy memory that has already been deleted. At this point, any number of things could happen. Some of the time, that memory will still belong to our process and will be unchanged, and our program will happily continue. But once in a while, the program will mysteriously crash. Trying to debug this issue when it works 99 out of 100 times is difficult and irritating.</p>
<p>So what can we do instead? The commonly suggested solution is to check for self-assignment and skip the allocation and deletion in that case. This does solve the problem, but let&#8217;s take a step back and look at our code again. The problem with self-assignment in the above constructor is that by the time we are ready to copy the <tt>Bar</tt> object, we&#8217;ve already deleted it. But what if we did the copy first, swapped that copy with our member variable, and then deleted what used to be our member variable?</p>
<p>Here&#8217;s a new code snippet that does that instead:<br />
<pre class="brush: cpp;">
Foo&amp; operator=(const Foo&amp; rhs)
{
    Bar* temp = new Bar(*rhs.myBar);
    swap(temp, myBar);
    delete myBar;
    return *this;
}
</pre><br />
What happens now if we accidentally do self-assignment? Well, line 3 makes a copy of the member variable. Line 4 swaps the copy with our member variable. Finally, line 5 deletes what used to be our member copy. No memory is leaked, no deleted memory is accessed, and at worst, some cycles are wasted making a copy of some memory and deleting it. We fixed the problem without ever needing a check for self-assignment!</p>
<p>But just avoiding a special case doesn&#8217;t necessarily make this version better, does it? Well&#8230;</p>
<h2>Exception guarantees</h2>
<p>In C++, there are several guidelines you should try to follow whenever you&#8217;re writing a function. These are known as <a href="http://en.wikipedia.org/wiki/Exception_guarantees">exception guarantees</a>. In some cases, it is impossible to implement the stronger ones, but you should try to implement them if you can.</p>
<p>The first guarantee is the <b>basic guarantee</b> which states that your code should not leak memory if any exceptions are thrown. In both our copy constructors, the only line that could throw an exception is the memory allocation. If it does, then there is no memory cleanup required because we&#8217;re only trying to allocate a single object. If our class did have more objects, we would need to allocate them sequentially, catch any exceptions that might be thrown while making copies of them and delete the copies that we had made so far before rethrowing the exception.</p>
<p>The second guarantee is the <b>strong guarantee</b> which states that your code should leave the object in a consistent state if any exceptions are thrown. Let&#8217;s imagine that I was using the Foo class in the following context:<br />
<pre class="brush: cpp;">
do
{
    try
    {
        Foo f1, f2;

        ...

        f1 = f2;

        ...

    }
    catch (bad_alloc&amp; e)
    {
        // Clean up some memory and keep running
    }
} while (!done);
</pre><br />
Here, we have a long running process and that may run out of memory at some point, but we have a way of cleaning up some memory if an error ever does occur, so we&#8217;d like to continue running the process until it successfully completes.</p>
<p>Now imagine what happens with our first assignment operator. We first delete the member variable <tt>myBar</tt>, then try to make a copy of the right hand side&#8217;s <tt>myBar</tt>. If this throws an exception, then our <tt>Foo</tt> will be left with <tt>myBar</tt> pointing at some invalid memory. When our program tries to pick up where it left off, it will try to access that memory and will probably crash.</p>
<p>What about with our second assignment operator? We first try making a copy of the right hand side&#8217;s <tt>myBar</tt>. If it throws an exception, our <tt>Foo</tt> is left unchanged. The program can run the loop again and nothing crashes.</p>
<p>By doing any allocations before deleting objects, we&#8217;ve managed to avoid the problems of self-assignment without writing <tt>if (this != &amp;rhs)</tt> . In addition, this code implements the strong guarantee and is therefore safer. <b>If your code relies on a check for self-assignment for correctness, then it probably doesn&#8217;t implement the strong guarantee and is less safe than it should be.</b></p>
<h2>But what about speed?</h2>
<p>One question I&#8217;ve received when explaining this concept is that the second version is much slower when doing self-assignment than the original version. That is true &#8211; comparing two memory addresses is much less costly than allocating and deleting memory. However, in practice, self-assignment is generally rare. Optimizing one specific rare case at the expense of the much more common general cases will likely not gain you much. <b>Putting in a special case to guarantee that your program does not crash 1 out of 1000 times is important; putting in a special case to optimize 1 out of 1000 cases is not.</b> If you are concerned about speed, profile your code first and determine how often self-assignment really occurs.</p>
<h2>Alternatives</h2>
<p>It turns out that there is an even easier way to write an assignment operator as long as certain conditions are met. The strongest exception guarantee is the <a href="http://en.wikipedia.org/wiki/Exception_guarantees">no-throw guarantee</a> which states that no exceptions will be thrown. As long as we&#8217;re not allocating any memory or other objects, this should be possible. In <tt>Foo</tt>, the only member variable we have is a pointer. Because moving pointers will not throw an exception, we can write a <tt>swap()</tt> method that swaps the contents of two <tt>Foo</tt> objects that has the no-throw guarantee. Then, we can write the whole copy constructor as follows:<br />
<pre class="brush: cpp;">
Foo&amp; operator=(Foo rhs)
{
    swap(rhs);
    return *this;
}
</pre></p>
<p>Rather than sending the right hand side object by reference, we send it by value; this causes the compiler to make a temporary copy of the the right hand side object using Foo&#8217;s copy constructor. This temporary object will be sent to the method, and the copy will be swapped with the local object. Then, upon exiting the method, the temporary object will go out of scope and be automatically destroyed. And so, without doing any extra work, we automatically get the basic and strong guarantees.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brskari.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brskari.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brskari.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brskari.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brskari.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brskari.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brskari.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brskari.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brskari.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brskari.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brskari.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brskari.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brskari.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brskari.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=39&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brskari.wordpress.com/2011/02/24/c-assignment-operator-or-how-i-learned-to-stop-worrying-and-not-check-for-self-assignment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8dc7ccf7db4e2405001c587ac576758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bskari</media:title>
		</media:content>
	</item>
		<item>
		<title>AutoSSH Module for Prey</title>
		<link>http://brskari.wordpress.com/2010/11/16/autossh-module-for-prey/</link>
		<comments>http://brskari.wordpress.com/2010/11/16/autossh-module-for-prey/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 02:37:00 +0000</pubDate>
		<dc:creator>bskari</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://brskari.wordpress.com/2010/11/16/autossh-module-for-prey</guid>
		<description><![CDATA[Prey Prey is software that allows you to track computers and other devices in case they are stolen. After it&#8217;s installed on a machine, it periodically checks to see if you have reported it as stolen, and if you have, &#8230; <a href="http://brskari.wordpress.com/2010/11/16/autossh-module-for-prey/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=13&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Prey</h3>
<p>
<a href="http://preyproject.com">Prey</a> is software that allows you to track computers and other devices in case they are stolen. After it&#8217;s installed on a machine, it periodically checks to see if you have reported it as stolen, and if you have, it will contact you with details about the machine&#8217;s current status. This information includes its IP address, GPS position, a screenshot of the current desktop and a picture (or video) of the perpetrator using the webcam.</p>
<p>
<br />This makes it much easier to recover your property. However, I also wanted to be able to have full control of the machine in order to access my data and to be able to directly monitor the thief. The easiest option is to <tt>ssh</tt> directly into the machine; however, this is only possible if the router they are connected to doesn&#8217;t block outside connections. One solution is to set up Prey to open a <a href="http://www.debianadmin.com/howto-use-ssh-local-and-remote-port-forwarding.html">remote port</a> on another machine that forwards back to itself; this way, your laptop initiates an outbound connection and evades the block.<br />
</p>
<h3>Prerequisites</h3>
<p>
To accomplish this, you will need root access on a server that&#8217;s running OpenSSH so that you can add a user that&#8217;s only used for Prey. You could conceivably use your own account instead of creating a new one, but if your laptop is stolen, the thief would be given full access to your account. Your laptop also needs to be running Linux (the same procedures should work for other *nix systems, but modifications will have to be made to the directory structure of the download).</p>
<h3>Account preparation</h3>
<p>
To allow Prey to access your server, we will be setting up SSH keys that allow automatic login onto a server. Because of this, it is very important that you create a new user on the server and disable their shell, so that if your laptop is stolen, the thief won&#8217;t be given access to an account.</p>
<p>
On the server, run the following as root to add a new user:<br />
<tt><b>root@server:~#</b> adduser preyuser</tt><br />
Set a password and whatever other options it asks for.</p>
<p>
On your laptop, run all of the following commands as root:<br />
<tt><b>root@laptop:~#</b> ssh-keygen -t rsa</tt><br />
Do not enter a passphrase.<br />
Now use <tt>ssh</tt> to create a <tt>~/.ssh</tt> directory by running:<br />
<tt><b>root@laptop:~#</b> ssh preyuser@server mkdir -p .ssh</tt><br />
Enter the password for the user you just created.<br />
Now append the laptop&#8217;s public key to the authorized keys on the server:<br /><tt><b>root@laptop:~#</b> cat ~/.ssh/id_rsa.pub | ssh preyuser@server 'cat &gt;&gt; .ssh/authorized_keys'</tt><br />
You should now be able to log into the server as <tt>preyuser</tt> without entering a password.</p>
<p>
Finally, back on the server, disable <tt>preyuser</tt>&#8216;s ability to login by disabling their login shell:<br />
<tt><b>root@server:~#</b> which nologin</tt><br />
<tt><b>/usr/sbin/nologin</b></tt><br />
<tt><b>root@server:~#</b> chsh -s /usr/sbin/nologin preyuser</tt></p>
<p>
Trying to log into the server should now give give you the message that the account is currently not available.</p>
<h3>Configuring your laptop</h3>
<p>
The only thing to do now is to configure Prey. Download the <a href="http://www.skari.org/blog/prey-autossh.tgz">AutoSSH module</a> onto your laptop and decompress it:<br /><tt><b>root@laptop:~#</b> wget http://www.skari.org/blog/prey-autossh.tgz</tt><br />
<tt><b>root@laptop:~#</b> tar -xzvf prey-autossh.tgz</tt><br />
Edit the <tt>autossh/config</tt> file and fill in your server, username, and remote port. When you&#8217;re done, move the folder into the Prey modules directory:<br />
<tt><b>root@laptop:~#</b> mv autossh /usr/share/prey/modules/</tt><br />
That&#8217;s it!</p>
<p>
Prey should now open a forwarded tunnel from your server to your laptop when activated. However, if the connection is interrupted, the tunnel will die. You may want to consider installing <a href="http://www.harding.motd.ca/autossh/"><tt>autossh</tt></a> which will start and actively monitor an SSH connection and restart it as necessary. This module will use <tt>autossh</tt> if it is available and fall back to plain <tt>ssh</tt> otherwise.</p>
<h3>Logging into your stolen laptop</h3>
<p>
Now, if your laptop is stolen, Prey should activate and send you a report. To access your laptop, login to your server and run:<br />
<tt><b>user@server:~$</b> ssh user@localhost -p <i>port</i></tt><br />
<br />Enter the laptop&#8217;s <tt>user</tt>&#8216;s password,and you should be in. Now go catch the bastard!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brskari.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brskari.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brskari.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brskari.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brskari.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brskari.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brskari.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brskari.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brskari.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brskari.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brskari.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brskari.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brskari.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brskari.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=13&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brskari.wordpress.com/2010/11/16/autossh-module-for-prey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8dc7ccf7db4e2405001c587ac576758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bskari</media:title>
		</media:content>
	</item>
		<item>
		<title>No sound for Flash in OpenSuse 11.2</title>
		<link>http://brskari.wordpress.com/2010/05/29/no-sound-for-flash-in-opensuse-11-2/</link>
		<comments>http://brskari.wordpress.com/2010/05/29/no-sound-for-flash-in-opensuse-11-2/#comments</comments>
		<pubDate>Sat, 29 May 2010 04:30:00 +0000</pubDate>
		<dc:creator>bskari</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://brskari.wordpress.com/2010/05/29/no-sound-for-flash-in-opensuse-11-2</guid>
		<description><![CDATA[I installed OpenSuse 11.2 on my laptop and everything was working fine. except I wasn&#8217;t getting any sound out of Flash (e.g. Youtube). Sound was working fine in other programs, so I knew my sound card was working. The problem &#8230; <a href="http://brskari.wordpress.com/2010/05/29/no-sound-for-flash-in-opensuse-11-2/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=10&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I installed OpenSuse 11.2 on my laptop and everything was working fine. except I wasn&#8217;t getting any sound out of Flash (e.g. Youtube). Sound was working fine in other programs, so I knew my sound card was working. The problem was, <tt>alsamixer</tt> had my <a href="http://en.wikipedia.org/wiki/Pulse-code_modulation">Pulse Code Modulation</a> muted. To fix it, just run this in a terminal:<br />
<tt>alsamixer</tt><br />
and move over to PCM with the arrows and hold the up arrow until it&#8217;s maxed out. Hopefully that will fix your problem!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brskari.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brskari.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brskari.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brskari.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brskari.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brskari.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brskari.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brskari.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brskari.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brskari.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brskari.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brskari.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brskari.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brskari.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=10&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brskari.wordpress.com/2010/05/29/no-sound-for-flash-in-opensuse-11-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8dc7ccf7db4e2405001c587ac576758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bskari</media:title>
		</media:content>
	</item>
		<item>
		<title>A Subversion Pre-Commit Hook</title>
		<link>http://brskari.wordpress.com/2010/05/24/a-subversion-pre-commit-hook/</link>
		<comments>http://brskari.wordpress.com/2010/05/24/a-subversion-pre-commit-hook/#comments</comments>
		<pubDate>Mon, 24 May 2010 05:37:00 +0000</pubDate>
		<dc:creator>bskari</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://brskari.wordpress.com/2010/05/24/a-subversion-pre-commit-hook</guid>
		<description><![CDATA[Subversion allows you to run commands, called hook scripts, whenever actions take place in your repository. The most useful of these that I&#8217;ve found is the pre-commit hook, which allows you check a transaction for problems before it is committed. &#8230; <a href="http://brskari.wordpress.com/2010/05/24/a-subversion-pre-commit-hook/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=9&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Subversion allows you to run commands, called <a href="http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.reposadmin.create.hooks">hook scripts</a>, whenever actions take place in your repository. The most useful of these that I&#8217;ve found is the pre-commit hook, which allows you check a transaction for problems before it is committed.</p>
<p>
<a href="http://wordaligned.org/articles/a-subversion-pre-commit-hook">Word Aligned</a> has an excellent introduction on setting up pre-commit hooks and includes a small example. I use a more complex script on my own server, and thought it might be of use to somebody else. It verifies the following:</p>
<ul>
<li>The commit message is at least 10 characters long</li>
<li>The commit message is different from the previous message (handy when hit the up arrow and accidentally try to commit again)</li>
<li>Tabs are used for indentation instead of spaces (sorry, I&#8217;m a tabs guy &#8211; you can change it if you need to)</li>
<li>PHP files don&#8217;t have syntax errors</li>
<li>C and C++ files don&#8217;t have any <a href="http://en.wikipedia.org/wiki/Digraphs_and_trigraphs">digraphs or trigraphs</a></li>
</ul>
<p>
<pre class="brush: python;">
#!/usr/bin/python
import sys

# These should point to the respective commands
SVNLOOK = '/usr/bin/svnlook'
PHP = '/usr/bin/php'
MIN_MESSAGE_LENGTH = 10

# Gets a command's output
def commandOutput(command):
	import subprocess
	process = subprocess.Popen(command.split(), stdout = subprocess.PIPE)
	return process.communicate()[0] # 0 is stdout


# Returns an array of the changed files' names
def getChangedFiles(svnPath, transaction):
	# Run svnlook to find the files that were changed
	output = commandOutput('%s changed %s --transaction %s' % (SVNLOOK, svnPath, transaction))

	# The output from svnlook looks like the following:
	# U   folder/file1.cpp
	# A   folder/file2.cpp
	# where U means updated and A means added
	def changed(fileName):
		return len(line) &amp;gt; 0 and line[0] in ('A', 'U')
	changedFiles = [line[4:] for line in output.split('\n') if changed(line)]

	# svnlook inserts an empty line, so output.split() will have an extra
	# line with nothing in it - ignore the last lines if they're empty
	while 0 == len(changedFiles[-1]):
		changedFiles = changedFiles[:-1]

	return changedFiles


# Checks that the message is a minimum length
def checkMessageLen(svnPath, transaction, minLength):
	# Run svnlook to get the message log
	output = commandOutput('%s log %s --transaction %s' % (SVNLOOK, svnPath, transaction))

	if len(output) &amp;lt; minLength:
		sys.stderr.write(&#039;Message must be at least %d characters\n&#039; % minLength)
		return 1
	else:
		return 0


# Checks that the message is different from the last message
def checkRepeatMessage(svnPath, transaction):
	# Run svnlook to get the message log
	output = commandOutput(&#039;%s log %s --transaction %s&#039; % (SVNLOOK, svnPath, transaction))

	currentMessage = output

	lastRevision = int(transaction.split(&#039;-&#039;)[0]) - 1

	# Empty repositories have no messages
	if lastRevision  0:
			sys.stderr.write('Regex \'%s\' matched \'%s\' on line(s): %s\n' % (regex, fileName, badLines))

	return matches


# Checks a PHP file for syntax errors
def checkPHPSyntax(svnPath, transaction, fileName):
	# Run svnlook to get the file contents
	output = commandOutput('%s cat %s %s --transaction %s' % (SVNLOOK, svnPath, fileName, transaction))

	# Run PHP syntax checking on the file contents
	command = (PHP, '-l')
	process = subprocess.Popen(command, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
	output = process.communicate(fileContents)[0]
	process.wait()

	if 0 != process.returncode:
		sys.stderr.write('Found syntax errors in \'%s\':' % fileName)
		# Print the offending lines that were returned from php -l
		for line in output:
			sys.stderr.write(line)
		return 1 # Error found

	return 0 # No errors


svnPath = sys.argv[1]
transaction = sys.argv[2]
files = getChangedFiles(svnPath, transaction)

errorCount = checkMessageLen(svnPath, transaction, MIN_MESSAGE_LENGTH)
errorCount += checkRepeatMessage(svnPath, transaction)

for file in files:
	# Prefer tabs for indentation
	# Skip .txt files
	if not file.endswith(&quot;.txt&quot;) and not file.endswith(&quot;.sql&quot;):
		errorCount = errorCount + stringsInFile(svnPath, transaction, [' {4}'], file)

	# Check PHP syntax
	if file.endswith('.php'):
		errorCount += checkPHPSyntax(svnPath, transaction, file)

	# C and C++ files should not use digraphs or trigraphs
	digraph = '%s|%s|%s|%s|%s' % ('&amp;lt;:&#039;, &#039;', ':&amp;gt;', '%:')
	trigraph = '\?\?[=/\'()!-]'
	if file.endswith(('.c', '.cpp', '.cxx', '.cc', '.C', '.h', '.hpp')):
		errorCount += stringsInFile(svnPath, transaction, [digraph, trigraph], file)

sys.exit(errorCount)
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brskari.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brskari.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brskari.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brskari.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brskari.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brskari.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brskari.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brskari.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brskari.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brskari.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brskari.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brskari.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brskari.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brskari.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=9&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brskari.wordpress.com/2010/05/24/a-subversion-pre-commit-hook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8dc7ccf7db4e2405001c587ac576758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bskari</media:title>
		</media:content>
	</item>
		<item>
		<title>Compression before encryption</title>
		<link>http://brskari.wordpress.com/2010/03/21/compression-before-encryption/</link>
		<comments>http://brskari.wordpress.com/2010/03/21/compression-before-encryption/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 00:08:00 +0000</pubDate>
		<dc:creator>bskari</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brskari.wordpress.com/2010/03/21/compression-before-encryption</guid>
		<description><![CDATA[If you&#8217;re going to be compressing and encrypting some data, you should do the compression first. Why? There are several reasons: Compressing it last won&#8217;t reduce the file size much. Good encryption should make any input data (especially redundant data) &#8230; <a href="http://brskari.wordpress.com/2010/03/21/compression-before-encryption/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=8&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re going to be compressing and encrypting some data, you should do the compression first. Why? There are several reasons:
<ul>
<li><b>Compressing it last won&#8217;t reduce the file size much.</b> Good encryption should make any input data (especially redundant data) appear random. But compression works by removing redundancy, and doesn&#8217;t work well on random data. You can see a good example of this <a href="http://lists.gnupg.org/pipermail/gnupg-users/2007-June/031382.html">here</a>, where encrypting a file and then compressing it actually made it larger than the original!
<li><b>Compressing it should decrease the effectiveness of some attacks.</b> Compression works by reducing the redundancy in the data. A common cryptanalysis method is <a href="http://en.wikipedia.org/wiki/Frequency_analysis">frequency analysis</a>, which relies on finding repeated data. Compressing it should reduce its effectiveness!
<li><b><a href="http://en.wikipedia.org/wiki/Brute_force_attack">Brute force attacks</a> will take longer.</b> Brute force attacks work by trying various keys and decrypting the data and checking if the output data makes any sense. By compressing it first, an attacker must decrypt the data and then decompress it before seeing if the output data makes any sense. This takes much longer, and if an attacker doesn&#8217;t know you&#8217;re compressing the data at all, they might never break the encryption.
</ul>
<p>I wanted to see how effective the third point was, so I wrote a Python script that encrypted a short message and used a brute force attack to break it. Then I repeated the experiment, but compressed it using <a href="http://en.wikipedia.org/wiki/Gzip">gzip</a> before encrypting it. Here&#8217;s how long it took on average, in seconds, to guess a single password:</p>
<table border="1" style="background-color:#FFFFFF;" width="70%" cellpadding="3" cellspacing="1"> <br />
<tr> 
<td><b>Password length:</b></td>
<p> 
<td><b>Zipped:</b></td>
<p> 
<td><b>Not zipped:</b></td>
<p> </tr>
<p> <br />
<tr> 
<td>2 letters</td>
<p> 
<td>0.021</td>
<p> 
<td>0.002</td>
<p> </tr>
<p> <br />
<tr> 
<td>3 letters</td>
<p> 
<td>0.546</td>
<p> 
<td>0.061</td>
<p> </tr>
<p> <br />
<tr> 
<td>4 letters</td>
<p> 
<td>13.612</td>
<p> 
<td>1.551</td>
<p> </tr>
<p></table>
<p>As you can see, compressing it before encrypting it took about 9 times as long to break.</p>
<p>Details: A short message was chosen, specifically, &#8220;<tt>a message</tt>&#8220;, to encrypt. Because gzip is a block compression algorithm, an attacker only needs to decompress the first bytes rather than the whole file, so I wanted to keep the message short to simulate this. I used 128-bit <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a>, using a password with only lower case letters. In each iteration, a random password was chosen and both the zipped and unzipped versions were tested. The test was run 1000 times for each password length.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brskari.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brskari.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brskari.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brskari.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brskari.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brskari.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brskari.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brskari.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brskari.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brskari.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brskari.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brskari.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brskari.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brskari.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=8&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brskari.wordpress.com/2010/03/21/compression-before-encryption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8dc7ccf7db4e2405001c587ac576758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bskari</media:title>
		</media:content>
	</item>
		<item>
		<title>Test MySQL password strength</title>
		<link>http://brskari.wordpress.com/2010/03/05/test-mysql-password-strength/</link>
		<comments>http://brskari.wordpress.com/2010/03/05/test-mysql-password-strength/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 01:50:00 +0000</pubDate>
		<dc:creator>bskari</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://brskari.wordpress.com/2010/03/05/test-mysql-password-strength</guid>
		<description><![CDATA[Newer versions of MySQL stores passwords using a double SHA-1 hash. Because of this, administrators can&#8217;t tell what someone&#8217;s password is. What if you want to make sure no users are using weak passwords? This is a simple Python script &#8230; <a href="http://brskari.wordpress.com/2010/03/05/test-mysql-password-strength/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=7&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
Newer versions of MySQL stores passwords using a double <a href="http://en.wikipedia.org/wiki/SHA_hash_functions">SHA-1 hash</a>. Because of this, administrators can&#8217;t tell what someone&#8217;s password is. What if you want to make sure no users are using weak passwords?</p>
<p>
This is a simple Python script that will connect to your local MySQL database, pull out the password hashes for all users, and either run a dictionary search or a brute force search on it. Either give it an argument for the dictionary file, or give it a number for the length of passwords you want to test. If you want to use a different character set (e.g. include special characters), change the <tt>characterSet</tt> variable near the top of the script.</p>
<p>
On my system, I was able to test around 50,000 words per second. <b>Note that this cannot be used to recover the root MySQL password</b>, as it requires the root password to connect to the database in the first place.<br />
<pre class="brush: python;">
#!/usr/bin/python
 
import MySQLdb
import sha
import sys
import os
import getpass
 
alpha = &quot;abcdefghijklmnopqrstuvwxyz&quot;
numbers = &quot;0123456789&quot;
# Set this to a string with the character set you want to check
# Examples:
characterSet = alpha
#characterSet = alpha + alpha.upper()
#characterSet = numbers
#characterSet = alpha + alpha.upper() + numbers
 
def recurse(width, logins):
  for i in range(0, width + 1):
    print &quot;Checking width %d&quot; % i
    recurse2(i, logins, 0, &quot;&quot;)
    print &quot;&quot;
 
def recurse2(width, logins, position, string):
  for char in characterSet:
    # Show progress
    if position == 0:
      print char,
      sys.stdout.flush()
 
    if (position &lt; width - 1):
      recurse2(width, logins, position + 1, string + char)
    else:
      hash = sha.new(sha.new(string + char).digest())\
          .hexdigest()
      for login in logins:
        if hash == login[2]:
          print &quot;\n'%s'@'%s': '%s'\n&quot; %\
              (login[0], login[1], string + char)
          logins.remove(login)
 
if len(sys.argv) &gt; 1:
  password = getpass.getpass('Enter the root password: ')
  conn = MySQLdb.connect(host = &quot;localhost&quot;,
    user = &quot;root&quot;,
    passwd = password,
    db = &quot;mysql&quot;)
  cursor = conn.cursor()
  cursor.execute(&quot;SELECT User, Host, Password from user;&quot;)
  logins = cursor.fetchall()
  cursor.close()
  conn.close()
 
  # Preprocess the logins
  processed = []
  for login in logins:
    ignore = False
    # Ignore empty passwords
    if 0 == len(login[2]):
      print &quot;'%s'@'%s' has empty password, ignoring&quot; %\
          (login[0], login[1])
      ignore = True
    # Ignore duplicates
    for p in processed:
      if p[2] == login[2][1:].lower():
        print &quot;'%s'@'%s' has same password as '%s'@'%s', ignoring&quot; %\
            (login[0], login[1], p[0], p[1])
        ignore = True
    if not ignore:
      processed.append((login[0], login[1], login[2][1:].lower()))
 
  if os.path.isfile(sys.argv[1]):
    f = open(sys.argv[1])
    lines = f.readlines()
    f.close()
 
    for line in lines:
      hash = sha.new(sha.new(line[:-1]).digest()).hexdigest()
      for login in processed:
        if hash == login[2]:
          print &quot;'%s'@'%s': '%s'&quot; % (login[0], login[1], line[:-1])
          break
  else:
    try:
      depth = int(sys.argv[1])
    except:
      print &quot;Usage: %s [dictionary file | brute force depth]&quot; % sys.argv[0]
    recurse(depth, processed)
else:
  print &quot;Usage: %s [dictionary file | brute force depth]&quot; % sys.argv[0]
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brskari.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brskari.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brskari.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brskari.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brskari.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brskari.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brskari.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brskari.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brskari.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brskari.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brskari.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brskari.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brskari.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brskari.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=7&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brskari.wordpress.com/2010/03/05/test-mysql-password-strength/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8dc7ccf7db4e2405001c587ac576758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bskari</media:title>
		</media:content>
	</item>
		<item>
		<title>Convert mkv files to xvid for Xbox 360</title>
		<link>http://brskari.wordpress.com/2009/11/14/convert-mkv-files-to-xvid-for-xbox-360/</link>
		<comments>http://brskari.wordpress.com/2009/11/14/convert-mkv-files-to-xvid-for-xbox-360/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 23:55:00 +0000</pubDate>
		<dc:creator>bskari</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://brskari.wordpress.com/2009/11/14/convert-mkv-files-to-xvid-for-xbox-360</guid>
		<description><![CDATA[Ushare is an excellent media server that allows you to watch videos, listen to music and view pictures on your Xbox 360 that are stored on another computer. Unfortunately, the Xbox can be somewhat finicky about which formats it supports &#8230; <a href="http://brskari.wordpress.com/2009/11/14/convert-mkv-files-to-xvid-for-xbox-360/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=6&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://ushare.geexbox.org/">Ushare</a> is an excellent media server that allows you to watch videos, listen to music and view pictures on your Xbox 360 that are stored on another computer. Unfortunately, the Xbox can be somewhat finicky about which formats it supports &#8211; and it doesn&#8217;t support <a href="http://en.wikipedia.org/wiki/Matroska">mkv</a> files. To convert it to a file that the Xbox does support, you can use mencoder as follows:<br />
<code><br />
mencoder inputFile.mkv -ffourcc XVID -ovc lavc -lavcopts vcodec=mpeg4:threads=8:vbitrate=1000:cmp=2:subcmp=2:trell=yes:v4mv=yes:mbd=2 -oac lavc -lavcopts acodec=ac3:abitrate=128 -channels 2 -o outputFile.avi<br />
</code><br />
If the original file is high quality, you&#8217;ll probably want to increase the vbitrate parameter to prevent the quality from degrading. If you have surround sound, you should set the number of channels to 6 and set the audio bitrate higher (384 is probably a good choice) as well.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brskari.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brskari.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brskari.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brskari.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brskari.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brskari.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brskari.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brskari.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brskari.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brskari.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brskari.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brskari.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brskari.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brskari.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=6&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brskari.wordpress.com/2009/11/14/convert-mkv-files-to-xvid-for-xbox-360/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8dc7ccf7db4e2405001c587ac576758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bskari</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Javadoc with Eclipse in Ubuntu</title>
		<link>http://brskari.wordpress.com/2009/01/10/using-javadoc-with-eclipse-in-ubuntu/</link>
		<comments>http://brskari.wordpress.com/2009/01/10/using-javadoc-with-eclipse-in-ubuntu/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 21:59:00 +0000</pubDate>
		<dc:creator>bskari</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://brskari.wordpress.com/2009/01/10/using-javadoc-with-eclipse-in-ubuntu</guid>
		<description><![CDATA[When you&#8217;re using Eclipse to program in Java and you hover over a keyword (like a function name, a package, or a class), some Javadoc will be displayed, showing what the keyword does and how it is used. The default &#8230; <a href="http://brskari.wordpress.com/2009/01/10/using-javadoc-with-eclipse-in-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=5&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
When you&#8217;re using Eclipse to program in Java and you hover over a keyword (like a function name, a package, or a class), some Javadoc will be displayed, showing what the keyword does and how it is used. The default installation of Eclipse did not include Javadoc, so hovering over keywords only gave me a message that Javadoc wasn&#8217;t installed. Here&#8217;s how to get Javadoc installed and working.</p>
<p>
First, enter<br />
<tt>sudo apt-get install sun-java6-doc</tt><br />
The installer will prompt you to download a zip file containing the documentation from Sun. Bring up Firefox and head to <a href="http://java.sun.com/javase/downloads/">Sun&#8217;s website</a>. Click the Download link next to Java SE 6 Documentation, agree to the terms and click Continue. Click the zip file to download the documentation.</p>
<p>
When the download finishes, in another terminal, enter<br />
<tt>sudo mv /path/to/zip/file/documentation.zip /tmp/jdk-6-doc.zip</tt><br />
You need to rename the file to <tt>jdk-6-doc.zip</tt> for the installer to work. Enter<br />
<tt>sudo chown root:root /tmp/jdk-6-doc.zip</tt><br />
to change the file permissions.</p>
<p>
Back in the first terminal, hit enter, and the installer should continue. When it finishes, in Eclipse, click Window &#8211; Preferences &#8211; Java &#8211; Installed JREs, and click the JRE (mine was called java-sun-1.6.0.07). Click Edit, and use Shift+Click to select all the JRE system libraries. Click Javadoc Location, and enter <tt>file:/usr/lib/jvm/java-6-sun/docs/api/</tt> in the box. Click Validate to test it (you can open it in your browser to double check), and click OK out of all the dialogs. Javadoc should now be working!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brskari.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brskari.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brskari.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brskari.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brskari.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brskari.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brskari.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brskari.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brskari.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brskari.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brskari.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brskari.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brskari.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brskari.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=5&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brskari.wordpress.com/2009/01/10/using-javadoc-with-eclipse-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8dc7ccf7db4e2405001c587ac576758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bskari</media:title>
		</media:content>
	</item>
		<item>
		<title>Booting multiple LiveCD&#8217;s from a single USB stick</title>
		<link>http://brskari.wordpress.com/2009/01/08/booting-multiple-livecds-from-a-single-usb-stick/</link>
		<comments>http://brskari.wordpress.com/2009/01/08/booting-multiple-livecds-from-a-single-usb-stick/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 06:49:00 +0000</pubDate>
		<dc:creator>bskari</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://brskari.wordpress.com/2009/01/08/booting-multiple-livecds-from-a-single-usb-stick</guid>
		<description><![CDATA[I love LiveCD&#8217;s &#8211; they let you try out an operating system or Linux distro without messing with your current installation. Recently, I&#8217;ve become hooked on LiveUSB distro&#8217;s that allow you to boot off of a USB stick rather than &#8230; <a href="http://brskari.wordpress.com/2009/01/08/booting-multiple-livecds-from-a-single-usb-stick/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=4&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
I love LiveCD&#8217;s &#8211; they let you try out an operating system or Linux distro without messing with your current installation. Recently, I&#8217;ve become hooked on LiveUSB distro&#8217;s that allow you to boot off of a USB stick rather than a CD. I tried putting <a href="http://www.remote-exploit.org/backtrack.html">Backtrack</a> on a 1 GB stick, and then <a href="http://damnsmalllinux.org/">DamnSmallLinux</a> on a 64 MB stick. I started wondering if it would be possible to put several distributions on a larger stick, and then boot from one of your choice. It turns out that it is possible, and here&#8217;s how.</p>
<p>
<span style="font-weight:bold;">Things you will need</span></p>
<ul>
<li>an i386 computer running Linux (other architectures won&#8217;t work with the bootloader)</li>
<li>ISO images of LiveCDs (or LiveUSBs) you want to run</li>
<li>a large USB stick that can hold all the images</li>
<li><b>Optional:</b> QEmu can be installed to test the stick, or boot LiveCD&#8217;s from within your host OS.</li>
</ul>
<p>
I started off by downloading five ISO images: <a href="http://www.belenix.org/">Belenix</a>, <a href="http://www.remote-exploit.org/backtrack.html">Backtrack</a>, <a href="http://www.freesbie.org/">Freesbie</a>, <a href="http://www.knoppix.net/">Knoppix</a>, and <a href="http://www.nimblex.net/">NimbleX</a>.</p>
<p>
Insert your USB stick. In a console, enter<br />
<tt>dmesg | tail</tt><br />
You should see something similar to<br />
<tt>sd 9:0:0:0: [sdc] Attached SCSI removable disk</tt><br />
My USB stick is therefore attached at <tt>/dev/sdc</tt>, although yours will probably be different. From here on out, I&#8217;ll refer to your drive as driveName. To make sure you have the right drive, as root, enter:<br />
<tt>fdisk -l /dev/driveName</tt><br />
It should report the size of your USB stick.</p>
<p>
We&#8217;re going to partition the USB stick for use with each LiveCD. <b>This will destroy all data on the stick! Make sure you&#8217;re using the correct drive from above too, or you might accidentally wipe your hard drive!</b><br />
As root, enter<br />
<tt>fdisk /dev/driveName</tt><br />
You can enter <tt>p</tt> to show the current partitions. It should list a number of partitions. Delete each of them by entering <tt>d</tt> and entering each number.<br />
When you&#8217;ve deleted them all, enter <tt>n</tt> for a new partition. Choose <tt>p</tt> for a primary partition, hit enter for the default, and enter <tt>+16M</tt> to make a 16 MB partition at the beginning of the drive. Enter <tt>a</tt> to make the partition bootable, and enter <tt>t</tt> to change the partition type. Enter <tt>6</tt> for the partition type.<br />
Now you&#8217;re going to make an extended partition, and logical partitions for each of your ISO images. First, note the size in MB of all of your ISO images. Mine were 696, 784, 672, 697, and 200. You can find these in another terminal by running<br />
<tt>ls -lh *.iso</tt><br />
in the directory containing your ISO images. When you use these numbers, you&#8217;ll want to add 5 MB to them to make sure they fit in the partition.<br />
In fdisk, enter <tt>n</tt> for new partition, <tt>e</tt> for extended, and enter twice to fill the rest of the drive. Enter <tt>n</tt>, <tt>l</tt> for logical, enter for the default, and <tt>+sizeM</tt>, where size is the size of your first ISO image <i>plus 5 MB</i>. In my case, I ran <tt>+701M</tt>. Repeat this procedure for the remainder of your ISO files.<br />When you are done, enter <tt>p</tt> to make sure everything looks right. Your output should look similar to this:
<pre class="source-code"><code>
Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1           3       24066    6  FAT16
/dev/sdc2               4         488     3895762+   5  Extended
/dev/sdc5               4          97      717824+  83  Linux
/dev/sdc6              98         203      809984+  83  Linux
/dev/sdc7             204         294      693248   83  Linux
/dev/sdc8             295         388      718848+  83  Linux
/dev/sdc9             389         416      209920+  83  Linux
</code></pre>
<p>
If everything looks good, enter <tt>w</tt> to write the changes to the USB stick. If you messed up, you can enter <tt>q</tt> to quit and try again</p>
<p>
Now we&#8217;re going to install the bootloader. Most Linux distributions use GRUB or LILO, which are great, but since we&#8217;re trying to boot ISO images off of a USB stick, we&#8217;re going to use something a little different. <a href="http://gujin.sourceforge.net/">Gujin</a> is an alternative bootloader that can boot all sorts of things, and will automatically scan your partitions to look for Linux kernels. It&#8217;s a handy piece of software, and if you find it useful, you should consider <a href="http://sourceforge.net/donate/index.php?group_id=15465">donating</a>. (Disclaimer: I don&#8217;t know the author and make no money off of your donation)</p>
<p>
First, format the first partition on your USB stick by entering<br />
<tt>mkfs.msdos -F 16 /dev/driveName1</tt><br />
Then, download the <a href="http://sourceforge.net/project/showfiles.php?group_id=15465&amp;package_id=76732&amp;release_id=574220"><br />
Gujin installer</a> and unzip it. Enter the <tt>gujin-install</tt> directory and run<br />
<tt>./instboot boot.bin /dev/driveName1 --disk=BIOS:0x80 -w</tt><br />
This will install the bootloader to the first partition. The -w option prints out useful debugging information.</p>
<p>
At this point, your USB stick should be bootable. You can test it in another terminal by running<br />
<tt>qemu -usb /dev/diskDrive</tt><br />
Your output should look similar to this:<br /><img src="http://www.skari.org/blog/gujin-start.gif" /></p>
<p>
Now, you&#8217;re ready to copy the ISO images onto your disk. Enter<br />
<tt>fdisk -l /dev/diskDrive</tt><br />
and find the number of the first partition under &#8216;extended&#8217; block. For example, mine above was sdc5. This is where the first ISO image will go. Make sure you&#8217;re using the right ISO image for the partition size, and enter<br />
<tt>cat nameOfImage1.iso &gt; /dev/diskImage5</tt><br />
to copy the ISO image to partition 5. When that finishes, similarly copy the other ISO images onto the other partitions.<br />
<tt>cat nameOfImage2.iso &gt; /dev/diskImage6</tt><br />
<tt>cat nameOfImage3.iso &gt; /dev/diskImage7</tt><br />
<tt>...</tt></p>
<p>
You can test your USB stick in another terminal again by running<br />
<tt>qemu -usb /dev/diskDrive</tt><br />
The full Gujin menu should now be displayed!<br />
<img src="http://www.skari.org/blog/gujin-installed.gif" /><br />
At this point, I had to scroll down a page (using Page Down). The options you want are listed with the code 0&#215;80 and the &#8216;<a href="http://en.wikipedia.org/wiki/El_Torito_%28CD-ROM_standard%29">El Torito</a>&#8216; option:<br /><img src="http://www.skari.org/blog/gujin-installed2.gif" /><br />
Press the appropriate key (F1, F2, etc.) to boot and you should see that CD&#8217;s particular GRUB screen!<br />
<img src="http://www.skari.org/blog/gujin-nimblex.gif" /></p>
<p>
If everything works, you should be able to boot any of your LiveCDs from USB.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/brskari.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/brskari.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/brskari.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/brskari.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/brskari.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/brskari.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/brskari.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/brskari.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/brskari.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/brskari.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/brskari.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/brskari.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/brskari.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/brskari.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=brskari.wordpress.com&amp;blog=20018861&amp;post=4&amp;subd=brskari&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://brskari.wordpress.com/2009/01/08/booting-multiple-livecds-from-a-single-usb-stick/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8dc7ccf7db4e2405001c587ac576758?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bskari</media:title>
		</media:content>

		<media:content url="http://www.skari.org/blog/gujin-start.gif" medium="image" />

		<media:content url="http://www.skari.org/blog/gujin-installed.gif" medium="image" />

		<media:content url="http://www.skari.org/blog/gujin-installed2.gif" medium="image" />

		<media:content url="http://www.skari.org/blog/gujin-nimblex.gif" medium="image" />
	</item>
	</channel>
</rss>
