<?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>Kirrus' Blog &#187; tools</title>
	<atom:link href="http://kirrus.co.uk/tag/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://kirrus.co.uk</link>
	<description>MindDump. Photos. And random ramblings.</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:20:06 +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>USB Key reminder script</title>
		<link>http://kirrus.co.uk/2011/02/usb-key-reminder-script/</link>
		<comments>http://kirrus.co.uk/2011/02/usb-key-reminder-script/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 00:54:04 +0000</pubDate>
		<dc:creator>garreth</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://kirrus.co.uk/?p=601</guid>
		<description><![CDATA[Garreth shares a VBS visual basic script / logoff script to automatically remind windows users to take their usb memory stick with them when logging off.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s something for all you windows network admins out there.<br />
(I apologize in advance to Johnathon&#8217;s linux followers)</p>
<p>Here&#8217;s a little script I wrote to be used as a group policy logoff script to remind users to remove their USB memory sticks/keys when logging off.</p>
<p>I wrote it while working in IT Support for a High School, to help out our IT teachers and ourselves as we were weekly gathering a collection of various USB Memory Sticks and memory keys (and since i was the one trying to reunite them with their owners each week.)</p>
<p>It&#8217;s written in VBS so it&#8217;s perfect for using as a group policy in active directory on say a Windows 2003 server/XP network. I haven&#8217;t tried it on Vista, Windows 7, or Server 2008 because I wasn&#8217;t using those technologies at the time, but it will most likely work with Vista and Windows 7 when deployed from a 2k3 or 2k8 server.</p>
<p>It detects removable drives (the type it looks for can be modified) that are connected and won&#8217;t pop-up without a drive detected.</p>
<p>If a USB drive is connected, it pops up a dialog reminding the user to take their memory stick with them and then auto-closes after a few seconds (as not to hang the logoff procedure).</p>
<p>I hope this is usefull to someone. If you use it, please leave me a comment.<br />
[LICENCE GPL? NC-SA?]Also, feel free to modify and redistribute this script, but please don&#8217;t remove my details, as I&#8217;d like to know if it gets used and of any usefull additions others can think of.</p>
<p>[code]</p>
<p>' Script to display a list of drives connected to this machine<br />
' http://authors.aspalliance.com/brettb/VBScriptDrivesCollection.asp<br />
' MODIFIED to detect only removable drive. GTinsley 2008 @ Wallington County Grammar School.<br />
'  May cause false positives on some SATA 'puters.<br />
'  Tested working on 'puters with card readers.</p>
<p>Set FileSystemObject = CreateObject("Scripting.FileSystemObject") 'Create a filesystem object<br />
Set Drives = FileSystemObject.Drives 'Create a drives collection</p>
<p>' Step through the drive collection, and get both the drive letter and the drive type.<br />
' There are 6 distinct types of drive:<br />
'Select Case DriveType<br />
'   Case "0" DriveType = "Unknown type of drive"<br />
'   Case "1" DriveType = "Removable drive"<br />
'   Case "2" DriveType = "Fixed drive"<br />
'   Case "3" DriveType = "Network drive"<br />
'   Case "4" DriveType = "CD-ROM drive"<br />
'   Case "5" DriveType = "RAM Disk"<br />
'End Select</p>
<p>For Each DiskDrive in Drives</p>
<p>DriveLetter = DiskDrive.DriveLetter<br />
DriveType = DiskDrive.DriveType</p>
<p>' Check for a removable drive connected that:<br />
'     Is not the drive letter A B or C<br />
'    Folder exists (proves the drive exists)<br />
IF Drivetype = "1" and not driveletter = "C" and not driveletter = "A" and not driveletter = "B" and FileSystemObject.FolderExists(driveletter &amp; ":\") then</p>
<p>' Old method. Waits until user has clicked OK before logoff completes.<br />
'WScript.Echo "The removable disk drive " &amp; DriveLetter &amp; " is a still connected. Don't forget your USB drive!"</p>
<p>' New method waits 5 seconds then logs off.</p>
<p>time_out = 5      ' wait max. 5 seconds<br />
title = "Forgetting something?"<br />
button = vbOKonly  ' vbOKOnly<br />
message = "The Removable Disk (" &amp; DriveLetter &amp; ":\) is a still connected. Don't forget your USB drive!"</p>
<p>Set objWSH = WScript.CreateObject("Wscript.Shell")     ' create object<br />
objWSH.Popup message, time_out, title, buttons     ' popup<br />
end if<br />
Next</p>
<p>' Clear objects and collections<br />
Set Drives = nothing<br />
Set FileSystemObject = nothing</p>
<p>[/code]</p>
]]></content:encoded>
			<wfw:commentRss>http://kirrus.co.uk/2011/02/usb-key-reminder-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Command Line Ping Replacement</title>
		<link>http://kirrus.co.uk/2010/08/windows-command-line-ping-replacement/</link>
		<comments>http://kirrus.co.uk/2010/08/windows-command-line-ping-replacement/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 00:17:44 +0000</pubDate>
		<dc:creator>garreth</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://kirrus.co.uk/2010/08/windows-command-line-ping-replacement/</guid>
		<description><![CDATA[So the windows version of ping is really stupid. I was writing a batch script to mount up a network share that involved checking to ensure my NAS unit was turned on. The script is scheduled to run after the computer resumes. What I found out is that the built in version of Ping.exe is [...]]]></description>
			<content:encoded><![CDATA[<p>So the windows version of ping is really stupid. </p>
<p>I was writing a batch script to mount up a network share that involved checking to ensure my NAS unit was turned on. The script is scheduled to run after the computer resumes.</p>
<p>What I found out is that the built in version of Ping.exe is terrible at telling you whether the ping has returned successfully or not. I was checking the ERRORLEVEL &#8211; %ERRORLEVEL% variable to find out what ping was returning. It should be 0 for success and 1 or higher for a failure. </p>
<p>What I found was, i was getting replies from the local pc (dunno why, leave me a comment if you know) and ping was reporting a success even though the correct pc failed to reply. The solution?   <br />Replace the Windows ping.exe with <strong><a href="http://www.kwakkelflap.com/fping.html">Fping.</a></strong> It has a lot more options and appears – from some initial quick tests – to correctly report the errorlevel. </p>
<p>Kudos to Wouter Dhondt for developing it. I’ll update this post with any more news!</p>
<p>&#160;</p>
<p align="center"><a href="http://kirrus.co.uk/wp-content/uploads/2010/08/image.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://kirrus.co.uk/wp-content/uploads/2010/08/image_thumb.png" width="496" height="484" /></a> Fping vs Ping errorlevel return values</p>
]]></content:encoded>
			<wfw:commentRss>http://kirrus.co.uk/2010/08/windows-command-line-ping-replacement/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Quick useful sysadmin stuff</title>
		<link>http://kirrus.co.uk/2009/09/quick-useful-sysadmin-stuff/</link>
		<comments>http://kirrus.co.uk/2009/09/quick-useful-sysadmin-stuff/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 13:10:01 +0000</pubDate>
		<dc:creator>Kirrus</dc:creator>
				<category><![CDATA[Remember This]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-UK Planet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://kirrus.co.uk/?p=320</guid>
		<description><![CDATA[Two useful things I have found or use Firefox Awesomebar search trick A wonderful tip, that someone sent into the ubuntu-uk podcast. (I can&#8217;t remember who, or the episode. Comment if you know and I&#8217;ll credit them here! ) You can search, in any website&#8217;s search function, using firefox&#8217;s address bar. Now, at first glance [...]]]></description>
			<content:encoded><![CDATA[<p>Two useful things I have found or use <img src='http://kirrus.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Firefox Awesomebar search trick</h2>
<p>A wonderful tip, that someone sent into the ubuntu-uk podcast. (I can&#8217;t remember who, or the episode. Comment if you know and I&#8217;ll credit them here! <img src='http://kirrus.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>You can search, in any website&#8217;s search function, using firefox&#8217;s address bar. Now, at first glance this sounds really boring and useless, but it really isn&#8217;t, at all.</p>
<p>First, we need to find a website to search. Let&#8217;s use launchpad&#8217;s bugs search, for Ubuntu. So, we go here:</p>
<p>https://bugs.launchpad.net/ubuntu/</p>
<p><a href="http://kirrus.co.uk/wp-content/uploads/2009/09/screenshot-firefox-add-keyword-bookmark.png"><img class="alignright size-medium wp-image-321" title="Screenshot Firefox add search bookmark" src="http://kirrus.co.uk/wp-content/uploads/2009/09/screenshot-firefox-add-keyword-bookmark-300x124.png" alt="Screenshot Firefox add search bookmark" width="300" height="124" /></a>Then, right click on the search box, and click &#8220;Add a keyword for this search&#8221;. This brings up the standard bookmark &#8211; your search keywords are stored as a bookmark. Give it a useful name, something to help you next time you go sorting through your book marks. Now, the keyword is how we use this trick. I&#8217;m going to use &#8220;bugs&#8221;, but you can use anything you want, just remember, this is the word you put before your search string in the address bar. Click Add.</p>
<p><img class="alignright size-full wp-image-322" title="Screenshot Firefox address bar search for bugs" src="http://kirrus.co.uk/wp-content/uploads/2009/09/screenshot-firefox-search-for-lp-bugs.png" alt="Screenshot Firefox address bar search for bugs" width="368" height="29" />Now, all we have to do, is to search for a bug. Let&#8217;s use the classic bug 1.</p>
<p>Open a new tab (CTRL + T), then in the address bar type [your keyword] microsoft market share, and hit enter.</p>
<p>Lo and behold:</p>
<p><a href="http://kirrus.co.uk/wp-content/uploads/2009/09/screenshot-firefox-bugs-in-ubuntu-ms-marketshare.png"><img class="aligncenter size-full wp-image-324" title="Screenshot Firefox launchpad bug 1" src="http://kirrus.co.uk/wp-content/uploads/2009/09/screenshot-firefox-bugs-in-ubuntu-ms-marketshare.png" alt="Screenshot Firefox launchpad bug 1" width="663" height="382" /></a></p>
<h2>Testing SMTP-AUTH the fast way</h2>
<p>Found a really handy little command line program called &#8220;swaks&#8221;. Great if you&#8217;ve ever needed to test SMTP-AUTH, and didn&#8217;t want to have to base64 the username and password yourself. Here&#8217;s a quick rundown on the command and flags I use with them. (Should be fairly obvious, comment if not!)</p>
<blockquote><p>swaks -s [smtp-server-name-or-ip] -au [smtp-auth-user] -ap [smtp-auth-password] -f [from-address-of-testing-email]</p></blockquote>
<p>Hit enter, and it&#8217;ll ask you the &#8220;to&#8221; email address. Type it in, and it gives you the full connection readout, just as if you were doing it with telnet (or netcat) on the command line:</p>
<blockquote><p>&lt;-  220 smtp.our-domain.com ESMTP<br />
-&gt; EHLO gemini<br />
&lt;-  250-smtp.our-domain.com<br />
&lt;-  250-AUTH LOGIN<br />
&lt;-  250-AUTH=LOGIN<br />
&lt;-  250-PIPELINING<br />
&lt;-  250 8BITMIME<br />
-&gt; AUTH LOGIN<br />
&lt;-  334 Z29vZCB0cnkgOikK</p></blockquote>
<p>And so on. <img src='http://kirrus.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kirrus.co.uk/2009/09/quick-useful-sysadmin-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

