<?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>∞ Infinite ∞ Resolution &#187; System Security</title>
	<atom:link href="http://blog.stupidpoodles.com/category/technology/system-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stupidpoodles.com</link>
	<description>How big is that?</description>
	<lastBuildDate>Wed, 28 Jul 2010 02:40:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to use MD5 and SHA in C#</title>
		<link>http://blog.stupidpoodles.com/2009/07/how-to-use-md5-and-sha-in-csharp/</link>
		<comments>http://blog.stupidpoodles.com/2009/07/how-to-use-md5-and-sha-in-csharp/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 21:00:20 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Microsoft Visual C# .NET]]></category>
		<category><![CDATA[System Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Hashing]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[SHA]]></category>

		<guid isPermaLink="false">http://blog.stupidpoodles.com/?p=636</guid>
		<description><![CDATA[EDIT: To remove the &#8216;-&#8217; in the hashes, replace your &#8216;return&#8217; line with this: Regex.Replace(BitConverter.ToString(hashedBytes), "-", ""); Hashing in C# is quite a bit different then languages like PHP. In PHP to hash a string via MD5 you would simply use the md5 function as so: md5("string") Let&#8217;s stop complaining and get right down to [...]]]></description>
			<content:encoded><![CDATA[<p>EDIT: To remove the &#8216;-&#8217; in the hashes, replace your &#8216;return&#8217; line with this:</p>
<pre class="brush:csharp">Regex.Replace(BitConverter.ToString(hashedBytes), "-", "");</pre>
<p>Hashing in C# is quite a bit different then languages like PHP. In PHP to hash a string via MD5 you would simply use the md5 function as so:</p>
<pre class="brush:csharp">md5("string")</pre>
<p>Let&#8217;s stop complaining and get right down to it.</p>
<p>Create  a new Console project in either MS Visual C# or Mono. Make a new class after your main one. We&#8217;ll call it Hasher. Add the following to the top of your file.</p>
<pre class="brush:csharp">using System.Security.Cryptography;</pre>
<p>Now add the following code to your Hasher class</p>
<pre class="brush:csharp">public string Hash(string originalString)
{
Byte[] originalBytes;
Byte[] hashedBytes;
System.Security.Cryptography.MD5 md5;
md5 = new MD5CryptoServiceProvider();
originalBytes = ASCIIEncoding.Default.GetBytes(originalPassword);
encodedBytes = md5.ComputeHash(originalBytes);
return BitConverter.ToString(hashedBytes);
}</pre>
<p>I won&#8217;t explain this in much detail. Mainly for the reason that it&#8217;s fairly simple and for the most part self explanatory.</p>
<p>Now we need to make the front end. Add the following to your Main class.</p>
<pre class="brush:csharp">Console.Write("Enter your string: ");
string text = Console.ReadLine();
Hasher crypt = new Hasher();
string md5 = crypt.Hash(text);
Console.WriteLine("MD5: " + md5);</pre>
<p>That takes the input it gets in the terminal, puts it in the Hash function and then writes the result (the MD5 hash) to the console. Pretty simple stuff. Now we&#8217;re gonna do this with SHA.</p>
<p>C# supports four different types of SHA. SHA1, SHA256, SHA384, and finally SHA512. Here is the entire code for converting text to SHA1.</p>
<pre class="brush: csharp;">using System;
using System.Text;
using System.Security.Cryptography;
namespace SHA1
{
class MainClass
{
public static void Main(string[] args)
{
Console.Write(&quot;Enter your string: &quot;);
string text = Console.ReadLine();
Hasher crypt = new Hasher();
string sha1 = crypt.Hash(text);
Console.WriteLine(&quot;SHA1: &quot; + sha1);
}
}
class Hasher
{
public string Hash(string originalString)
{
Byte[] originalBytes;
Byte[] hashedBytes;
System.Security.Cryptography.SHA1 sha1;
sha1 = new SHA1CryptoServiceProvider();
originalBytes = ASCIIEncoding.Default.GetBytes(originalString);
hashedBytes = sha1.ComputeHash(originalBytes);
return BitConverter.ToString(hashedBytes);
}
}
}</pre>
<p>As you might have noticed it was largely a copy and paste of our MD5 hasher. The above script can also be modified to create different types of SHA hashes like those previously mentioned. Really, you can just switch out SHA1 with the other kind of SHA hash you want.  For instance instead of <code>System.Security.Cryptography.SHA1 sha1;</code> you could put <code>System.Security.Cryptography.SHA256 sha256;</code> And then change a few other instances.</p>
<p>I sorta wish C# provided an easy(er) way to convert hashes on the fly but to my knowledge it does not. You can stick these in your application and use them to give you the functionality C# doesn&#8217;t give us on its own. By the way, if you get any errors with the stuff I posted, all of them should be easily fixed. Let me know of my errors so I can fix them! <img src='http://blog.stupidpoodles.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Good luck! <img src='http://blog.stupidpoodles.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stupidpoodles.com/2009/07/how-to-use-md5-and-sha-in-csharp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>THT Chaos!</title>
		<link>http://blog.stupidpoodles.com/2008/12/tht-chaos/</link>
		<comments>http://blog.stupidpoodles.com/2008/12/tht-chaos/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 09:19:11 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[System Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tyreus]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[TheHostingTool]]></category>

		<guid isPermaLink="false">http://blog.stupidpoodles.com/2008/12/385/</guid>
		<description><![CDATA[TheHostingTool has really been giving us some trouble. The main problem at the moment is that no one can log into the Admin CP. We&#8217;re greeted with an unattractive Username / Password in correct message. My attempts to create a password (and salt) generator have failed and I&#8217;m just about to give up. If you [...]]]></description>
			<content:encoded><![CDATA[<p>TheHostingTool has really been giving us some trouble. The main problem at the moment is that no one can log into the Admin CP. We&#8217;re greeted with an unattractive Username / Password in correct message. My attempts to create a password (and salt) generator have failed and I&#8217;m just about to give up. If you have any ideas, please be sure to post a comment! <img src='http://blog.stupidpoodles.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>On a side note, I posted this with my brand new shiny iPod Touch. <img src='http://blog.stupidpoodles.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><a href="http://blog.stupidpoodles.com/wp-content/uploads/2008/12/p-480-320-5d731381-631d-4d6a-9efe-c576f6f38fc3.jpeg" rel="lightbox[385]"><img class="alignnone size-full wp-image-364" src="http://blog.stupidpoodles.com/wp-content/uploads/2008/12/p-480-320-5d731381-631d-4d6a-9efe-c576f6f38fc3.jpeg" alt="" width="200" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stupidpoodles.com/2008/12/tht-chaos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Recent Hackings</title>
		<link>http://blog.stupidpoodles.com/2008/11/recent-hackings/</link>
		<comments>http://blog.stupidpoodles.com/2008/11/recent-hackings/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 04:25:07 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[System Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tyreus]]></category>

		<guid isPermaLink="false">http://blog.stupidpoodles.com/?p=295</guid>
		<description><![CDATA[The servers at Tyreus.com have undergone some beatings from Arabian hackers. For more info read this annoucment thread &#8211;&#62; http://forums.tyreus.com/index.php?showtopic=1678 Looks like we&#8217;ve got it under control for now. We&#8217;ve increased security and we enocouage all of our clients to immediatly make backups and change all their passwords.]]></description>
			<content:encoded><![CDATA[<p>The servers at Tyreus.com have undergone some beatings from Arabian hackers. For more info read this annoucment thread &#8211;&gt; <a href="http://forums.tyreus.com/index.php?showtopic=1678">http://forums.tyreus.com/index.php?showtopic=1678</a> Looks like we&#8217;ve got it under control for now. We&#8217;ve increased security and we enocouage all of our clients to immediatly make backups and change all their passwords.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stupidpoodles.com/2008/11/recent-hackings/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tyreus Referrals 0.4</title>
		<link>http://blog.stupidpoodles.com/2008/11/tyreus-referrals-04/</link>
		<comments>http://blog.stupidpoodles.com/2008/11/tyreus-referrals-04/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 00:50:23 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Beta Testing]]></category>
		<category><![CDATA[System Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tyreus]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.stupidpoodles.com/?p=275</guid>
		<description><![CDATA[It&#8217;s finally here! The actual referral core is in incorporated! It also includes some major security updates. Bete testing has also been started with the Tyreus.com Staff Not much more to post here. I&#8217;ll keep you guys updated with the testing!]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s finally here! The actual referral core is in incorporated! <img src='http://blog.stupidpoodles.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  It also includes some major security updates. Bete testing has also been started with the Tyreus.com Staff Not much more to post here. I&#8217;ll keep you guys updated with the testing!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stupidpoodles.com/2008/11/tyreus-referrals-04/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tyreus Referrals 0.3.9</title>
		<link>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-039/</link>
		<comments>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-039/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 01:00:39 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[Beta Testing]]></category>
		<category><![CDATA[System Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tyreus]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tyreus Referrals]]></category>

		<guid isPermaLink="false">http://blog.stupidpoodles.com/?p=256</guid>
		<description><![CDATA[Referrals 0.3.9 includes three new features! As well as security updates. I won&#8217;t really explain any of them sice it&#8217;s REALLY obvious what they do. The Debug feature, however, just prints the $_SESSION super global. Useful to see what&#8217;s in your Session. It&#8217;ll be removed when I no longer need it. I&#8217;ll also be rounding [...]]]></description>
			<content:encoded><![CDATA[<p>Referrals 0.3.9 includes three new features! As well as security updates. I won&#8217;t really explain any of them sice it&#8217;s REALLY obvious what they do. The Debug feature, however, just prints the <code>$_SESSION</code> super global. Useful to see what&#8217;s in your Session. It&#8217;ll be removed when I no longer need it.</p>
<p>I&#8217;ll also be rounding up so Beta testers. And I&#8217;ll make a serperate post on that soon. Stay tuned for further updates and goodieness. <img src='http://blog.stupidpoodles.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-039/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tyreus Referrals 0.3.5b</title>
		<link>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-035b/</link>
		<comments>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-035b/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 01:00:25 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[System Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tyreus]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.stupidpoodles.com/?p=216</guid>
		<description><![CDATA[I just fixed a bug in the login system that would allow non validated accounts to log in. This is just a quick and major security update.]]></description>
			<content:encoded><![CDATA[<p>I just fixed a bug in the login system that would allow non validated accounts to log in. This is just a quick and major security update.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-035b/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tyreus Referrals 0.3.5</title>
		<link>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-035/</link>
		<comments>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-035/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 23:30:06 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[System Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tyreus]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.stupidpoodles.com/?p=163</guid>
		<description><![CDATA[Version 0.3.5 incorporates some various new features as well as minor security fixes. It also includes some various changes to the login script to allow for the future Admin CP! MySQL and table prefix support is coming soon! At the moment you can only use the MySQLi (MySQL Improved) method. I have developed a function [...]]]></description>
			<content:encoded><![CDATA[<p>Version 0.3.5 incorporates some various new features as well as minor security fixes. It also includes some various changes to the login script to allow for the future Admin CP! <strong>MySQL and table prefix support is coming soon!</strong> At the moment you can only use the MySQLi (MySQL Improved) method. I have developed a function that will allow you to change between MySQL and MySQLi at any time. Useful if you ever need to switch severs and they don&#8217;t support one of the two methods. Two new features have been added. The ability to change your email and password directly from the User CP.</p>
<p>My next project/release will be focusing on the MySQL/MySQLi compatibility and include some security fixes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-035/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tyreus Referrals 0.3.2</title>
		<link>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-032/</link>
		<comments>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-032/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 23:10:21 +0000</pubDate>
		<dc:creator>Kevin</dc:creator>
				<category><![CDATA[System Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tyreus]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tyreus Referrals]]></category>

		<guid isPermaLink="false">http://blog.stupidpoodles.com/?p=132</guid>
		<description><![CDATA[Today I updated the script with some security updates to help make the &#8220;password protected&#8221; pages more secure. Here is the change log. refurl.php &#8211; Added a message so that when a user is not logged in they will not be shown anything accept an error message. changemail.php &#8211; Same as above. Also added finished [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-135" style="padding: 5px;" title="Tyreus Referrals Small Logo" src="http://blog.stupidpoodles.com/wp-content/uploads/2008/10/tyreusrefsmall.png" alt="" width="150" height="67" />Today I updated the script with some security updates to help make the &#8220;password protected&#8221; pages more secure. Here is the change log.</p>
<ul>
<li>refurl.php &#8211; Added a message so that when a user is not logged in they will not be shown anything accept an error message.</li>
<li>changemail.php &#8211; Same as above. Also added finished up other things.</li>
<li>inc/changemail_process.php &#8211; Started working on the processing script for the above.</li>
</ul>
<p>Now for most of you this might sound like jibberish. But I have no idea why I&#8217;m posting this. <img src='http://blog.stupidpoodles.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  If i had to give a version number down to the build it would probably something like &#8220;0.3.2&#8243;. I hope to have the program somewhat useable in a production enviroment (<a title="Tyreus.com" href="http://tyreus.com/" target="_blank">Tyreus.com</a> for instance) by &#8220;0.5&#8243; and then have some sort have Admin CP by &#8220;1.0&#8243; <img src='http://blog.stupidpoodles.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.stupidpoodles.com/2008/10/tyreus-referrals-032/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
