<?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>edeca.net &#187; Computing</title>
	<atom:link href="http://edeca.net/wp/category/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://edeca.net/wp</link>
	<description>Musings of a geek</description>
	<lastBuildDate>Sun, 05 Feb 2012 21:28:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Stupid password rules</title>
		<link>http://edeca.net/wp/2011/11/stupid-password-rules/</link>
		<comments>http://edeca.net/wp/2011/11/stupid-password-rules/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 20:24:11 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[jive]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=675</guid>
		<description><![CDATA[Today I forgot the password for a site I use only occasionally. This is rare, as I have a number of password schemes that I use to create a password unique to each site. After clicking the reset password link, I am confronted with the &#8220;password strength checker&#8221; below: This list of rules doesn&#8217;t fit [...]]]></description>
			<content:encoded><![CDATA[<p>Today I forgot the password for a site I use only occasionally.  This is rare, as I have a number of password schemes that I use to create a password unique to each site.  After clicking the reset password link, I am confronted with the &#8220;password strength checker&#8221; below:</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2011/11/password_strength1.png"><img src="http://edeca.net/wp/wp-content/uploads/2011/11/password_strength1.png" alt="" title="Password strength verification" width="203" height="186" class="aligncenter size-full wp-image-676" /></a></p>
<p>This list of rules doesn&#8217;t fit very well with my password scheme, primarily because what I computed in my head fails the test for uppercase characters.  </p>
<p>Using the phrase &#8220;<i>this is an unbelievably long password that would take a very long time to crack</i>&#8221; fails this rule too, as well as the tests for a number and punctuation.  I&#8217;m not suggesting that this is a good password, but it&#8217;s certainly better than &#8220;<i>aA1!bcde</i>&#8221; which passes all the rules.  These 8 characters are trivial to brute force on any modern machine even if the underlying software uses a salted hash.</p>
<p>The offending software appears to be <a href="http://www.jivesoftware.com/">Jive</a>, who perhaps need to set some more sensible defaults on their login system.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/11/stupid-password-rules/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reporting a phishing site, is it worth it?</title>
		<link>http://edeca.net/wp/2011/07/reporting-a-phishing-site-is-it-worth-it/</link>
		<comments>http://edeca.net/wp/2011/07/reporting-a-phishing-site-is-it-worth-it/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 21:19:18 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=660</guid>
		<description><![CDATA[So I thought I was being a good internet citizen when I received the following email a week ago: Dear User; Please update to our new server click here to begin http://glacierdesign.ca/phpform/forms/form1.html Thanks and have a wonderful day. Webmaster The site looked like this: For a while I was confused, after all I run my [...]]]></description>
			<content:encoded><![CDATA[<p>So I thought I was being a good internet citizen when I received the following email a week ago:</p>
<blockquote><p>Dear User;</p>
<p>Please update to our new server click here to begin</p>
<p>http://glacierdesign.ca/phpform/forms/form1.html</p>
<p>Thanks and have a wonderful day.</p>
<p>Webmaster</p></blockquote>
<p>The site looked like this:</p>
<p><a href="http://edeca.net/wp/wp-content/uploads/2011/07/PhishingScreenshot.png"><img src="http://edeca.net/wp/wp-content/uploads/2011/07/PhishingScreenshot-300x284.png" alt="Screenshot of a phishing website" title="Phishing screenshot" width="300" height="284" class="aligncenter size-medium wp-image-661" /></a></p>
<p>For a while I was confused, after all I run my own email.  Did I really need to remind myself of my password?  And what had happened to my unlimited quota?</p>
<p>Then I figured it was obviously a <a href="http://www.microsoft.com/security/online-privacy/phishing-symptoms.aspx">phishing email</a>, so I turned to &#8220;do no evil&#8221; Google to report it.  If the site was included on their block list then users of popular browsers would automatically receive a warning if they tried to go to it.</p>
<p>I tried using the <a href="http://www.google.com/safebrowsing/report_phish/">Google report phishing form</a>, even filling in the headers and body of the email in the comments box.  Unfortunately, a week later the site is still up and presumably conning less savvy users.</p>
<p>Surprised by Google I&#8217;ve just tried the <a href="https://badwarebusters.org/community/submit">badwarebusters.org report feature</a>, let&#8217;s hope it works slightly more efficiently!</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/07/reporting-a-phishing-site-is-it-worth-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding fake ethernet headers to pcap files</title>
		<link>http://edeca.net/wp/2011/06/adding-fake-ethernet-headers-to-pcap-files/</link>
		<comments>http://edeca.net/wp/2011/06/adding-fake-ethernet-headers-to-pcap-files/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 10:32:48 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[pcap]]></category>
		<category><![CDATA[tcp]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=652</guid>
		<description><![CDATA[Occasionally I see packet captures which have been saved as Raw IP, which can really mess up many of the tools developed to deal with pcap. Anything based on libnids, including the Perl module I maintain, cannot deal with it and will produce no (or bizarre) results. Wireshark displays these captures just fine, with &#8220;Raw [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally I see packet captures which have been saved as Raw IP, which can really mess up many of the tools developed to deal with pcap.  Anything based on libnids, including the Perl module I maintain, cannot deal with it and will produce no (or bizarre) results.  Wireshark displays these captures just fine, with &#8220;Raw packet data &#8211; no link information available&#8221; just above the IP layer.</p>
<p>There are many situations where packet capture will lack the ethernet header for a good reason, but if you simply want to run it through other tools that deal only with IP and above then adding a fake header is a viable choice.  </p>
<p>Fortunately, adding a &#8220;fake&#8221; ethernet header to these pcap files using <a href="http://tcpreplay.synfin.net/wiki/tcprewrite">tcprewrite</a> (part of the tcpreplay suite) is simple:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ tcprewrite --dlt=enet --enet-dmac=00:11:22:33:44:55 --enet-smac=66:77:88:99:AA:BB --infile=input.pcap --outfile=output.pcap</div></div>
<p>Overriding the output data layer type is essential, as is providing the ethernet MAC addresses of the two endpoints.  That&#8217;s all there is to it.</p>
<p>tcprewrite is available as part of the Debian package <a href="http://packages.debian.org/squeeze/tcpreplay">tcpreplay</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/06/adding-fake-ethernet-headers-to-pcap-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Razor view engine with S#arp architecture</title>
		<link>http://edeca.net/wp/2011/03/using-the-razor-view-engine-with-sarp-architecture/</link>
		<comments>http://edeca.net/wp/2011/03/using-the-razor-view-engine-with-sarp-architecture/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 16:37:34 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[razor]]></category>
		<category><![CDATA[sharp architecture]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=619</guid>
		<description><![CDATA[Whilst the Sharp Architecture maintainers have little interest in Razor (see here), I have been using it recently and like the syntax. Swapping out a default project to use Razor instead of (or in addition to) the default engine isn&#8217;t too difficult. Enabling the view engine In Global.asax, find the few lines below in Application_Start(): [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst the Sharp Architecture maintainers have little interest in Razor (<a href="http://blog.sharparchitecture.net/post/Sharp-Architecture-Road-Map.aspx#id_00d1fece-196d-42bf-bd1e-5246391c881b">see here</a>), I have been using it recently and like the syntax.</p>
<p>Swapping out a default project to use Razor instead of (or in addition to) the default engine isn&#8217;t too difficult.</p>
<h3>Enabling the view engine</h3>
<p>In <tt>Global.asax</tt>, find the few lines below in <tt>Application_Start()</tt>:</p>
<div class="codecolorer-container csharp twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ViewEngines<span style="color: #008000;">.</span><span style="color: #0000FF;">Engines</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Clear</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
ViewEngines<span style="color: #008000;">.</span><span style="color: #0000FF;">Engines</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> AreaViewEngine<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>We need to register Razor here, by adding the line below:</p>
<div class="codecolorer-container csharp twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ViewEngines<span style="color: #008000;">.</span><span style="color: #0000FF;">Engines</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> RazorViewEngine<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>If you do not plan on using the default view engine then you can comment the existing line and remove all the <tt>.aspx</tt> files from the Views directory.</p>
<h3>Configuring the default layout</h3>
<p>Create an empty file called <tt>_ViewStart.cshtml</tt> in the root of your Views folder:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">@{<br />
Layout = &quot;~/Views/Shared/_Layout.cshtml&quot;;<br />
}</div></div>
<p>This code runs before any other view code in this directory or below and sets the default layout so you don&#8217;t have to set it manually in every view (see the <a href="http://www.asp.net/learn/whitepapers/mvc3-release-notes">MVC3 release notes</a> for more information).</p>
<h3>Create a basic template</h3>
<p>Lastly we need the layout which was referenced above, created as <tt>Views/Shared/_Layout.cshtml</tt>.  You could copy and paste this from a new MVC Razor application, which is what I did to end up with the template below:</p>
<div class="codecolorer-container html4strict twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:500px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>MyApp - @ViewBag.Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/link.html"><span style="color: #000000; font-weight: bold;">link</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;@Url.Content(&quot;</span>~<span style="color: #66cc66;">/</span><span style="color: #000066;">Content</span><span style="color: #66cc66;">/</span>Site.css<span style="color: #ff0000;">&quot;)&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;@Url.Content(&quot;</span>~<span style="color: #66cc66;">/</span>Scripts<span style="color: #66cc66;">/</span>jquery-1.4.4.min.js<span style="color: #ff0000;">&quot;)&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;header&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;title&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span>MyApp<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;main&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @RenderBody()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footer&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></div>
<h3>Conclusion</h3>
<p>This is all that should be necessary to enable Razor and start to return basic views from your controllers.  From here on you can create views just like in the MVC3 tutorials.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2011/03/using-the-razor-view-engine-with-sarp-architecture/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Welcome to the IPv6 world</title>
		<link>http://edeca.net/wp/2010/11/welcome-to-the-ipv6-world/</link>
		<comments>http://edeca.net/wp/2010/11/welcome-to-the-ipv6-world/#comments</comments>
		<pubDate>Sun, 07 Nov 2010 11:04:59 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=593</guid>
		<description><![CDATA[This blog can now be reached over IPv6 (or ipv6.edeca.net), which is surely the final nail in the coffin of IPv4 across the internet. After deciding that I knew little about the practical aspects of IPv6 I spoke to my VPS provider, Bytemark, and asked for some addresses. Configuring Debian was simple, as it already [...]]]></description>
			<content:encoded><![CDATA[<p>This blog can now be reached over IPv6 (or <a href="http://ipv6.edeca.net">ipv6.edeca.net</a>), which is surely the final nail in the coffin of IPv4 across the internet.<br />
<span id="more-593"></span><br />
After deciding that I knew little about the practical aspects of IPv6 I spoke to my VPS provider, Bytemark, and asked for some addresses.  Configuring Debian was simple, as it already comes with a dual stack and just needs the public IPv6 block adding to the existing link-local address.</p>
<p>After a week I have seen a number of accesses to this site using IPv6.  I also added an AAAA record for my mail exchanger at the same time, but so far haven&#8217;t seen any legitimate messages delivered.  SSH login attempts have also been absent, which is good as apparently denyhosts doesn&#8217;t support IPv6 just yet.</p>
<p>It is worth considering security too.  By default, ip6tables is permissive in ALLOW mode.  This has security implications for link-local addresses if the attacker is on the same network segment, but definitely needs thought if you add routable IPv6 addresses.  I copied my existing set of iptables rules and modified them where necessary, only allowing the essential services.</p>
<p>Be the first to comment from an IPv6 address!</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2010/11/welcome-to-the-ipv6-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Net::LibNIDS 0.1 released</title>
		<link>http://edeca.net/wp/2010/06/netlibnids-0-1-released/</link>
		<comments>http://edeca.net/wp/2010/06/netlibnids-0-1-released/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 20:53:55 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=543</guid>
		<description><![CDATA[The other day I pushed a new version of Net::LibNIDS to CPAN. It interfaces with the C library libnids in order to provide TCP stream reassembly and returns the data to your Perl callback. The API for the Perl module is still nasty but a bunch of bugs have been fixed which make it quite [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I pushed a new version of <a href="http://search.cpan.org/~edeca/Net-LibNIDS/LibNIDS.pm">Net::LibNIDS</a> to CPAN.  It interfaces with the C library <a href="http://libnids.sourceforge.net/">libnids</a> in order to provide TCP stream reassembly and returns the data to your Perl callback.<br />
<span id="more-543"></span><br />
The API for the Perl module is still nasty but a bunch of bugs have been fixed which make it quite usable.  I plan on uploading some other modules in the coming months which make utilise Net::LibNIDS to do their work.</p>
<p>If you use it, make sure you use the latest version of libnids (currently v1.24) as it fixes a bunch of important bugs.  This currently isn&#8217;t in Debian/Ubuntu and the maintainer has disappeared, so compile from source for now.  Red Hat based distributions get it easy it seems, as somebody has already compiled it for RHEL4 or later.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2010/06/netlibnids-0-1-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Better than grep</title>
		<link>http://edeca.net/wp/2010/05/better-than-grep/</link>
		<comments>http://edeca.net/wp/2010/05/better-than-grep/#comments</comments>
		<pubDate>Sat, 29 May 2010 19:56:50 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=534</guid>
		<description><![CDATA[Anybody who has used command-line systems for a serious amount of time will love grep. But today I stumbled across ack, which (for many things) is better than grep and a whole lot nicer to use. The best bit? It&#8217;s pure Perl, therefore also uses real Perl regular expressions. Yes, there might be grep --perl-regexp, [...]]]></description>
			<content:encoded><![CDATA[<p>Anybody who has used command-line systems for a serious amount of time will love grep.  But today I stumbled across ack, which (for many things) is better than grep and a whole lot nicer to use.</p>
<p>The best bit?  It&#8217;s pure Perl, therefore also uses real Perl regular expressions.  Yes, there might be <tt>grep --perl-regexp</tt>, but nobody bothers compiling that in.  Plus ack has some other neat features.</p>
<p>See more at the <a href="http://betterthangrep.com/">ack website</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2010/05/better-than-grep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Limiting command runtime in Linux</title>
		<link>http://edeca.net/wp/2010/05/limiting-command-runtime-in-linux/</link>
		<comments>http://edeca.net/wp/2010/05/limiting-command-runtime-in-linux/#comments</comments>
		<pubDate>Sun, 02 May 2010 10:55:10 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=474</guid>
		<description><![CDATA[It is sometimes useful to limit the running time of a process, either to stop it from using up all resources or to make sure nightly cron jobs don&#8217;t continue into working hours. I needed this for rsync, to let a remote backup server slowly catch up if large amounts of data were added to [...]]]></description>
			<content:encoded><![CDATA[<p>It is sometimes useful to limit the running time of a process, either to stop it from using up all resources or to make sure nightly cron jobs don&#8217;t continue into working hours.</p>
<p>I needed this for rsync, to let a remote backup server slowly catch up if large amounts of data were added to the live server during the day.  A <a href="http://old.nabble.com/Limit-rsync-running-time-td25490601.html">useful post</a> on the rsync mailing list discusses an rsync patch but also the <tt>timeout</tt> command.</p>
<p>After installing (the Debian package is simply <tt>timeout</tt>) it is as easy as running with the number of seconds to run for:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ timeout 21600 rsync -a ...</div></div>
<p>It is also possible to specify the signal which will be sent to a program, which is useful if you do not want to simply send SIGKILL.  I used SIGHUP in the hope that rsync would have a chance to exit gracefully:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ timeout -1 21600 rsync -a ...</div></div>
<p>A full list of signals and their numeric values can be found in <tt>man 1 kill</tt>.</p>
<p>A <a href="http://johannes.jakeapp.com/blog/category/fun-with-linux/200901/bash-timeouts">wrapper script</a> is also available from Johannes Buchner.  </p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2010/05/limiting-command-runtime-in-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Obtaining DNS servers automatically on Cisco ADSL routers</title>
		<link>http://edeca.net/wp/2010/04/obtaining-dns-servers-automatically-on-cisco-adsl-routers/</link>
		<comments>http://edeca.net/wp/2010/04/obtaining-dns-servers-automatically-on-cisco-adsl-routers/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 21:00:54 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=410</guid>
		<description><![CDATA[I noticed tonight that my Cisco 837 was using hard-coded DNS servers which were no longer valid, hence breaking my internets. In order to keep them updated automatically, I added the following to the appropriate dialer configuration (interface Dialer0 on an 8xx): ppp ipcp dns request This causes the router to request DNS server addresses [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed tonight that my Cisco 837 was using hard-coded DNS servers which were no longer valid, hence breaking my internets.  In order to keep them updated automatically, I added the following to the appropriate dialer configuration (<tt>interface Dialer0</tt> on an 8xx):</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ppp ipcp dns request</div></div>
<p>This causes the router to request DNS server addresses when the PPP session is negotiated (when it &#8220;dials up&#8221; to ADSL).</p>
<p>After reconnecting the PPP session (either reload or shutdown the interface and then bring it back) it is possible to check that DNS servers have been obtained using <tt>sh host</tt>:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">router#sh host<br />
Default domain is not set<br />
Name/address lookup uses domain service<br />
Name servers are 62.69.62.6, 62.69.62.7</div></div>
<p>If the router is running a DNS server it is possible to direct DHCP clients at the router IP instead, forcing them to use these same settings.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2010/04/obtaining-dns-servers-automatically-on-cisco-adsl-routers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dspam integration with dovecot</title>
		<link>http://edeca.net/wp/2010/03/dspam-integration-with-dovecot/</link>
		<comments>http://edeca.net/wp/2010/03/dspam-integration-with-dovecot/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 19:23:45 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Computing]]></category>

		<guid isPermaLink="false">http://edeca.net/wp/?p=374</guid>
		<description><![CDATA[In a previous message I spoke about training dspam automatically. The script I posted there works, but it&#8217;s not brilliant so I started looking for other ways of achieving spam training from the client. Whilst looking for alternatives I found the dovecot antispam plugin which seems almost perfect. Configure a spam folder (I called mine [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://edeca.net/wp/2010/02/training-dspam-from-thunderbird-junk-messages/">previous message</a> I spoke about training dspam automatically.  The script I posted there works, but it&#8217;s not brilliant so I started looking for other ways of achieving spam training from the client.<br />
<span id="more-374"></span><br />
Whilst looking for alternatives I found the <a href="http://johannes.sipsolutions.net/Projects/dovecot-antispam">dovecot antispam plugin</a> which seems almost perfect.  Configure a spam folder (I called mine &#8220;Junk&#8221; to integrate with Thunderbird) and it will detect when the user moves mail in or out of the folder.  This automatically trains as ham or spam, depending on the direction mail is moved.</p>
<p>I grabbed a <a href="http://johannes.sipsolutions.net/download/dovecot-antispam/">source tarball</a> from the website and started there.  Installing is simple:</p>
<ol>
<li>After extracting, copy <tt>defconfig</tt> to <tt>.config</tt></li>
<li>Edit <tt>.config</tt> to set the user and enable the backends you require</li>
<li>Run make and then make install (as root, obviously)</li>
<li>Edit the dovecot configuration to set plugin configuration</li>
</ol>
<p>I chose the <tt>dspam-exec</tt> backend, but read the documentation before using it as it will spawn the dspam binary for each mail moved in.</p>
<p>You should ensure that the user that the dspam-antispam plugin runs as is trusted by dspam (edit <tt>/etc/dspam/dspam.conf</tt> and ensure there is a <tt>Trust &lt;user&gt;</tt> line) <b>and</b> does not violate dovecot security settings (set at compile time).  On Debian, this seemed to mean running the plugin as <tt>root</tt>.</p>
<p>Editing the dovecot configuration includes enabling the plugin in the <tt>protocol imap</tt> section:</p>
<pre>mail_plugins = antispam</pre>
<p>And, for the dspam-exec plugin, configuring it like so:</p>
<pre># Which folder the antispam plugin monitors
antispam_spam = Junk
# Antispam trash folder
antispam_trash = trash;Trash;Deleted Items;Deleted Messages

antispam_signature = X-DSPAM-Signature
antispam_signature_missing = move

#===================
# dspam-exec plugin

# dspam binary
antispam_dspam_binary = /usr/bin/dspam

# semicolon-separated list of extra arguments to dspam
# (default unset i.e. none)
antispam_dspam_args = --deliver;--user;%u
# antispam_dspam_args = --deliver=;--user;%u  # % expansion done by dovecot
# antispam_dspam_args = --mode=teft</pre>
<p>This seems to be the minimum to get the dspam-exec backend working.  Note that configuration for other options will be different, if somebody fancies sharing a configuration that sends mail to <tt>&lt;user&gt;-spam@&lt;domain&gt;</tt> I&#8217;d be very grateful <img src='http://edeca.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks to Johannes for writing this plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://edeca.net/wp/2010/03/dspam-integration-with-dovecot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

