<?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; win32</title>
	<atom:link href="http://dev.pulsed.net/wp/?cat=6&#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 delete file older than X days with Perl and WMI</title>
		<link>http://dev.pulsed.net/wp/?p=8</link>
		<comments>http://dev.pulsed.net/wp/?p=8#comments</comments>
		<pubDate>Sun, 09 Jul 2006 16:23:26 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[wmi]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=8</guid>
		<description><![CDATA[Original idea: Microsoft Scripting Guys (link)
Ok, that&#039;s not that hard, some VBScript to Perl translation, a little modification and that&#039;s all!
I think it should work works remotely too (untested yet) by changing $strComputer with the targeted computer (you need some specific credentials).

my $strComputer = &#034;.&#034;;
&#034;.&#034; means local computer
my $maxage=15;
every file older than 15 days in [...]]]></description>
			<content:encoded><![CDATA[<p>Original idea: Microsoft Scripting Guys (<a target="_blank" href="http://www.microsoft.com/technet/scriptcenter/resources/begin/ss0706.mspx">link</a>)</p>
<p>Ok, that&#039;s not that hard, some VBScript to Perl translation, a little modification and that&#039;s all!</p>
<p><strike>I think</strike> it <strike>should work</strike> works remotely too <strike>(untested yet)</strike> by changing $strComputer with the targeted computer (you need some specific credentials).<br />
<span id="more-8"></span><br />
<em>my $strComputer = &#034;.&#034;;</em><br />
&#034;.&#034; means local computer</p>
<p><em>my $maxage=15;</em><br />
every file older than 15 days in $folder will be deleted</p>
<p>my $folder=&#034;c:\\temp&#034;;<br />
change this with the folder you want to check (<strong>WARNING: be careful</strong> to prevent unwanted file from being deleted, and do not forget to escape \ character everywhere)</p>
<p style="font-family: monospace; color: rgb(255, 0, 0);">[edited: July 10, 2006 &nbsp;11:00 pm =&gt; scan subfolders recursively;<br />uncomment #$_->Delete; after some tests to realy delete files]</p>
<p class="warning">[The requested file <kbd>http://dev.pulsed.net/wp/code/delete.pl</kbd> could not be found]</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Find your printers with Active Directory and Perl</title>
		<link>http://dev.pulsed.net/wp/?p=7</link>
		<comments>http://dev.pulsed.net/wp/?p=7#comments</comments>
		<pubDate>Thu, 06 Jul 2006 09:14:30 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[Active directory]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=7</guid>
		<description><![CDATA[Small perl script to find every printer in the active directory with perl

[The requested file http://dev.pulsed.net/wp/code/find_printers_with_AD_and_perl.pl could not be found]
]]></description>
			<content:encoded><![CDATA[<p>Small perl script to find every printer in the active directory with perl</p>
<p><span id="more-7"></span></p>
<p class="warning">[The requested file <kbd>http://dev.pulsed.net/wp/code/find_printers_with_AD_and_perl.pl</kbd> could not be found]</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=7</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>List locked accounts in a container or an OU using Perl</title>
		<link>http://dev.pulsed.net/wp/?p=4</link>
		<comments>http://dev.pulsed.net/wp/?p=4#comments</comments>
		<pubDate>Mon, 26 Jun 2006 16:05:43 +0000</pubDate>
		<dc:creator>Kevin DEHLINGER</dc:creator>
				<category><![CDATA[Active directory]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://dev.pulsed.net/wp/?p=4</guid>
		<description><![CDATA[Again, perl is a great language which could help you to save a lot of time (administration scripts, &#8230;)
Here&#039;s a perl script to list every locked accounts in a container or an OU!

[The requested file http://dev.pulsed.net/wp/code/locked_accounts.pl could not be found]
]]></description>
			<content:encoded><![CDATA[<p>Again, perl is a great language which could help you to save a lot of time (administration scripts, &#8230;)</p>
<p>Here&#039;s a perl script to list every locked accounts in a container or an OU!</p>
<p><span id="more-4"></span></p>
<p class="warning">[The requested file <kbd>http://dev.pulsed.net/wp/code/locked_accounts.pl</kbd> could not be found]</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.pulsed.net/wp/?feed=rss2&amp;p=4</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
