<?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> &#187; Tools &amp; sources</title>
	<atom:link href="http://www.megapanzer.com/category/tools-sources/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.megapanzer.com</link>
	<description></description>
	<lastBuildDate>Fri, 23 Dec 2011 13:02:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>AyCarrumba &#8230; testing</title>
		<link>http://www.megapanzer.com/2011/12/23/aycarrumba-testing/</link>
		<comments>http://www.megapanzer.com/2011/12/23/aycarrumba-testing/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 13:02:33 +0000</pubDate>
		<dc:creator>carrumba</dc:creator>
				<category><![CDATA[Info]]></category>
		<category><![CDATA[Tools & sources]]></category>

		<guid isPermaLink="false">http://www.megapanzer.com/?p=5945</guid>
		<description><![CDATA[Well, the last missing features like depoisoning, correctly working half-duplex MITM with ARP poisoning and parsing DNS requests are finally implemented. Testing outside my own test environment will start at about 26. december. Bugfixing will take some time and I think after new year version 1.0 is available for download. 15/18 Dec. as dead line [...]]]></description>
			<content:encoded><![CDATA[<glossarycode><glossarycode><p><img src="http://www.megapanzer.com/wp-content/uploads/information-150x150.jpg" alt="" title="information" width="75" height="75" class="alignright size-thumbnail wp-image-2871" />Well, the last missing features like depoisoning, correctly working half-duplex <a class="glossaryLink" href="http://www.megapanzer.com/?page_id=1430" title="Glossary: MITM" target="_blank">MITM</a> with ARP poisoning and parsing DNS requests are finally implemented. Testing outside my own test environment will start at about 26. december. <a class="glossaryLink" href="http://www.megapanzer.com/" title="Glossary: Bug" target="_blank">Bugfixing</a> will take some time and I think after new year version 1.0 is available for download.</p>
<p>15/18 Dec. as dead line didn&#8217;t work. Sorry for that but as it is a private project without commercial interests, withouth stakeholders and so no pressure from outside : it&#8217;s there when it&#8217;s there.</p>
<p>Also I think some lines about the motivation behinde this project, the objectives and counter measures are necessary so also people without deeper technical background can see, understand and mainly react appropriately to this situation. </p></glossarycode></glossarycode>]]></content:encoded>
			<wfw:commentRss>http://www.megapanzer.com/2011/12/23/aycarrumba-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TCPReassemble</title>
		<link>http://www.megapanzer.com/2011/11/25/tcpreassemble/</link>
		<comments>http://www.megapanzer.com/2011/11/25/tcpreassemble/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 21:11:33 +0000</pubDate>
		<dc:creator>carrumba</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Tools & sources]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.megapanzer.com/?p=5918</guid>
		<description><![CDATA[As mentioned earlier I&#8217;m going to upload sources that belong to the prototype of the new project. And as it is new, alpha and tested in a modest scope I cant guarantee it&#8217;s working without faults. In case you encounter problems let me know and drop a mail. TCPReassemble, as the name says, reassembles TCP [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.megapanzer.com/wp-content/uploads/App.jpg"><img src="http://www.megapanzer.com/wp-content/uploads/App-150x150.jpg" alt="" title="App" width="75" height="75" class="alignright size-thumbnail wp-image-3567" /></a>As mentioned earlier I&#8217;m going to upload sources that belong to the prototype of the new project. And as it is new, alpha and tested in a modest scope I cant guarantee it&#8217;s working without faults. </p>
<p>In case you encounter problems let me know and drop a mail.</p>
<p>TCPReassemble, as the name says, reassembles TCP data streams. Not perfectly and only a part of the stream as that was not the requirement. But the first steps are done that allows you to add further code to control the streams.<br />
I ignore IP fragments (has it an influence at all?), wrong checksums and the order of the packets.</p>
<p>You can find the source <a href="http://www.megapanzer.com/wp-content/uploads/TCPReassemble.zip" title="TCPReassemble">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.megapanzer.com/2011/11/25/tcpreassemble/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scanning a network with ARPScanner</title>
		<link>http://www.megapanzer.com/2011/01/23/scanning-a-network-with-arpscanner/</link>
		<comments>http://www.megapanzer.com/2011/01/23/scanning-a-network-with-arpscanner/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 13:41:21 +0000</pubDate>
		<dc:creator>carrumba</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[Coders corner]]></category>
		<category><![CDATA[Tools & sources]]></category>

		<guid isPermaLink="false">http://www.megapanzer.com/?p=4998</guid>
		<description><![CDATA[Tool name : ARPScanner &#160; Description : ARPScanner is tool to scan an IP range based on ARP requests/replies. &#160; Tested on : Win XP &#160; Feedback : In case you encounter any problems with the tool, you have suggestions to improve it, or you tested it with a Windows version i&#8217;ve not yet tested [...]]]></description>
			<content:encoded><![CDATA[<table border="0" width="100%">
<tbody>
<tr valign="top">
<td width="30%"></td>
<td width="70%"></td>
</tr>
<tr valign="top">
<td><strong>Tool name</strong> :</td>
<td>ARPScanner<img src="http://www.megapanzer.com/wp-content/uploads/App-150x150.jpg" alt="" title="App" width="75" height="75" class="alignright size-thumbnail wp-image-3567" /></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr valign="top">
<td><strong>Description</strong> :</td>
<td>ARPScanner is tool to scan an IP range based on ARP requests/replies.
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr valign="top">
<td><strong>Tested on</strong> :</td>
<td>Win XP</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr valign="top">
<td><strong>Feedback</strong> :</td>
<td>In case you encounter any problems with the tool, you have suggestions to improve it, or you tested it with a Windows version i&#8217;ve not yet tested please drop me an <a href="http://www.megapanzer.com/contact/">email</a>.</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr valign="top">
<td><strong>Downloads</strong> :</td>
<td>Version 0.1 &#8211; <a href="http://www.megapanzer.com/wp-content/uploads/ARPScanner.zip">Binary &#038; source</a></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr valign="top">
<td><strong>Screen shots</strong> :</td>
<td><a href="http://www.megapanzer.com/wp-content/uploads/ARPScanner.jpg" target="_blank"><img src="http://www.megapanzer.com/wp-content/uploads/ARPScanner-300x264.jpg" alt="" title="ARPScanner" width="150" height="132" class="alignright size-medium wp-image-4999" /></a></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.megapanzer.com/2011/01/23/scanning-a-network-with-arpscanner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Killing a process</title>
		<link>http://www.megapanzer.com/2011/01/11/c-killing-a-process/</link>
		<comments>http://www.megapanzer.com/2011/01/11/c-killing-a-process/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 13:01:00 +0000</pubDate>
		<dc:creator>carrumba</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Coders corner]]></category>
		<category><![CDATA[Tools & sources]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[Process]]></category>

		<guid isPermaLink="false">http://www.megapanzer.com/?p=4610</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 using System; using System.Diagnostics; &#160; &#160; namespace MyProcesses &#123; class MyProcesses &#123; static [...]]]></description>
			<content:encoded><![CDATA[<p><br/><br />
<br/></p>
<div style="width: 515px;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Diagnostics</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> MyProcesses
<span style="color: #008000;">&#123;</span>
    <span style="color: #6666cc; font-weight: bold;">class</span> MyProcesses
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> args<span style="color: #008000;">&#41;</span> 
        <span style="color: #008000;">&#123;</span>
            Process lProc <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Process<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">/*
             * Starting an instance of IE. 
             * 
             */</span>
&nbsp;
            lProc<span style="color: #008000;">.</span><span style="color: #0000FF;">StartInfo</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FileName</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;iexplore.exe&quot;</span><span style="color: #008000;">;</span>
            lProc<span style="color: #008000;">.</span><span style="color: #0000FF;">StartInfo</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Arguments</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;www.megapanzer.com&quot;</span><span style="color: #008000;">;</span>
            lProc<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hit any key to kill IE&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Console<span style="color: #008000;">.</span><span style="color: #0000FF;">Read</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
            <span style="color: #008080; font-style: italic;">/*
             * Browsing through the process list and killing
             * all IE instances.
             * 
             */</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>Process lProcess <span style="color: #0600FF; font-weight: bold;">in</span> Process<span style="color: #008000;">.</span><span style="color: #0000FF;">GetProcessesByName</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;iexplore&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #0600FF; font-weight: bold;">try</span>
                <span style="color: #008000;">&#123;</span>
                    lProcess<span style="color: #008000;">.</span><span style="color: #0000FF;">Kill</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #008000;">&#125;</span>
                <span style="color: #0600FF; font-weight: bold;">catch</span> <span style="color: #008000;">&#40;</span>Exception e<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><span style="color: #008000;">&#125;</span>
            <span style="color: #008000;">&#125;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

</div>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.megapanzer.com/2011/01/11/c-killing-a-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Starting a new process</title>
		<link>http://www.megapanzer.com/2011/01/07/c-starting-a-new-process/</link>
		<comments>http://www.megapanzer.com/2011/01/07/c-starting-a-new-process/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 13:44:35 +0000</pubDate>
		<dc:creator>carrumba</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Coders corner]]></category>
		<category><![CDATA[Tools & sources]]></category>
		<category><![CDATA[Process]]></category>

		<guid isPermaLink="false">http://www.megapanzer.com/?p=4606</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 using System; using System.Diagnostics; &#160; &#160; namespace MyProcesses &#123; class MyProcesses &#123; static void Main&#40;string&#91;&#93; args&#41; &#123; Process lProc = new Process&#40;&#41;; &#160; lProc.StartInfo.FileName = &#34;iexplore.exe&#34;; lProc.StartInfo.Arguments [...]]]></description>
			<content:encoded><![CDATA[<p><br/><br />
<br/></p>
<div style="width: 515px;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Diagnostics</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> MyProcesses
<span style="color: #008000;">&#123;</span>
    <span style="color: #6666cc; font-weight: bold;">class</span> MyProcesses
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> args<span style="color: #008000;">&#41;</span> 
        <span style="color: #008000;">&#123;</span>
            Process lProc <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Process<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            lProc<span style="color: #008000;">.</span><span style="color: #0000FF;">StartInfo</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FileName</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;iexplore.exe&quot;</span><span style="color: #008000;">;</span>
            lProc<span style="color: #008000;">.</span><span style="color: #0000FF;">StartInfo</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Arguments</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;www.megapanzer.com&quot;</span><span style="color: #008000;">;</span>
            lProc<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            Console<span style="color: #008000;">.</span><span style="color: #0000FF;">Read</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">try</span>
            <span style="color: #008000;">&#123;</span>
                lProc<span style="color: #008000;">.</span><span style="color: #0000FF;">Kill</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
            <span style="color: #0600FF; font-weight: bold;">catch</span> <span style="color: #008000;">&#40;</span>Exception e<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
            <span style="color: #008000;">&#125;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

</div>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.megapanzer.com/2011/01/07/c-starting-a-new-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Listing all running processes</title>
		<link>http://www.megapanzer.com/2011/01/06/c-listing-all-running-processes/</link>
		<comments>http://www.megapanzer.com/2011/01/06/c-listing-all-running-processes/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 14:04:06 +0000</pubDate>
		<dc:creator>carrumba</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Coders corner]]></category>
		<category><![CDATA[Tools & sources]]></category>
		<category><![CDATA[Process]]></category>

		<guid isPermaLink="false">http://www.megapanzer.com/?p=4600</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 using System; using System.Diagnostics; &#160; &#160; namespace MyProcesses &#123; class MyProcesses &#123; &#160; public static void Main&#40;&#41; &#123; Process&#91;&#93; lProcList = Process.GetProcesses&#40;&#41;; &#160; foreach&#40;Process lProc in lProcList&#41; Console.WriteLine&#40;&#34;Process: {0} ID: {1}&#34;, lProc.ProcessName, lProc.Id&#41;; &#160; &#125; &#125; [...]]]></description>
			<content:encoded><![CDATA[<p><br/><br />
<br/></p>
<div style="width: 515px;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Diagnostics</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> MyProcesses
<span style="color: #008000;">&#123;</span>
    <span style="color: #6666cc; font-weight: bold;">class</span> MyProcesses
    <span style="color: #008000;">&#123;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            Process<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> lProcList <span style="color: #008000;">=</span> Process<span style="color: #008000;">.</span><span style="color: #0000FF;">GetProcesses</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">foreach</span><span style="color: #008000;">&#40;</span>Process lProc <span style="color: #0600FF; font-weight: bold;">in</span> lProcList<span style="color: #008000;">&#41;</span>
                Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Process: {0} ID: {1}&quot;</span>, lProc<span style="color: #008000;">.</span><span style="color: #0000FF;">ProcessName</span>, lProc<span style="color: #008000;">.</span><span style="color: #0000FF;">Id</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

</div>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.megapanzer.com/2011/01/06/c-listing-all-running-processes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Listing the Windows environment variables</title>
		<link>http://www.megapanzer.com/2011/01/03/c-listing-the-windows-environment-variables/</link>
		<comments>http://www.megapanzer.com/2011/01/03/c-listing-the-windows-environment-variables/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 14:49:10 +0000</pubDate>
		<dc:creator>carrumba</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Coders corner]]></category>
		<category><![CDATA[Tools & sources]]></category>
		<category><![CDATA[Environment]]></category>

		<guid isPermaLink="false">http://www.megapanzer.com/?p=4596</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 using System; using System.Collections; &#160; &#160; namespace MyEnvironment &#123; class MyEnvironment &#123; &#160; public static void Main&#40;&#41; &#123; &#160; /* * List all environment variables * */ &#160; foreach &#40;DictionaryEntry lVar in [...]]]></description>
			<content:encoded><![CDATA[<p><br/><br />
<br/></p>
<div style="width: 515px;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> MyEnvironment
<span style="color: #008000;">&#123;</span>
    <span style="color: #6666cc; font-weight: bold;">class</span> MyEnvironment
    <span style="color: #008000;">&#123;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">/*
             * List all environment variables
             * 
             */</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>DictionaryEntry lVar <span style="color: #0600FF; font-weight: bold;">in</span> Environment<span style="color: #008000;">.</span><span style="color: #0000FF;">GetEnvironmentVariables</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
                Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;{0}<span style="color: #008080; font-weight: bold;">\t</span>{1}&quot;</span>, lVar<span style="color: #008000;">.</span><span style="color: #0000FF;">Key</span>, lVar<span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

</div>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.megapanzer.com/2011/01/03/c-listing-the-windows-environment-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Listing all running services</title>
		<link>http://www.megapanzer.com/2011/01/01/c-listing-all-running-services/</link>
		<comments>http://www.megapanzer.com/2011/01/01/c-listing-all-running-services/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 14:14:11 +0000</pubDate>
		<dc:creator>carrumba</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Coders corner]]></category>
		<category><![CDATA[Tools & sources]]></category>
		<category><![CDATA[Services]]></category>

		<guid isPermaLink="false">http://www.megapanzer.com/?p=4603</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 using System; using System.ServiceProcess; using System.Text; &#160; &#160; namespace MyProcesses &#123; class MyProcesses &#123; static void Main&#40;string&#91;&#93; args&#41; &#123; ServiceController&#91;&#93; lServices = ServiceController.GetServices&#40;&#41;; &#160; foreach &#40;ServiceController lServcie in ServiceController.GetServices&#40;&#41;&#41; &#123; Console.WriteLine&#40;&#34;{0} -&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><br/><br />
<br/></p>
<div style="width: 515px;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.ServiceProcess</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> MyProcesses
<span style="color: #008000;">&#123;</span>
    <span style="color: #6666cc; font-weight: bold;">class</span> MyProcesses
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> args<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            ServiceController<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> lServices <span style="color: #008000;">=</span> ServiceController<span style="color: #008000;">.</span><span style="color: #0000FF;">GetServices</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>ServiceController lServcie <span style="color: #0600FF; font-weight: bold;">in</span> ServiceController<span style="color: #008000;">.</span><span style="color: #0000FF;">GetServices</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;{0} -&gt; {1}&quot;</span>,
                    lServcie<span style="color: #008000;">.</span><span style="color: #0000FF;">DisplayName</span>, lServcie<span style="color: #008000;">.</span><span style="color: #0000FF;">ServiceName</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
&nbsp;
            Console<span style="color: #008000;">.</span><span style="color: #0000FF;">Read</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

</div>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.megapanzer.com/2011/01/01/c-listing-all-running-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Creating a hash/associative array</title>
		<link>http://www.megapanzer.com/2010/12/30/c-creating-a-hashassociative-array/</link>
		<comments>http://www.megapanzer.com/2010/12/30/c-creating-a-hashassociative-array/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 13:48:56 +0000</pubDate>
		<dc:creator>carrumba</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Coders corner]]></category>
		<category><![CDATA[Tools & sources]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[Associative Array]]></category>
		<category><![CDATA[Hash]]></category>

		<guid isPermaLink="false">http://www.megapanzer.com/?p=4593</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 using System; using System.Collections; &#160; &#160; namespace MyHashtable &#123; class MyHashtable &#123; &#160; public static void Main&#40;&#41; &#123; Hashtable lHash = [...]]]></description>
			<content:encoded><![CDATA[<p><br/><br />
<br/></p>
<div style="width: 515px;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> MyHashtable
<span style="color: #008000;">&#123;</span>
    <span style="color: #6666cc; font-weight: bold;">class</span> MyHashtable
    <span style="color: #008000;">&#123;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            Hashtable lHash <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Hashtable<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">/*
             * Populate hashtable 
             * 
             */</span>
&nbsp;
            lHash<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;zero&quot;</span>, <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            lHash<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;uno&quot;</span>, <span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            lHash<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;due&quot;</span>, <span style="color: #FF0000;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            lHash<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;tre&quot;</span>, <span style="color: #FF0000;">3</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            lHash<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;quattro&quot;</span>, <span style="color: #FF0000;">4</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            lHash<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;cinque&quot;</span>, <span style="color: #FF0000;">5</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span>DictionaryEntry lItem <span style="color: #0600FF; font-weight: bold;">in</span> lHash<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #000000;">System</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Console</span><span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot; - &quot;</span> <span style="color: #008000;">+</span> lItem<span style="color: #008000;">.</span><span style="color: #0000FF;">Key</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span>
                                         <span style="color: #666666;">&quot; / &quot;</span> <span style="color: #008000;">+</span> lItem<span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

</div>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.megapanzer.com/2010/12/30/c-creating-a-hashassociative-array/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Creating a timer</title>
		<link>http://www.megapanzer.com/2010/12/27/c-creating-a-timer/</link>
		<comments>http://www.megapanzer.com/2010/12/27/c-creating-a-timer/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 14:24:57 +0000</pubDate>
		<dc:creator>carrumba</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Coders corner]]></category>
		<category><![CDATA[Tools & sources]]></category>
		<category><![CDATA[Timer]]></category>

		<guid isPermaLink="false">http://www.megapanzer.com/?p=4590</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 using System; using System.Timers; &#160; &#160; namespace MyTimer &#123; class MyTimer [...]]]></description>
			<content:encoded><![CDATA[<p><br/><br />
<br/></p>
<div style="width: 515px;">

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Timers</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> MyTimer
<span style="color: #008000;">&#123;</span>
    <span style="color: #6666cc; font-weight: bold;">class</span> MyTimer
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">int</span> mCounter <span style="color: #008000;">=</span> <span style="color: #FF0000;">5</span><span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> Timer lTimer <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Timer<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            lTimer<span style="color: #008000;">.</span><span style="color: #0000FF;">Elapsed</span> <span style="color: #008000;">+=</span> <span style="color: #008000;">new</span> ElapsedEventHandler<span style="color: #008000;">&#40;</span>TimerTick<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            lTimer<span style="color: #008000;">.</span><span style="color: #0000FF;">Interval</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">1000</span><span style="color: #008000;">;</span>
            lTimer<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">/*
             * The timer is activated and is activated in a 1000 ms
             * interval. 
             * 
             */</span>
&nbsp;
            <span style="color: #000000;">System</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Console</span><span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hit enter to stop program&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #000000;">System</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Console</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ReadLine</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            lTimer<span style="color: #008000;">.</span><span style="color: #0000FF;">Stop</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> TimerTick<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">object</span> sender, EventArgs e<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #000000;">System</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Console</span><span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Counter : &quot;</span> <span style="color: #008000;">+</span> mCounter<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            mCounter<span style="color: #008000;">--;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>mCounter <span style="color: #008000;">&lt;</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                lTimer<span style="color: #008000;">.</span><span style="color: #0000FF;">Stop</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                Environment<span style="color: #008000;">.</span><span style="color: #0000FF;">Exit</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

</div>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.megapanzer.com/2010/12/27/c-creating-a-timer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

