<?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>Projects Log &#187; Windows</title>
	<atom:link href="http://dev.pulsed.net/wp/?cat=3&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://dev.pulsed.net/wp</link>
	<description>projects, diy</description>
	<lastBuildDate>Mon, 25 Jul 2011 11:22:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Control your Windows computer using your Sony Playstation 3</title>
		<link>http://dev.pulsed.net/wp/?p=40</link>
		<comments>http://dev.pulsed.net/wp/?p=40#comments</comments>
		<pubDate>Mon, 25 May 2009 15:08:46 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=40</guid>
		<description><![CDATA[
Ok, let me introduce my new project: It&#039;s called PS3ReCon (which stands for Playstation 3 Remote Control), it allows you to use your Sony Playstation 3 Bluetooth Remote to control your computer.
It&#039;s fully writen in c# and supports external plugins (.dll files)
Oh, and also, it&#039;s free !
http://ps3recon.pulsed.net/
]]></description>
			<content:encoded><![CDATA[<p><a href="http://ps3recon.pulsed.net/"><img src="http://ps3recon.pulsed.net/banner3.png" alt="PS3ReCon" /></a><br />
Ok, let me introduce my new project: It&#039;s called PS3ReCon (which stands for Playstation 3 Remote Control), it allows you to use your Sony Playstation 3 Bluetooth Remote to control your computer.<br />
It&#039;s fully writen in c# and supports external plugins (.dll files)<br />
Oh, and also, it&#039;s free !</p>
<p><a href="http://ps3recon.pulsed.net/">http://ps3recon.pulsed.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=40</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Laser + Webcam = 3D&#8230; maybe!</title>
		<link>http://dev.pulsed.net/wp/?p=38</link>
		<comments>http://dev.pulsed.net/wp/?p=38#comments</comments>
		<pubDate>Fri, 22 Feb 2008 16:45:24 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[laser]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=38</guid>
		<description><![CDATA[So here the new project i&#039;m planning to work on: a 3D scanner!
Since a picture is worth a thousand words, lets start with them:


What I think is pretty simple (maybe too simple): the distance between the y axis and the edge of the object where the laser is beaming on, can be calculated using the [...]]]></description>
			<content:encoded><![CDATA[<p>So here the new project i&#039;m planning to work on: a 3D scanner!</p>
<p>Since a picture is worth a thousand words, lets start with them:</p>
<p><img src="http://dev.pulsed.net/misc/scan3d1.png" alt="3d scan 1" /><br />
<img src="http://dev.pulsed.net/misc/scan3d2.png" alt="3d scan 2" /></p>
<p>What I think is pretty simple (maybe too simple): the distance between the y axis and the edge of the object where the laser is beaming on, can be calculated using the delta value and some sines and cosines!</p>
<p><img src="http://dev.pulsed.net/misc/scan3d3.png" alt="3d scan 3" /><br />
I&#039;m not much of a math guy, but this sounds really easy!</p>
<p>x=delta/sin 60</p>
<p>Waaaaait&#8230; this may actually work!!!!</p>
<p>Oh and i&#039;ve made some huge progress with my realtime webcam tracking program!</p>
<p>here&#039;s an example tracking my external harddrive blue led:<br />
<img src="http://dev.pulsed.net/misc/ledtracker.jpg" alt="ledtrackr" /></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=38</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vbscript CGI (No&#8230; not ASP)</title>
		<link>http://dev.pulsed.net/wp/?p=32</link>
		<comments>http://dev.pulsed.net/wp/?p=32#comments</comments>
		<pubDate>Thu, 15 Nov 2007 19:37:55 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[vbscript]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=32</guid>
		<description><![CDATA[Yesterday, I don&#039;t know how, but while doing nothing I suddenly got the best idea ever: Using vbscript scripts with apache&#8230; and guess what&#8230; after some coding/debugging hours, it actually works like a charm!

so how did I manage to get this working?
Each computer with at least &#034;windows 2000&#034; should have cscript.exe somewhere: it&#039;s the vbscript/jscript [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I don&#039;t know how, but while doing nothing I suddenly got the best idea ever: Using vbscript scripts with apache&#8230; and guess what&#8230; after some coding/debugging hours, it actually works like a charm!<br />
<span id="more-32"></span><br />
so how did I manage to get this working?<br />
Each computer with at least &#034;windows 2000&#034; should have cscript.exe somewhere: it&#039;s the vbscript/jscript console interpreter</p>
<p>so I started to write my first script:</p>
<p><em><u>test.vbs</u></em><br />
<code>#!c:\WINDOWS\system32\cscript.exe<br />
wscript.echo "Content-type: text/html" &amp; vbcrlf<br />
wscript.echo "Hello World"</code></p>
<p>but it didn&#039;t work (500 Internal Server Error) so I checked apache error log and found:<br />
<code>C:\\wamp\\cgi-bin\\test.vbs(1, 1) Erreur de compilation Microsoft VBScript: Instruction attendue\r</code></p>
<p>Error in the first line at the first character&#8230; oh wait that&#039;s the shebang<br />
How to ignore the first line in my vbs code?</p>
<p>No idea? well that&#039;s the second best idea ever: you simply need to call another vbs script from the shebang that somehow ignores the first line and include the remaining part and call it for example &#034;vbscript_cgi.vbs&#034;:</p>
<p><em><u>vbscript_cgi.vbs</u></em><br />
<code>Set arguments = WScript.Arguments<br />
If arguments.Count &gt;=1 Then<br />
Set FSO = CreateObject("Scripting.FileSystemObject")<br />
	If FSO.FileExists(arguments(0)) Then<br />
		Set cgi = FSO.OpenTextFile(arguments(0))<br />
		cgi.ReadLine<br />
		ExecuteGlobal cgi.ReadAll<br />
		cgi.Close<br />
	End If<br />
	Set FSO = Nothing<br />
End If<br />
Set arguments = Nothing</code></p>
<p><em><u>test.vbs</u></em><br />
<code>#!c:\WINDOWS\system32\cscript.exe "C:\wamp\cgi-bin\vbscript_cgi.vbs"<br />
wscript.echo "Content-type: text/html" &amp; vbcrlf<br />
wscript.echo "Hello World"</code></p>
<p>Nah bad luck, still error 500&#8230; apache log says <code>malformed header from script. Bad header=Microsoft (R) Windows Script H: test.vbs</code> &#8230; wtf?!?</p>
<p>Oooh right&#8230; cscript always displays a banner when you launch a script:<br />
<code>C:\wamp\cgi-bin&gt;cscript test.vbs<br />
Microsoft (R) Windows Script Host Version 5.6<br />
Copyright (C) Microsoft Corporation 1996-2001. Tous droits rÃ©servÃ©s.</code></p>
<p>Lets add the &#034;/nologo&#034; switch in the shebang to avoid that:<br />
<em><u>test.vbs</u></em><br />
<code>#!c:\WINDOWS\system32\cscript.exe /nologo "C:\wamp\cgi-bin\vbscript_cgi.vbs"<br />
wscript.echo "Content-type: text/html" &amp; vbcrlf<br />
wscript.echo "Hello World"</code></p>
<p>yayyyy it wooooooorks :D<br />
<img src="http://dev.pulsed.net/misc/vbscriptcgi1.png" alt="hello world" /></p>
<p>after that I added some features such as the &#034;print&#034; alias, GET/POST variables support, and now that&#039;s a quick example what it can do:<br />
<img src="http://dev.pulsed.net/misc/vbscriptcgi2.png" alt="advanced example" /></p>
<div style="border: 1px dashed #708090; background-color: #add8e6">
	<code>'''''''''''''''''''''''''''</code><br />
	<code>'' vbscript_cgi.vbs      ''</code><br />
	<code>'' Kevin DEHLINGER       ''</code><br />
	<code>'' 2007 / dev.pulsed.net ''</code><br />
	<code>'''''''''''''''''''''''''''</code><br />
	<code></code><br />
	<code>Set arguments = WScript.Arguments</code><br />
	<code>If arguments.Count &gt;=1 Then</code><br />
	<code>Set FSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)</code><br />
	<code>If FSO.FileExists(arguments(0)) Then</code><br />
	<code>Set cgi = FSO.OpenTextFile(arguments(0))</code><br />
	<code>cgi.ReadLine</code><br />
	<code>ExecuteGlobal cgi.ReadAll</code><br />
	<code>cgi.Close</code><br />
	<code>End If</code><br />
	<code>Set FSO = Nothing</code><br />
	<code>End If</code><br />
	<code>Set arguments = Nothing</code><br />
	<code></code><br />
	<code></code><br />
	<code>sub print(v)</code><br />
	<code>wscript.echo v</code><br />
	<code>end sub</code><br />
	<code></code><br />
	<code>sub println(v)</code><br />
	<code>wscript.echo v &amp; vbcrlf</code><br />
	<code>end sub</code><br />
	<code></code><br />
	<code></code><br />
	<code>Function GetCgiVars</code><br />
	<code></code><br />
	<code>Set Shell = CreateObject( &quot;WScript.Shell&quot; )</code><br />
	<code>reqmethod=Ucase( Shell.ExpandEnvironmentStrings(&quot;%REQUEST_METHOD%&quot;))</code><br />
	<code></code><br />
	<code></code><br />
	<code>Select Case reqmethod</code><br />
	<code></code><br />
	<code>Case &quot;GET&quot;,&quot;HEAD&quot;</code><br />
	<code>cgiinput=Shell.ExpandEnvironmentStrings(&quot;%QUERY_STRING%&quot;)&amp; &quot;&quot;</code><br />
	<code></code><br />
	<code>Case &quot;POST&quot;</code><br />
	<code></code><br />
	<code>content_length=Shell.ExpandEnvironmentStrings(&quot;%CONTENT_LENGTH%&quot;)</code><br />
	<code></code><br />
	<code>If not IsNumeric(content_length) then</code><br />
	<code>print &quot;Content-Type: text/plain&quot; &amp; vbcrlf</code><br />
	<code>print &quot;No Content-Length was sent with the POST request&quot; &amp; vbcrlf</code><br />
	<code>Exit Function</code><br />
	<code>End If</code><br />
	<code></code><br />
	<code>cgiinput= WScript.StdIn.ReadAll</code><br />
	<code></code><br />
	<code></code><br />
	<code>Case Else</code><br />
	<code>print &quot;Content-Type: text/plain&quot; &amp; vbcrlf</code><br />
	<code>print &quot;Unsupported REQUEST_METHOD (&quot; &amp; reqmethod &amp; &quot;)&quot; &amp; vbcrlf</code><br />
	<code>Exit Function</code><br />
	<code></code><br />
	<code>End Select</code><br />
	<code></code><br />
	<code>cgiinput=Replace(cgiinput,&quot;+&quot;,&quot; &quot;)</code><br />
	<code>cgiinput=Replace(cgiinput,&quot;&amp;&quot;,&quot;;&quot;)</code><br />
	<code>cgiinput=Replace(cgiinput,&quot;=&quot;,&quot;=;&quot;)</code><br />
	<code></code><br />
	<code>InputArray=Split(cgiinput,&quot;;&quot;)</code><br />
	<code>Set CgiVars = CreateObject(&quot;Scripting.Dictionary&quot;)</code><br />
	<code></code><br />
	<code></code><br />
	<code>status=0</code><br />
	<code>Hash_Key=&quot;&quot;</code><br />
	<code></code><br />
	<code>For Each value in InputArray</code><br />
	<code>If(Mid(value,Len(value),1)=&quot;=&quot;) Then</code><br />
	<code>Hash_Key=Mid(value,1,Len(value)-1)</code><br />
	<code>Else</code><br />
	<code>CgiVars.Add Unescape_Url(Hash_Key),Unescape_Url(value)</code><br />
	<code>End If</code><br />
	<code>Next</code><br />
	<code></code><br />
	<code>Set GetCgiVars=CgiVars</code><br />
	<code>End Function</code><br />
	<code></code><br />
	<code></code><br />
	<code>Function Unescape_Url (url)</code><br />
	<code>Set RegExp1 = New RegExp</code><br />
	<code>RegExp1.IgnoreCase = True</code><br />
	<code>RegExp1.Global = True</code><br />
	<code>RegExp1.Pattern = &quot;%([0-9A-F]{2})&quot;</code><br />
	<code></code><br />
	<code></code><br />
	<code>Set Matches = RegExp1.Execute(url)</code><br />
	<code>For Each Match in Matches</code><br />
	<code>url = Replace(url,&quot;%&quot; &amp; Match,Hex2Char(Match))</code><br />
	<code>Next</code><br />
	<code>Unescape_Url=url</code><br />
	<code>End Function</code><br />
	<code></code><br />
	<code>Function Hex2Char (hexx)</code><br />
	<code>Hex2Char = Chr(1*CLng(&quot;&amp;H&quot; &amp; hexx))</code><br />
	<code>End Function</code>
</div>
<p>	<strong>Download this code:</strong> <a href="http://dev.pulsed.net/wp/code/vbscript_cgi.vbs">vbscript_cgi.vbs</a>
</ol>
<div style="border: 1px dashed #708090; background-color: #add8e6">
	<code>#!c:\WINDOWS\system32\cscript.exe /nologo &quot;C:\wamp\cgi-bin\vbscript_cgi.vbs&quot;</code><br />
	<code></code><br />
	<code>''''''''''''''''''''''''''''''</code><br />
	<code>'' testscript.vbs           ''</code><br />
	<code>'' Kevin DEHLINGER          ''</code><br />
	<code>'' 2007 / dev.pulsed.net    ''</code><br />
	<code>'' query some data with     ''</code><br />
	<code>'' wmi/wsh (some of thecode ''</code><br />
	<code>'' comes from scriptomatic) ''</code><br />
	<code>''''''''''''''''''''''''''''''</code><br />
	<code></code><br />
	<code></code><br />
	<code>print &quot;Content-type: text/html&quot; &amp; vbcrlf</code><br />
	<code></code><br />
	<code></code><br />
	<code>print &quot;&lt;!DOCTYPE html PUBLIC &quot;&quot;-//W3C//DTD HTML 4.01//EN&quot;&quot; \&quot;&quot;http://www.w3.org/TR/html4/strict.dtd&quot;&quot;&gt;&quot; &amp; vbcrlf &amp; _</code><br />
	<code>&quot;&lt;html&gt;&quot; &amp; _</code><br />
	<code>&quot;&lt;head&gt;&quot; &amp; _</code><br />
	<code>&quot;  &lt;meta content=&quot;&quot;text/html; charset=ISO-8859-1&quot;&quot;&quot;  &amp; _</code><br />
	<code>&quot; http-equiv=&quot;&quot;content-type&quot;&quot;&gt;&quot;  &amp; _</code><br />
	<code>&quot;  &lt;title&gt;&lt;/title&gt;&quot; &amp; _</code><br />
	<code>&quot;&lt;/head&gt;&quot; &amp; _</code><br />
	<code>&quot;&lt;body&gt;&quot;</code><br />
	<code></code><br />
	<code></code><br />
	<code>Set mycgivars=GetCgiVars</code><br />
	<code></code><br />
	<code>if mycgivars.exists(&quot;computer&quot;) then</code><br />
	<code>computer=mycgivars.item(&quot;computer&quot;)</code><br />
	<code>else</code><br />
	<code>computer = &quot;.&quot;</code><br />
	<code>end if</code><br />
	<code></code><br />
	<code>print &quot;&lt;form method=&quot;&quot;post&quot;&quot; action=&quot;&quot;testscript.vbs&quot;&quot; name=&quot;&quot;test&quot;&quot;&gt;Computer: &lt;input&quot; &amp; _</code><br />
	<code>&quot; name=&quot;&quot;computer&quot;&quot; value=&quot;&quot;&quot; &amp; computer &amp; &quot;&quot;&quot;&gt;&lt;input&quot; &amp; _</code><br />
	<code>&quot; type=&quot;&quot;submit&quot;&quot;&gt;&lt;/label&gt;&lt;/form&gt;&quot;</code><br />
	<code></code><br />
	<code></code><br />
	<code>On Error Resume Next</code><br />
	<code>Const wbemFlagReturnImmediately = &amp;h10</code><br />
	<code>Const wbemFlagForwardOnly = &amp;h20</code><br />
	<code></code><br />
	<code>println &quot;Computer: &quot; &amp; computer &amp; &quot;&lt;br \&gt;&lt;br \&gt;&quot;</code><br />
	<code></code><br />
	<code></code><br />
	<code>Set objWMIService = GetObject(&quot;winmgmts:\\&quot; &amp; computer &amp; &quot;\root\CIMV2&quot;)</code><br />
	<code>Set colItems = objWMIService.ExecQuery(&quot;SELECT * FROM Win32_LogicalDisk&quot;, &quot;WQL&quot;, _</code><br />
	<code>wbemFlagReturnImmediately + wbemFlagForwardOnly)</code><br />
	<code></code><br />
	<code>For Each objItem In colItems</code><br />
	<code>println &quot;Drive: &quot; &amp; objItem.Caption &amp; &quot;&lt;br \&gt;&quot;</code><br />
	<code>println &quot;Description: &quot; &amp; objItem.Description &amp; &quot;&lt;br \&gt;&quot;</code><br />
	<code>println &quot;VolumeName: &quot; &amp; objItem.VolumeName &amp; &quot;&lt;br \&gt;&quot;</code><br />
	<code>println   &quot;&lt;br \&gt;&quot;</code><br />
	<code>Next</code><br />
	<code></code><br />
	<code></code><br />
	<code></code><br />
	<code>print &quot;&lt;/body&gt;&lt;/html&gt;&quot;</code><br />
	<code></code><br />
	<code>Function WMIDateStringToDate(dtmDate)</code><br />
	<code>print dtm:</code><br />
	<code>WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) &amp; &quot;/&quot; &amp; _</code><br />
	<code>Mid(dtmDate, 7, 2) &amp; &quot;/&quot; &amp; Left(dtmDate, 4) _</code><br />
	<code>&amp; &quot; &quot; &amp; Mid (dtmDate, 9, 2) &amp; &quot;:&quot; &amp; Mid(dtmDate, 11, 2) &amp; &quot;:&quot; &amp; Mid(dtmDate,13, 2))</code><br />
	<code>End Function</code>
</div>
<p>	<strong>Download this code:</strong> <a href="http://dev.pulsed.net/wp/code/testscript.vbs">testscript.vbs</a>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=32</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Patching Smokeping for Windows so you don&#039;t have to.</title>
		<link>http://dev.pulsed.net/wp/?p=31</link>
		<comments>http://dev.pulsed.net/wp/?p=31#comments</comments>
		<pubDate>Sun, 14 Oct 2007 16:49:48 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[smokeping]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=31</guid>
		<description><![CDATA[I&#039;m releasing this today, but it&#039;s still in beta (Everything that used to work with my old 2.0.8 patch works with that version, but not all new features have been tested yet)
What you&#039;ll need:
-Perl (latest version if you can)
-A web server (wamp is good, but others should work fine as well)

What the script will do [...]]]></description>
			<content:encoded><![CDATA[<p>I&#039;m releasing this today, but it&#039;s still in beta (Everything that used to work with my old 2.0.8 patch works with that version, but not all new features have been tested yet)</p>
<p><strong>What you&#039;ll need:</strong></p>
<p>-<a href="http://activestate.com/store/activeperl/">Perl</a> (latest version if you can)<br />
-A web server (<a href="http://www.wampserver.com/en/">wamp</a> is good, but others should work fine as well)</p>
<p><strong><br />
What the script will do and what it won&#039;t:</strong></p>
<p><strong>it will:</strong> download smokeping, rrdtool, and fping, help you configure smokeping (owner, mail, etc), patch what&#039;s needed to be patched, install a new feature that is not included in smokeping&#039;s official package (zoom in/out with pageup|pagedown)<br />
<strong>it won&#039;t:</strong> install/configure your webserver, install perl, add targets in your configuration file</p>
<p><strong><br />
what&#039;s working and what&#039;s untested yet:</strong></p>
<p><strong>working:</strong> everything that used to work with the 2.0.8 version, Ajax based ineractive graph zooming (+ my exclusive zoom with pageup/pagedown feature), Multi Target Graphs, using drives different than &quot;c:&quot;<br />
<strong>not tested yet:</strong> Master/Slave setup for multi source smokeping deployments.</p>
<p><strong>How to configure wamp, or apache:</strong><br />
<strong>edit</strong> httpd.conf (C:\wamp\Apache2\conf\httpd.conf with wamp)<br />
<strong>change: </strong>ScriptAlias /cgi-bin/ &quot;C:/wamp/Apache2/cgi-bin/&quot; into ScriptAlias /cgi-bin/ &quot;c:/wamp/cgi/&quot;    <strong>*</strong><br />
<strong>change: </strong>&lt;Directory &quot;C:/wamp/Apache2/cgi-bin/&quot;> into &lt;Directory &quot;c:/wamp/cgi&quot;>     <strong>*</strong><br />
(<strong>*</strong> you don&#039;t _have_ to do that, and of course you can change every paths, you just have to provide every paths to the install script)<br />
<strong>create</strong> a folder in your www root folder (c:\wamp\www if you&#039;re runing wamp) and name it &quot;simg&quot;</p>
<p>The install script will ask you the www root folder and the image folder</p>
<p><code>WWW root folder [Default: C:\wamp\www] (must already exist)</code></p>
<p><code>image folder from C:\wamp\www [Default: simg]</code></p>
<p>that&#039;s it! if something is not self explanatory enough, or if you have questions feel free to leave a comment</p>
<p>for testing, and autostart take a look at steps 7,8, and 10 here <a href="http://dev.pulsed.net/wp/?p=3">http://dev.pulsed.net/wp/?p=3</a></p>
<p><a href="http://dev.pulsed.net/misc/smokepinginstaller.zip">Download the Smokeping Installer for Windows</a>, unzip it and launch &#034;install n patch.pl&#034;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=31</wfw:commentRss>
		<slash:comments>127</slash:comments>
		</item>
		<item>
		<title>How to get the MAC address of a remote computer with its IP address with perl</title>
		<link>http://dev.pulsed.net/wp/?p=18</link>
		<comments>http://dev.pulsed.net/wp/?p=18#comments</comments>
		<pubDate>Tue, 01 Aug 2006 16:59:48 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=18</guid>
		<description><![CDATA[Windows >= 2000 only (or maybe NT4.0 SP6)
This is the cool solution, or you could parse the result of `ping -n 1 $ip > nul &#038; arp -a` searching for $ip in the list (very slow and unpretty solution btw)
We will use two Windows dll ( iphlpapi.dll and wsock32.dll ) to import two functions ( [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Windows >= 2000 only (or maybe NT4.0 SP6)</strong></p>
<p>This is the cool solution, or you could parse the result of `ping -n 1 $ip > nul &#038; arp -a` searching for $ip in the list (very slow and unpretty solution btw)</p>
<p>We will use two Windows dll ( <a target="_blank" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/ip_helper_function_reference.asp">iphlpapi.dll</a> and <a target="_blank" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/winsock_reference.asp">wsock32.dll</a> ) to import two functions ( <a target="_blank" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/sendarp.asp">SendARP</a> and <a target="_blank" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/inet_addr_2.asp">inet_addr</a> );<br />
to do that, we will need <a target="_blank" href="http://search.cpan.org/~acalpini/Win32-API-0.41/API.pm">Win32::API perl module</a>.<br />
if you have some error like &#034;Can&#039;t locate Win32/API.pm in @INC&#8230;&#034; when you try to run the script, you need to install it:<br />
type: <em>ppm install Win32-API</em> in a dos prompt.</p>
<p><span id="more-18"></span></p>
<p><strong>What is <acronym title="Address Resolution Protocol ">ARP</acronym>?</strong></p>
<blockquote><p>Address Resolution Protocol (ARP) is a required TCP/IP standard defined in RFC 826, &#034;Address Resolution Protocol (ARP).&#034; ARP resolves IP addresses used by TCP/IP-based software to media access control addresses used by LAN hardware. ARP provides the following protocol services to hosts located on the same physical network:</p>
<li>Media access control addresses are obtained by using a network broadcast request in the form of the question &#034;What is the media access control address for a device that is configured with the enclosed IP address?&#034;</li>
<li>When an ARP request is answered, both the sender of the ARP reply and the original ARP requester record each other&#039;s IP address and media access control address as an entry in a local table called the ARP cache for future reference.</li>
</blockquote>
<p><a target="_blank" href="http://technet2.microsoft.com/WindowsServer/en/library/7b77bb1b-5c57-408f-907f-8b474203a5331033.mspx?mfr=true"><em>Source: microsoft.com</em></a></p>
<p>In other words, ARP is a protocol used to translate IP addresses to MAC (physical) addresses.</p>
<p><img src="http://dev.pulsed.net/misc/arp_ethereal.png" alt="Ethereal capture" /><br />
<em>As you can see, this looks pretty simple, one question (frame 1), and one answer (frame 2)</em></p>
<p>In order to improve performances, and to lower network charge, the data are cached locally.<br />
You can access (read/write) the ARP cache data with the arp command:<br />
for example: <strong>arp -a</strong> displays every ARP entries.<br />
You may need to ping the computer before.</p>
<p><img src="http://dev.pulsed.net/misc/arp_cmd.png" alt="arp -a" /></p>
<p>Well, the code now (192.168.0.254 is just an example):</p>
<p class="warning">[The requested file <kbd>http://dev.pulsed.net/wp/code/arp.pl</kbd> could not be found]</p>
<p>The best part of this little script is (what i thought impossible in perl) the dll function import!</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=18</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to add an &quot;Open Command Window Here&quot; shortcut in the context menu under Windows 2003</title>
		<link>http://dev.pulsed.net/wp/?p=17</link>
		<comments>http://dev.pulsed.net/wp/?p=17#comments</comments>
		<pubDate>Sun, 30 Jul 2006 11:25:18 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=17</guid>
		<description><![CDATA[Microsoft has has released a little powertoy called &#034;Open Command Window Here&#034; unfortunatly you can&#039;t install under Windows 2003&#8230;
oh and by the way, this works under windows XP too (2000 not tested)

This could be pretty useful since we have a lot of win2k3 servers at work&#8230;

Open regedit (Windows Key + R > regedit > enter) [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft has has released a little powertoy called &#034;Open Command Window Here&#034; unfortunatly you can&#039;t install under Windows 2003&#8230;<br />
oh and by the way, this works under windows XP too (2000 not tested)</p>
<p><img src="http://dev.pulsed.net/misc/cmdhere1.png" title="" border="0"/></p>
<p>This could be pretty useful since we have a lot of win2k3 servers at work&#8230;<br />
<span id="more-17"></span></p>
<li>Open regedit (Windows Key + R > regedit > enter) </li>
<li>goto HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell</li>
<li>Create a new registry key and give it a name (i called mine &#034;cmd.exe here&#034;)</li>
<li>Set the default value the way you want it to appear in the context menu (&#034;>> cmd here < < for example)</li>
<p><img src="http://dev.pulsed.net/misc/cmdhere2.png" title="" border="0"/></p>
</li>
<li>Create a new registry key in the previous one named &#034;command&#034; (you can&#039;t change this name)</li>
<li>Set the default value to &#034;cmd.exe /k pushd %L&#034;</li>
<p><img src="http://dev.pulsed.net/misc/cmdhere3.png" title="" border="0"/></p>
<p>You&#039;re done!<br />
<img src="http://dev.pulsed.net/misc/cmdhere4.png" title="" border="0"/></p>
<p>If you&#039;re lazy, you can download the following .reg and simply apply it. (REGEDIT4, because Windows Registry Editor Version 5.00 reg files are not ascii only)</p>
<div style="border: 1px dashed #708090; background-color: #add8e6">
	<code>REGEDIT4</code><br />
	<code></code><br />
	<code>[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmd.exe here]</code><br />
	<code>@=&quot;&gt;&gt; cmd here &lt;&lt;&quot;</code><br />
	<code></code><br />
	<code>[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmd.exe here\command]</code><br />
	<code>@=&quot;cmd.exe /k pushd %L&quot;</code><br />
	<code></code>
</div>
<p>	<strong>Download this code:</strong> <a href="http://dev.pulsed.net/wp/code/cmdhere.reg">cmdhere.reg</a>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to install smokeping under windows</title>
		<link>http://dev.pulsed.net/wp/?p=3</link>
		<comments>http://dev.pulsed.net/wp/?p=3#comments</comments>
		<pubDate>Sun, 18 Jun 2006 11:04:51 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[DIY]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=3</guid>
		<description><![CDATA[


this guide is deprecated and no longer supported, except for part 7,8, and 10
http://dev.pulsed.net/wp/?p=31
&#160;is the new way to go for Smokeping under Windows
1) smokewhat?
Smokeping(link) is a nice latency measurement tool, unfortunately it WAS only available for linux/unix&#8230;but after the jump, you&#039;ll find how to make it work under Microsoft Windows!
SmokePing is a deluxe latency measurement [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src='http://digg.com/api/diggthis.php?u=http%3A%2F%2Fdigg.com%2Fsoftware%2FHow_to_install_smokeping_under_windows' height='82' width='55' frameborder='0' scrolling='no' style='float: right; margin-left: 10px; margin-bottom: 5px; padding: 4px 0 2px 4px; background: #fff;'></iframe></p>
<div style='text-align: center;'>
<big style='color: red;'><br />
<big><span  style='font-family: Arial; font-weight: bold;'>this guide is deprecated and no longer supported, except for part 7,8, and 10</span><br />
<br style='font-family: Arial; font-weight: bold;'><a style='font-family: Arial; font-weight: bold; color: red;' href='http://dev.pulsed.net/wp/?p=31'>http://dev.pulsed.net/wp/?p=31<br />
</a><span style='font-family: Arial; font-weight: bold;'>&nbsp;is the new way to go for Smokeping under Windows</span></big></big></div>
<p align="left"><strong><u>1) smokewhat?</u></strong></p>
<p>Smokeping<a target="_blank" href="http://oss.oetiker.ch/smokeping/">(link)</a> is a nice latency measurement tool, unfortunately it WAS only available for linux/unix&#8230;but after the jump, you&#039;ll find how to make it work under Microsoft Windows!</p>
<blockquote><p>SmokePing is a deluxe latency measurement tool. It can measure, store and display latency, latency distribution and packet loss. SmokePing uses RRDtool to maintain a longterm data-store and to draw pretty graphs, giving up to the minute information on the state of each network connection.</p></blockquote>
<p><span id="more-3"></span></p>
<p align="left"><strong><u>2) What you need</u></strong></p>
<p>- <a target="_blank" href="http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl">Perl</a> (choose Perl 5.8.xxx MSI package for Windows)<br />
<em>Yeah Perl is cool and you can have a lot of fun using it</em></p>
<p>- <a target="_blank" href="http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.10-win32-perl58.zip"> RRDs module for Perl</a><br />
<em>This version works for sure, but feel free to download the latest </em></p>
<p>- <a target="_blank" href="http://dev.pulsed.net/misc/fping.zip">fping for windows</a> (thanks to <a target="_blank" href="http://www.bl.org/%7Emparson/">Michael Parson</a>)</p>
<p>- <a target="_blank" href="http://oss.oetiker.ch/smokeping/pub/smokeping-2.0.8.tar.gz"> Smokeping</a><br />
<em>This version works for sure, but feel free to download the latest </em></p>
<p>- a text editor<br />
There&#039;s a lot of text editors out there&#8230; <span lang="EN-US"> personally</span>, I like <a target="_blank" href="http://www.pspad.com/fr/download.php">pspad</a></p>
<p>- a web server<br />
Feel free to download, install, configure apache with cgi yourself, or use <a target="_blank" href="http://www.wampserver.com/download.php">WAMP</a> (the one I use), or whatever bundled apache/cgi/php/mysql version you want</p>
<p align="left"><strong><u>3) What you do not need</u></strong></p>
<p>- Money<br />
<em>all listed softwares are (at least) freeware</em></p>
<p>- A (linux/unix)-running computer<br />
<em>yeah dude, windows rulez da w0rld</em></p>
<p align="left"><strong><u>4) &#034;Installation&#034; </u></strong></p>
<p>- Install Activestate Perl<br />
- Install RRDtool for windows (unzip, and launch install.cmd)<br />
- Unzip smokeping to C:\smokeping-2.0.8<br />
- Unzip fping for windows (make sure cygwin1.dll is in the same folder) to C:\smokeping-2.0.8\fping<br />
- Install WAMP to C:\wamp</p>
<p align="left"><strong><u>5) Modifications</u></strong></p>
<p><u>a) rename</u><br />
- <font color="#3399ff">C:\smokeping-2.0.8\bin\smokeping.dist</font> into <font color="#ff0000">smokeping.pl</font><br />
- <font color="#3399ff">C:\smokeping-2.0.8\bin\tSmoke.dist</font> into <font color="#ff0000">tSmoke.pl</font></p>
<p><u>b) edit</u><br />
- <font color="#008080">C:\smokeping- 2.0.8\bin\smokeping.pl</font><br />
<em>add (after line 5):</em> <font color="#ff0000">use lib qw(C:\smokeping-2.0.8\lib); </font><br />
<em>change (line 9):</em> <font color="#3399ff">Smokeping::main(&#034;etc/config.dist&#034;);</font> into <font color="#ff0000">Smokeping::main(&#034;C:/smokeping-2.0.8/etc/config.dist&#034;);</font></p>
<p>- <font color="#008080">C:\smokeping-2.0.8\bin\tSmoke.pl</font><br />
<em>change (line 63):</em> <font color="#3399ff">my $cfgfile = &#034;etc/config.dist&#034;;</font> into <font color="#ff0000">my $cfgfile = &#034;C:\smokeping-2.0.8\etc\config.dist&#034;;</font></p>
<p>- <font color="#008080">C:\smokeping- 2.0.8\lib\Smokeping.pm</font><br />
<em>change (line 14):</em> <font color="#3399ff">use Sys::Syslog qw(:DEFAULT setlogsock);</font> into <font color="#ff0000">#use Sys::Syslog qw(:DEFAULT setlogsock);</font><br />
<em>change (line 21):</em> <font color="#3399ff">$ENV{LC_NUMERIC}=&#039;C';</font> into <font color="#ff0000">#$ENV{LC_NUMERIC}=&#039;C'; </font><br />
<em>change (line 22):</em> <font color="#3399ff">POSIX::setlocale(&#038;POSIX::LC_NUMERIC,&#034;");</font> into <font color="#ff0000">#POSIX::setlocale(&#038;POSIX::LC_NUMERIC,&#034;");</font><br />
<em>change (line 2984):</em> <font color="#3399ff">daemonize_me $cfg->{General}{piddir}.&#034;/smokeping.pid&#034;;</font> into <font color="#ff0000">#daemonize_me $cfg->{General}{piddir}.&#034;/smokeping.pid&#034;;</font></p>
<p>- <font color="#008080">C:\wamp\Apache2\conf\httpd.conf</font><br />
<em>change (line 515):</em> <font color="#3399ff">ScriptAlias /cgi-bin/ &#034;C:/wamp/Apache2/cgi-bin/&#034;</font> into <font color="#ff0000">ScriptAlias /cgi-bin/ &#034;c:/wamp/cgi/&#034;</font><br />
<em>change (line 521):</em>  <font color="#3399ff">&lt;Directory &#034;C:/wamp/Apache2/cgi-bin/&#034;&gt;</font> into <font color="#ff0000">&lt;Directory &#034;c:/wamp/cgi&#034;&gt;</font></p>
<p><u>c) move and rename</u><br />
- Create folder <font color="#008080">c:\wamp\cgi</font><br />
- <font color="#3399ff">C:\smokeping-2.0.8\htdocs\smokeping.cgi.dist</font> to <font color="#ff0000">c:\wamp\cgi\smokeping.pl</font></p>
<p><u>d) edit</u><br />
- <font color="#008080">c:\wamp\cgi\smokeping.pl</font><br />
<em>change (line 1):</em> <font color="#3399ff">#!/usr/sepp/bin/speedy -w</font> into <font color="#ff0000">#!C:/Perl/bin/perl.exe -w</font><br />
<em>change (line 5):</em> <font color="#3399ff">use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib);</font> into <font color="#ff0000">use lib qw(C:\smokeping-2.0.8\lib); </font><br />
<em>change (line 10):</em> <font color="#3399ff">Smokeping::cgi(&#034;/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config&#034;);</font> into <font color="#ff0000">Smokeping::cgi(&#034;C:/smokeping-2.0.8/etc/config.dist&#034;);<br />
</font></p>
<p align="left"><strong><u>6) Configuration</u></strong></p>
<p><u>- Create folders:</u><br />
<font color="#008080">C:\wamp\www\simg<br />
C:\smokeping- 2.0.8\var</font></p>
<p><u>- edit configuration file ( <font color="#008080">C:\smokeping- 2.0.8\etc\config.dist</font> ) no line number here use search function instead :p</u></p>
<p><font color="#3399ff">owner =<br />
contact =<br />
mailhost =<br />
#sendmail = /usr/lib/sendmail < == Comment this line<br />
imgcache = C:/wamp/www/simg<br />
imgurl = ../simg<br />
datadir = \smokeping-2.0.8/var # designate implicitly c:\smokeping-2.0.8\var<br />
piddir = C:/smokeping-2.0.8/var<br />
cgiurl = http://127.0.0.1/cgi-bin/smokeping.pl<br />
smokemail = C:/smokeping-2.0.8/etc/smokemail.dist<br />
tmail = C:/smokeping-2.0.8/etc/tmail.dist</font></p>
<p></font><font color="#3399ff"># syslogfacility = local0 < = Comment this line!!!!</font></p>
<p></font><font color="#3399ff">*** Alerts ***<br />
to =<br />
from =</font></p>
<p><font color="#3399ff">template = C:/smokeping-2.0.8/etc/basepage.html.dist</font></p>
<p><font color="#3399ff">+ FPing<br />
binary = C:/smokeping-2.0.8/fping/fping.exe</font></p>
<p><font color="#3399ff">title =<br />
remark =</font></p>
<p><font color="#3399ff"># google is for demonstrational purpose only; <strong>please refer to <a target="_blank" href="http://oss.oetiker.ch/smokeping/doc/smokeping_examples.en.html">smokeping help</a> to set your own targets</strong></font></p>
<p><font color="#3399ff">+ Google</font></p>
<p><font color="#3399ff">menu = Google<br />
title =Google Connectivity<br />
alerts = bigloss,someloss,startloss<br />
host = google.fr</font></p>
<p align="left" style="color: #000000"><u><strong>7) Test it!</strong></u></p>
<p style="color: #000000">- open a cmd.exe window, and type C:\smokeping-2.0.8\bin\smokeping.pl<br />
<img src="http://dev.pulsed.net/dotclear/images/test1.png" /><br />
Ok, no weird error messages (if not, please check 5-a, 5-b and 6 again)</p>
<p style="color: #000000">- let it run for 10-15 min and try to open <a target="_blank" href="http://127.0.0.1/cgi-bin/smokeping.pl"> http://127.0.0.1/cgi-bin/smokeping.pl</a><br />
<img src="http://dev.pulsed.net/dotclear/images/test2.png" /><br />
Ok, no error messages again (if not: for cgi error check 5-b, 5-c, 5-d and 6 again and 5-d and 6 for RRD errors)<br />
(note the 2 buggy images bottom left, we will fix this later)
</p>
<p style="color: #000000">Now close the cmd.exe windows (a little bit rebel)</p>
<p align="left" style="color: #000000"><u><strong>8) Autostart under NT AUTHORITY\SYSTEM</strong></u></p>
<p style="color: #000000">- open<strong> </strong>Control Panel > Scheduled tasks and then click add scheduled task<br />
<em>since I&#039;m french, my Windows version is french too</em><br />
<img src="http://dev.pulsed.net/dotclear/images/1.png" /><br />
add scheduled task</p>
<p style="color: #000000"><img src="http://dev.pulsed.net/dotclear/images/2.png" /><br />
Next</p>
<p style="color: #000000"><img src="http://dev.pulsed.net/dotclear/images/3.png" /><br />
C:\smokeping-2.0.8\bin\smokeping.pl</p>
<p style="color: #000000"><img src="http://dev.pulsed.net/dotclear/images/4.png" /><br />
<strong style="font-weight: 400" class="uiterm">When my computer starts</strong></p>
<p style="color: #000000"><img src="http://dev.pulsed.net/dotclear/images/5.png" /><br />
system
</p>
<p style="color: #000000">After that, click &#034;Open advanced properties for this task when i click finish&#034;</p>
<p style="color: #000000"><img src="http://dev.pulsed.net/dotclear/images/6.png" /><br />
Check that &#034;run as&#034; is &#034;NT AUTHORITY\SYSTEM&#034;</p>
<p style="color: #000000"><img src="http://dev.pulsed.net/dotclear/images/7.png" /><br />
Uncheck everything in parameters, and click OK</p>
<p style="color: #000000"><img src="http://dev.pulsed.net/dotclear/images/8.png" /><br />
right click on the task, and Start, check if it doesn&#039;t stop immediatly.
</p>
<p align="left" style="color: #000000"><u><strong>9) The two buggy png pics</strong></u></p>
<p style="color: #000000"><img src="/dotclear/images/rrdtool.png" /><br />
<img src="/dotclear/images/smokeping.png" /><br />
Download them, and overwrite those in C:\wamp\www\simg
</p>
<p align="left" style="color: #000000"><u><strong>10) And you&#039;re done</strong></u></p>
<p style="color: #000000"><img src="/dotclear/images/end.png" /></p>
<p align="left" style="color: #ff0000"><em>I&#039;m not a native English speaker, so if you find some orthographical or grammatical mistakes, please report it! </em></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>152</slash:comments>
		</item>
	</channel>
</rss>
