<?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>m&#178;tec</title>
	<atom:link href="http://m2tec.be/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://m2tec.be/blog</link>
	<description></description>
	<lastBuildDate>Tue, 16 Mar 2010 20:28:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>phpBB2CH to phpBB3</title>
		<link>http://m2tec.be/blog/2010/03/16/phpbb2ch-to-phpbb3-00131</link>
		<comments>http://m2tec.be/blog/2010/03/16/phpbb2ch-to-phpbb3-00131#comments</comments>
		<pubDate>Tue, 16 Mar 2010 19:56:48 +0000</pubDate>
		<dc:creator>Tom V</dc:creator>
				<category><![CDATA[phpBB3]]></category>
		<category><![CDATA[Categories Hierarchy]]></category>
		<category><![CDATA[Converter]]></category>
		<category><![CDATA[Ptifo]]></category>
		<category><![CDATA[download]]></category>

		<guid isPermaLink="false">http://m2tec.be/blog/?p=131</guid>
		<description><![CDATA[Converting phpBB2CH aka Ptifo to phpBB3 On my  installed board (still partially found on m2tec.be/forum) I installed phpBB2CH (Categories Hierarchy)  also known as Ptifo. Basically it adds sub-forums, forum links, advanced permissions, board announcements and many more features. It broke support with most (or better said with almost all) mods for phpBB2. But had or has a [...]]]></description>
			<content:encoded><![CDATA[<h1>Converting phpBB2CH aka Ptifo to phpBB3</h1>
<p>On my  installed board (still partially found on <a href="http://m2tec.be/forum">m2tec.be/forum</a>) I installed phpBB2CH (Categories Hierarchy)  also known as Ptifo.</p>
<p>Basically it adds sub-forums, forum links, advanced permissions, board announcements and many more features.<br />
It broke support with most (or better said with almost all) mods for phpBB2. But had or has a pretty large community (ptifo.clanmckeen.com is offline at the moment of writing).</p>
<p>As phpBB3 came out and there was also build-in support for those features, I wished to upgrade. But because of the changes on phpBB2, the phpBB2 converters wasn&#8217;t converting half of my forum settings. So I needed to create a converter. As the basics where the same I could use the phpBB2 converter to start with.</p>
<p>Yesterday somebody contacted me, and said the converter wasn&#8217;t working anymore. As my converter was basically made for phpBB 3.0.2 and the current version is phpBB 3.0.7-PL1, I can understand why.</p>
<p>I updated my converter to work with phpBB 3.0.7-PL1, and so here you can find the converter for phpbb2CH to phpBB 3.0.7-PL1.<br />
It isn&#8217;t 100% testing on all functions, but most stuff is converted. The predefined permissions aren&#8217;t, as they are (almost) impossible to do.</p>
<p>A few thing you maybe want to know:</p>
<ul>
<li>main admins will be admins with founder status</li>
<li>admins and main admins will both in the admin group.</li>
<li>attachments are converted</li>
</ul>
<p>If you find any bugs, tell me, I&#8217;m happy to solve them.</p>
<a href="http://m2tec.be/blog/wp-content/plugins/download-monitor/download.php?id=1" rel="nofollow" title="Downloaded 89 times">phpbb2CH to phpBB 3.0.7-PL1 (rarred)</a><br />
<a href="http://m2tec.be/blog/wp-content/plugins/download-monitor/download.php?id=2" rel="nofollow" title="Downloaded 92 times">phpbb2CH to phpBB 3.0.7-PL1 (zipped)</a>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://m2tec.be/blog/2010/03/16/phpbb2ch-to-phpbb3-00131/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Java MD5 (hex)</title>
		<link>http://m2tec.be/blog/2010/02/03/java-md5-hex-0093</link>
		<comments>http://m2tec.be/blog/2010/02/03/java-md5-hex-0093#comments</comments>
		<pubDate>Wed, 03 Feb 2010 17:51:29 +0000</pubDate>
		<dc:creator>Tom V</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[hex]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://m2tec.be/blog/?p=93</guid>
		<description><![CDATA[I needed to make a program in java which logins with the vBulletin login system. As you may know, many php boards use MD5 for hashing passwords. vBulletin uses a &#8220;more advanced way&#8221; of hashing, just like phpBB3. phpBB2 used just old plain MD5 hashes. So I needed to find out how I could use MD5 in [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to make a program in java which logins with the vBulletin login system.<br />
As you may know, many php boards use MD5 for hashing passwords.<br />
vBulletin uses a &#8220;more advanced way&#8221; of hashing, just like phpBB3. phpBB2 used just old plain MD5 hashes.<br />
So I needed to find out how I could use MD5 in java.</p>
<p>Off course there is no MD5 function like in php .<br />
That&#8217;s why I searched a function that can do it, a little search on google like &#8220;java MD5 function&#8221; and so I looked at the first pages links and tried the functions that weren&#8217;t too long.</p>
<h1>FAIL</h1>
<p>I created the vBulletin login system in java and with the first test account I could login &#8230;. BUT my own login failed <img src='http://m2tec.be/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> . Quite irritating if you try 10 passes, all work and when you put it live, many people complaining they can&#8217;t login&#8230;</p>
<p>As I got &#8220;lucky&#8221; with my pass, I found that my hashed login was wrong, so after some debugging I found a 0 (zero) was missing in the first MD5. So the MD5 function was WRONG:(</p>
<p>As a test, I created a program that creates random passwords and create the MD5 of it with the functions I found on different sites (found by using  google).</p>
<h3>Extra info</h3>
<p>Both MySQL and php&#8217;s MD5 function has a hex notation, clearly not all MD5-functions found are hex notated, this is not a must, but off course needed for being compatible with php/MySQL.</p>
<h1>The problem</h1>
<p>In the next image you can see the standard behavior of the MD5-function found.<br />
Most of them looks okay, but notice that the one from bombaydigital uses uppercase hex notation, and by using it for another round with MD5 it will go wrong.<br />
The one found on Stockoverflow clearly doesn&#8217;t use hex-notation. And the one from Spiration, lost a 0 (zero).</p>
<div id="attachment_101" class="wp-caption alignnone" style="width: 310px"><a href="http://m2tec.be/blog/wp-content/uploads/2010/02/single-md5.png" rel="lightbox[93]" title="single-md5"><img class="size-medium wp-image-101" title="single-md5" src="http://m2tec.be/blog/wp-content/uploads/2010/02/single-md5-300x140.png" alt="" width="300" height="140" /></a><p class="wp-caption-text">MD5 function output from different sites</p></div>
<p>With double MD5 you see the differences even faster, like shown in the next image:</p>
<div id="attachment_104" class="wp-caption alignnone" style="width: 310px"><a href="http://m2tec.be/blog/wp-content/uploads/2010/02/double-md5.png" rel="lightbox[93]" title="double-md5"><img class="size-medium wp-image-104" title="double-md5" src="http://m2tec.be/blog/wp-content/uploads/2010/02/double-md5-300x140.png" alt="" width="300" height="140" /></a><p class="wp-caption-text">differences seen by using double use of MD5 functions found for java</p></div>
<p>The first marked line, you see that Spiration&#8217;s MD5 is wrong, in the second marked line, you see Spirition&#8217;s MD5 is ok. So it&#8217;s not reliable.<br />
In the first and second marked lines you can see that dzone&#8217;s MD5  is ok, but the thirth and fourth are wrong. Also, not reliable.<br />
As noted by single MD5, StockOverflow is not hex and bombaydigital is uppercase, so both functions aren&#8217;t giving me the expected output.</p>
<h1>The right solution</h1>
<p>This leaves us with the one from twmacinta, clearly it&#8217;s working, but in code, I needed 779 lines (including comment)<br />
But it&#8217;s not really worth if it can be done in nearly 10 lines of code.</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">JAVA HEX MD5</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://m2tec.be/blog/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://m2tec.be/blog/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://m2tec.be/blog/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://m2tec.be/blog/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><div class="java" style="font-family:monospace;"><pre class="de1"><span class="kw1">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3Astring+java.sun.com_amp_btnI=I_27m_20Feeling_20Lucky&amp;referer=');"><span class="kw3">String</span></a> MD5<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3Astring+java.sun.com_amp_btnI=I_27m_20Feeling_20Lucky&amp;referer=');"><span class="kw3">String</span></a> md5<span class="br0">&#41;</span> <span class="br0">&#123;</span>
   <span class="kw1">try</span> <span class="br0">&#123;</span>
        java.<span class="me1">security</span>.<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amessagedigest+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3Amessagedigest+java.sun.com_amp_btnI=I_27m_20Feeling_20Lucky&amp;referer=');"><span class="kw3">MessageDigest</span></a> md <span class="sy0">=</span> java.<span class="me1">security</span>.<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amessagedigest+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3Amessagedigest+java.sun.com_amp_btnI=I_27m_20Feeling_20Lucky&amp;referer=');"><span class="kw3">MessageDigest</span></a>.<span class="me1">getInstance</span><span class="br0">&#40;</span><span class="st0">&quot;MD5&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
        <span class="kw4">byte</span><span class="br0">&#91;</span><span class="br0">&#93;</span> array <span class="sy0">=</span> md.<span class="me1">digest</span><span class="br0">&#40;</span>md5.<span class="me1">getBytes</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astringbuffer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3Astringbuffer+java.sun.com_amp_btnI=I_27m_20Feeling_20Lucky&amp;referer=');"><span class="kw3">StringBuffer</span></a> sb <span class="sy0">=</span> <span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astringbuffer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3Astringbuffer+java.sun.com_amp_btnI=I_27m_20Feeling_20Lucky&amp;referer=');"><span class="kw3">StringBuffer</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
        <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw4">int</span> i <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span> i <span class="sy0">&lt;</span> array.<span class="me1">length</span><span class="sy0">;</span> <span class="sy0">++</span>i<span class="br0">&#41;</span> <span class="br0">&#123;</span>
          sb.<span class="me1">append</span><span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ainteger+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3Ainteger+java.sun.com_amp_btnI=I_27m_20Feeling_20Lucky&amp;referer=');"><span class="kw3">Integer</span></a>.<span class="me1">toHexString</span><span class="br0">&#40;</span><span class="br0">&#40;</span>array<span class="br0">&#91;</span>i<span class="br0">&#93;</span> <span class="sy0">&amp;</span> 0xFF<span class="br0">&#41;</span> <span class="sy0">|</span> 0x100<span class="br0">&#41;</span>.<span class="me1">substring</span><span class="br0">&#40;</span>1,3<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
       <span class="br0">&#125;</span>
        <span class="kw1">return</span> sb.<span class="me1">toString</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="br0">&#125;</span> <span class="kw1">catch</span> <span class="br0">&#40;</span>java.<span class="me1">security</span>.<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Anosuchalgorithmexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky" onclick="pageTracker._trackPageview('/outgoing/www.google.com/search?hl=en_amp_q=allinurl_3Anosuchalgorithmexception+java.sun.com_amp_btnI=I_27m_20Feeling_20Lucky&amp;referer=');"><span class="kw3">NoSuchAlgorithmException</span></a> e<span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="br0">&#125;</span>
    <span class="kw1">return</span> <span class="kw2">null</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre></div></div></div>
<p>So don&#8217;t just copy/paste everything you find by using google. Other sites (just like me) can be wrong, yes, we are also just people.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://m2tec.be/blog/2010/02/03/java-md5-hex-0093/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://m2tec.be/blog/2009/12/30/welcome-0031</link>
		<comments>http://m2tec.be/blog/2009/12/30/welcome-0031#comments</comments>
		<pubDate>Wed, 30 Dec 2009 00:57:39 +0000</pubDate>
		<dc:creator>Tom V</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[HDD broke]]></category>
		<category><![CDATA[Redmine]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Welcome]]></category>
		<category><![CDATA[code.m2tec.be]]></category>
		<category><![CDATA[svn.m2tec.be]]></category>

		<guid isPermaLink="false">http://m2tec.be/blog/?p=31</guid>
		<description><![CDATA[I finally worked at the website and here we are! A month ago my laptop HDD broke, I couldn&#8217;t boot anymore. All my work from school was on it so I really thought I was screwed big time. After a few hours hard disk checking it was only at 2%, not really good &#8230; So [...]]]></description>
			<content:encoded><![CDATA[<p>I finally worked at the website and here we are!</p>
<p>A month ago my laptop HDD broke, I couldn&#8217;t boot anymore. All my work from school was on it so I really thought I was screwed big time.<br />
After a few hours hard disk checking it was only at 2%, not really good &#8230;<br />
So I attached the broken HDD to my PC, and I could backup the second (data) partition, backing up the first (win7) partition was a bit worse. But I managed to recover some. Bought a new HDD and after a day I was up again.</p>
<p>But I was still worried about my work/projects for school and knew SVN was a good solution.<br />
Thats why I installed <a title="Redmine" href="http://redmine.org" onclick="pageTracker._trackPageview('/outgoing/redmine.org?referer=');">Redmine</a> and <a title="Subversion" href="http://subversion.tigris.org/" onclick="pageTracker._trackPageview('/outgoing/subversion.tigris.org/?referer=');">Subversion</a>, found respectively at <a title="m²tec Code Forge" href="http://code.m2tec.be" onclick="pageTracker._trackPageview('/outgoing/code.m2tec.be?referer=');">code.m2tec.be</a> and <a title="m²tec SVN " href="http://svn.m2tec.be" onclick="pageTracker._trackPageview('/outgoing/svn.m2tec.be?referer=');">svn.m2tec.be</a>.<br />
It probably needs some more tweaking, but it&#8217;s working.<br />
It will become the main spot for my projects I&#8217;m working on, most private but also some public project.</p>
<p>This said, what can you guys expect finding here:<br />
- programming solutions about things that are very hard to find.<br />
- programming solutions of things found everywhere wrong (a good example will follow soon)<br />
- (server/)software installation issues and its solutions<br />
- a bit personal stuff<br />
- &#8230;</p>
<p>Tom Peeters and Bram van den Bosch are both co-owners of the website and will probably also post some stuff here.<br />
They will also use the SVN so I guess there will be some nice projects on the server, as they are both student software-developers.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://m2tec.be/blog/2009/12/30/welcome-0031/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
