<?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>Ninetynine.be &#187; michiel</title>
	<atom:link href="http://ninetynine.be/blog/author/michiel/feed/" rel="self" type="application/rss+xml" />
	<link>http://ninetynine.be/blog</link>
	<description>Just another blog with no useful content on it at all.</description>
	<lastBuildDate>Sun, 08 Jan 2012 10:39:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Analyzing Malicious SSH Login Attempts</title>
		<link>http://ninetynine.be/blog/2011/08/analyzing-malicious-ssh-login-attempts/</link>
		<comments>http://ninetynine.be/blog/2011/08/analyzing-malicious-ssh-login-attempts/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 22:37:39 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ninetynine.be/blog/?p=633</guid>
		<description><![CDATA[While I was upgrading openssh to 5.x (to make it easier to setup chroot jails for users), I came across the ssh login attempts from bots. grep -ir 'invalid user' /var/log/* Example output /var/log/auth.log.0:Aug 15 18:14:40 sshd[20296]: Invalid user production from 85.214.40.85 /var/log/auth.log.0:Aug 15 18:14:42 sshd[20296]: Failed password for invalid user production from 85.214.40.85 port [...]]]></description>
			<content:encoded><![CDATA[<p>While I was upgrading openssh to 5.x (to make it easier to setup chroot jails for users),<br />
I came across the ssh login attempts from bots.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-ir</span> <span style="color: #ff0000;">'invalid user'</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

<p>Example output</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">/var/log/auth.log.0:Aug 15 18:14:40 sshd[20296]: Invalid user production from 85.214.40.85
/var/log/auth.log.0:Aug 15 18:14:42 sshd[20296]: Failed password for invalid user production from 85.214.40.85 port 54327 ssh2</pre></div></div>

<p>That&#8217;s when I noticed usernames like </p>
<blockquote><p>minecraft, eggbreaker2 ,batman ,sir , queen, elmo, frenzy, christmas, idiot, birdseed, einstein123, breast, knight, cookie, eminem, asshole123, googol, denied</p></blockquote>
<p> and decided to make some graphs with the data.<br />
Using perl I extracted the information from the log files.<br />
This is what I got from <strong>~20.000 failed attempts (spread over couple days) </strong></p>
<h2>Popular usernames</h2>
<h3>Existing usernames</h3>
<div style='padding-right:30px;'>

<div id="easyChartDiv52878001" style='width:100%;'  style='text-align:center;' align='center'>
<!-- Easy Chart Builder by dyerware -->
<img id="easyChartDiv52878001_img" style='text-align:center;float:center;' alt='Existing usernames top 20' title=''  align='center' border='0' />

</div>
<script type="text/javascript">
//<![CDATA[
wpEasyChart.wpNewChart("easyChartDiv52878001", {"type":"horizbar","width":"600","height":"250","title":"Existing usernames top 20","minaxis":"","groupnames":"Percentage of all attempts with existing user","groupcolors":"F0F013,FFFF00,DF420D,44AEF5,A3A3A3,007070,00FFFF,CC7000,00CC70,CC0070,7000CC,A370CC","valuenames":"root,postgres,ftp,bin,mysql,proxy,uucp,mail,news,postfix,daemon,backup,nobody,lp,list,gnats,man,irc,sys,games","group1values":"73.81,14.15,1.22,1.15,0.87,0.77,0.77,0.73,0.73,0.61,0.56,0.54,0.49,0.49,0.42,0.4,0.4,0.18,0.18,0.18","group2values":"0,0,0","group3values":"0,0,0","group4values":"0,0,0","group5values":"0,0,0","group6values":"0,0,0","group7values":"0,0,0","group8values":"0,0,0","group9values":"0,0,0","group10values":"0,0,0","group11values":"0,0,0","group12values":"0,0,0","group1markers":"","group2markers":"","group3markers":"","group4markers":"","group5markers":"","group6markers":"","group7markers":"","group8markers":"","group9markers":"","group10markers":"","group11markers":"","group12markers":"","markercolor":"FFFF00","imagealtattr":"Existing usernames top 20","imagetitleattr":"","hidechartdata":true,"chartcolor":"FFFFFF","chartfadecolor":"DDDDDD","datatablecss":"hentry easyChartDataTable","imgstyle":"text-align:center;float:center;","watermark":"","watermarkvert":"","watermarkcolor":"A0BAE9","currency":"%","precision":"","grid":false,"axis":"both"});
//]]&gt;
</script>
</div>
<p><span id="more-633"></span></p>
<h3>Invalid usernames</h3>
<p>Bots tried ~5500 invalid usernames in ~15500 attempts  </p>
<div style='padding-right:30px;'>

<div id="easyChartDiv5a6d8002" style='width:100%;'  style='text-align:center;' align='center'>
<!-- Easy Chart Builder by dyerware -->
<img id="easyChartDiv5a6d8002_img" style='text-align:center;float:center;' alt='Invalid usernames top 50' title=''  align='center' border='0' />

</div>
<script type="text/javascript">
//<![CDATA[
wpEasyChart.wpNewChart("easyChartDiv5a6d8002", {"type":"horizbar","width":"600","height":"650","title":"Invalid usernames top 50","minaxis":"","groupnames":"Percentage of all attempts with invalid user","groupcolors":"F0F013,FFFF00,DF420D,44AEF5,A3A3A3,007070,00FFFF,CC7000,00CC70,CC0070,7000CC,A370CC","valuenames":"oracle,a,test,admin,guest,ts,teamspeak2,teamspeak,ts3,teamspeak3,minecraft,tss,ts2,cs,user,css,nagios,tss3,webmaster,apache,ts1,student,cs2,robert,alex,temp,richard,mike,adm,sarah,david,john,office,public,info,peter,web,mailtest,sales,wwwrun,ftpuser,susan,administrator,tester,brian,lisa,tony,matt,scott,paul","group1values":"4.44,4.34,1.63,1.4,1.24,0.99,0.97,0.9,0.89,0.89,0.74,0.74,0.72,0.49,0.48,0.45,0.43,0.39,0.37,0.33,0.3,0.29,0.27,0.24,0.23,0.21,0.21,0.21,0.2,0.2,0.19,0.19,0.19,0.19,0.19,0.18,0.18,0.18,0.18,0.18,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17","group2values":"0,0,0","group3values":"0,0,0","group4values":"0,0,0","group5values":"0,0,0","group6values":"0,0,0","group7values":"0,0,0","group8values":"0,0,0","group9values":"0,0,0","group10values":"0,0,0","group11values":"0,0,0","group12values":"0,0,0","group1markers":"","group2markers":"","group3markers":"","group4markers":"","group5markers":"","group6markers":"","group7markers":"","group8markers":"","group9markers":"","group10markers":"","group11markers":"","group12markers":"","markercolor":"FFFF00","imagealtattr":"Invalid usernames top 50","imagetitleattr":"","hidechartdata":true,"chartcolor":"FFFFFF","chartfadecolor":"DDDDDD","datatablecss":"hentry easyChartDataTable","imgstyle":"text-align:center;float:center;","watermark":"","watermarkvert":"","watermarkcolor":"A0BAE9","currency":"%","precision":"","grid":false,"axis":"both"});
//]]&gt;
</script>
</div>
<h2>Invalid vs. existing usernames</h2>
<div style='padding-right:30px;'>

<div id="easyChartDiv11928003" style='width:100%;'  style='text-align:center;' align='center'>
<!-- Easy Chart Builder by dyerware -->
<img id="easyChartDiv11928003_img" style='text-align:center;float:center;' alt='dyerware' title=''  align='center' border='0' />

</div>
<script type="text/javascript">
//<![CDATA[
wpEasyChart.wpNewChart("easyChartDiv11928003", {"type":"pie","width":"600","height":"650","title":"","minaxis":"","groupnames":",,Existing users (23%),Invalid users (77%)","groupcolors":"F0F013,FFFF00,DF420D,44AEF5,A3A3A3,007070,00FFFF,CC7000,00CC70,CC0070,7000CC,A370CC","valuenames":"root,oracle","group1values":"0,0,0","group2values":"0,0,0","group3values":"23","group4values":"77","group5values":"0,0,0","group6values":"0,0,0","group7values":"0,0,0","group8values":"0,0,0","group9values":"0,0,0","group10values":"0,0,0","group11values":"0,0,0","group12values":"0,0,0","group1markers":"","group2markers":"","group3markers":"","group4markers":"","group5markers":"","group6markers":"","group7markers":"","group8markers":"","group9markers":"","group10markers":"","group11markers":"","group12markers":"","markercolor":"FFFF00","imagealtattr":"dyerware","imagetitleattr":"","hidechartdata":true,"chartcolor":"FFFFFF","chartfadecolor":"FFFFFF","datatablecss":"hentry easyChartDataTable","imgstyle":"text-align:center;float:center;","watermark":"","watermarkvert":"","watermarkcolor":"A0BAE9","currency":"%","precision":"","grid":false,"axis":"both"});
//]]&gt;
</script>
</div>
<h2>Overall</h2>
<p>It&#8217;s not surprising &#8216;root&#8217; came out on top, it was used in 18.8% off all attempts.<br />
That doesn&#8217;t seem much but it is, since the bots tried that many different usernames.</p>
<p>You can disable root login by opening sshd_config and changing the &#8216;PermitRootLogin&#8217; setting to &#8216;no&#8217;.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Authentication:</span>
PermitRootLogin no</pre></div></div>

<p><a href="#restart_sshd" class="line"><br />
Don&#8217;t forget to restart the SSH daemon.</a><br />
P.S. don&#8217;t lock yourself out by forgetting you other administrator users passwords <img src='http://ninetynine.be/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h2>SSH Recommendations</h2>
<p>Found out <a class='line' href="http://www.symantec.com/connect/articles/analyzing-malicious-ssh-login-attempts">Symantec did the same thing a year ago</a>, you can check their findings and recommendations if you want to protect against these attacks.</p>
<h2>Setup a chroot jail</h2>
<p>We have no FTP running on our server, users need to connect through SFTP.<br />
Everyone gets a unix user and home folder on the server, to hide the server structure and<br />
limit the users to their home folder we had to setup chroot. It also blocks those user to login<br />
with SSH, SFTP is the only allowed service.</p>
<p>Creating a chroot jail is fairly easy providing you use <strong>openssh 5.x</strong>.<br />
This explanations is only valid for those versions, and I assume openssh is correctly installed.<br />
If you need to install openssh I suggest you visit <a href="http://adamsworld.name/chrootjailv5.php">http://adamsworld.name/chrootjailv5.php</a></p>
<h3>Modify sshd_config</h3>
<p>Mine is located at /etc/ssh/sshd_config (depending on your installation)<br />
Comment all lines starting with &#8216;Subsystem&#8217; and add &#8216;Subsystem sftp internal-sftp&#8217;.<br />
Add the 4 lines containing the match block at the end of the file.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"># Subsystem sftp /usr/lib/openssh/sftp-server
# Setting up chroot jail
Subsystem sftp internal-sftp    
&nbsp;
Match group users
       ChrootDirectory /home/%u
       ForceCommand internal-sftp
       AllowTcpForwarding no</pre></div></div>

<p>This jails all users in the group &#8216;users&#8217; to their home folder. You can also jail induviduals with another match rule : &#8216;Match user username&#8217;.</p>
<h3>Change ownership &#038; rights</h3>
<p>Create the group &#8216;users&#8217;, and add the persons you want to jail to the group.<br />
The jail needs to be owned by the root user, so lets say you want to jail &#8216;john&#8217; (homefolder : /home/john.com)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>john.com
<span style="color: #c20cb9; font-weight: bold;">chown</span> root:root <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>john.com</pre></div></div>

<h3 id="restart_sshd">Restart SSH daemon</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Debian, Ubuntu</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">ssh</span> restart
&nbsp;
<span style="color: #666666; font-style: italic;">#Fedora, CentOS</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>sshd restart</pre></div></div>

<p>And you&#8217;re done!<br />
The files and directories inside the home-folder can have whatever rights and owner you please.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://ninetynine.be/blog/2011/08/analyzing-malicious-ssh-login-attempts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doc? v3.0 BETA released</title>
		<link>http://ninetynine.be/blog/2009/12/doc-v3-0-beta-released/</link>
		<comments>http://ninetynine.be/blog/2009/12/doc-v3-0-beta-released/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 10:43:21 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Doc?]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://ninetynine.be/blog/?p=585</guid>
		<description><![CDATA[Yesterday we&#8217;ve released a public beta from the new Doc? (v3.0) Go and check it out at www.airdoc.be! Here are some of the most important new features : Minimize/Close to tray (WINDOWS) Local Books Online Books Download Inline Search Performance Upgrade (SQLITE) Custom tree icons Complete design makeover Take a look on our website to [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday we&#8217;ve released a public beta from the new Doc? (v3.0)<br />
Go and check it out at <a href="http://www.airdoc.be/">www.airdoc.be</a>!</p>
<p><a href="http://www.airdoc.be/"><img src="http://ninetynine.be/blog/wp-content/uploads/2009/12/feature_doc.png" alt="Doc? Air Local Livedocs" title="Doc? Air Local Livedocs" width="515" height="340" class="aligncenter size-full wp-image-586" /></a></p>
<p>Here are some of the most important new features :</p>
<ul style="list-style-type: square;">
<li> 	Minimize/Close to tray (WINDOWS)</li>
<li> 	Local Books</li>
<li> Online Books Download</li>
<li> 	Inline Search</li>
<li> Performance Upgrade (SQLITE)</li>
<li> 	Custom tree icons</li>
<li> Complete design makeover</li>
</ul>
<p>Take a look on our website to learn more &#8230;</p>
<p><br/></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://ninetynine.be/blog/2009/12/doc-v3-0-beta-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flex: TabNavigator Label Jump (Quick Fix)</title>
		<link>http://ninetynine.be/blog/2009/12/flex-tabnavigator-label-jump-quick-fix/</link>
		<comments>http://ninetynine.be/blog/2009/12/flex-tabnavigator-label-jump-quick-fix/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 11:38:03 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://ninetynine.be/blog/?p=543</guid>
		<description><![CDATA[Hey, Somethings been bugging me while skinning a flex application : The label from the selected tab from the TabNavigator component is 1px lower than the other tabs. As you can see in the example. (It has something to to with the bottom border I&#8217;m guessing). This can help as a visual support you are [...]]]></description>
			<content:encoded><![CDATA[<p>Hey,</p>
<p>Somethings been bugging me while skinning a flex application :</p>
<p>The label from the selected tab from the <a href="http://livedocs.adobe.com/flex/3/langref/mx/containers/TabNavigator.html">TabNavigator</a> component is 1px lower than the other tabs. As you can see in the example.<br />
(It has something to to with the bottom border I&#8217;m guessing).</p>
<p> This can help as a visual support you are on a different tab, but I found it rather annoying, so here is my fix for it.<br />
A quick fix by changing the &#8220;<em>paddingTop</em>&#8221; property.</p>
<p><br/><br />
View source is enabled so can download the example there.<br />
<a href="http://ninetynine.be/blog/wp-content/uploads/2009/12/srcview/index.html">http://ninetynine.be/blog/wp-content/uploads/2009/12/srcview/index.html</a><br />

<object width="500" height="100">
<param name="movie" value="http://ninetynine.be/blog/wp-content/uploads/2009/12/TabNavFix.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="500" height="100" src="http://ninetynine.be/blog/wp-content/uploads/2009/12/TabNavFix.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
<br />
Code after the jump.<br/><br/></p>
<p><span id="more-543"></span><br/></p>

<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
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">events</span>.<span style="color: #006600;">IndexChangedEvent</span>;
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">events</span>.<span style="color: #006600;">FlexEvent</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">/*
*	@author: Michiel Vancoillie
*	http://www.ninetynine.be
*/</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//fix the first selected tab</span>
	fixedTabNav.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>,onTabNavCreated<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #808080; font-style: italic;">//fix the newly selected tab</span>
	fixedTabNav.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>IndexChangedEvent.<span style="color: #006600;">CHANGE</span>,onTabNavChanged<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">//JUST ADD THE SAME EVENTLISTENERS TO ALL TABNAVIGATORS YOU WANT FIXED</span>
	<span style="color: #808080; font-style: italic;">//notfixedTabNav.addEventListener(Event.ADDED_TO_STAGE,onTabNavCreated);</span>
	<span style="color: #808080; font-style: italic;">//notfixedTabNav.addEventListener(IndexChangedEvent.CHANGE,onTabNavChanged);</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onTabNavCreated<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> tabNav:TabNavigator = <span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">target</span> as TabNavigator;
	tabNav.<span style="color: #006600;">getTabAt</span><span style="color: #66cc66;">&#40;</span>tabNav.<span style="color: #006600;">selectedIndex</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'paddingTop'</span>,-<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onTabNavChanged<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:IndexChangedEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> tabNav:TabNavigator = <span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">target</span> as TabNavigator;
	<span style="color: #808080; font-style: italic;">//reset the old tab</span>
	tabNav.<span style="color: #006600;">getTabAt</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #006600;">oldIndex</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'paddingTop'</span>,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #808080; font-style: italic;">//fix the new tab</span>
	tabNav.<span style="color: #006600;">getTabAt</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #006600;">newIndex</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'paddingTop'</span>,-<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://ninetynine.be/blog/2009/12/flex-tabnavigator-label-jump-quick-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MamppControl : Xampp/Mampp Tray Launcher</title>
		<link>http://ninetynine.be/blog/2009/05/mamppcontrol-xampp-tray-launcher/</link>
		<comments>http://ninetynine.be/blog/2009/05/mamppcontrol-xampp-tray-launcher/#comments</comments>
		<pubDate>Sun, 24 May 2009 14:21:42 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Xampp]]></category>

		<guid isPermaLink="false">http://ninetynine.be/blog/?p=207</guid>
		<description><![CDATA[Hey, Yesterday I had some spare time, so I decided to take a look at the Cocoa collection of frameworks, APIs, and accompanying runtimes that make up the development layer of Mac OS X. I&#8217;ve created this first application with XCode in Objective-C and named it MamppControl. It allows you to start, stop, reload Mampp [...]]]></description>
			<content:encoded><![CDATA[<p><br/><div id="attachment_218" class="wp-caption aligncenter" style="width: 560px"><img src="http://ninetynine.be/blog/wp-content/uploads/2009/05/mamppcontrol.jpg" alt="MamppControl" title="MamppControl" width="550" height="165" class="size-full wp-image-218" /><p class="wp-caption-text">MamppControl</p></div><br/></p>
<p>Hey,</p>
<p>Yesterday I had some spare time, so I decided to take a look at the <a href="http://developer.apple.com/cocoa/">Cocoa</a> collection of frameworks, APIs, and accompanying runtimes that make up the development layer of Mac OS X.<br />
I&#8217;ve created this first application with XCode in <a href="http://nl.wikipedia.org/wiki/Objective_C">Objective-C</a> and named it MamppControl. </p>
<p>It allows you to start, stop, reload Mampp from the tray, with a handy tray icon &amp; menu.<br />
Mampp is the other name for Xampp on Mac. </p>
<blockquote><p>XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use &#8211; just download, extract and start.</p></blockquote>
<p>More information about Xampp <a href="http://www.apachefriends.org/en/xampp.html">here</a>.</p>
<p>I know that there is a launcher includes in the xampp package, but it has no tray icon and stay&#8217;s visible in the dock.</p>
<p><br/><span id="more-207"></span></p>
<p><div id="attachment_227" class="wp-caption aligncenter" style="width: 560px"><img src="http://ninetynine.be/blog/wp-content/uploads/2009/05/xampp-control-panel.jpg" alt="Default Xampp Control Panel" title="Xampp Control Panel" width="550" height="500" class="size-full wp-image-227" /><p class="wp-caption-text">Default Xampp Control Panel</p></div><br />
<br/><br />
<strong>Notes</strong><br />
<br/></p>
<p>At the moment Mampp supports only the basic commands (start, stop, reload). If there is need for the other start/stop settings, contact me through the contact page on this blog or shout it here in the comments. </p>
<p>Mampp needs root access to start the xampp, that&#8217;s why you get the security login at start.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>xampp<span style="color: #000000; font-weight: bold;">/</span>xamppfiles<span style="color: #000000; font-weight: bold;">/</span>mampp start</pre></td></tr></table></div>

<p>You only have to do this once for the lifetime of the process. And when you change the path setting.</p>
<p>Also keep in mind that there could be some delay when starting or stopping Xampp, since ProFTPD usually takes a few seconds to launch (at least on my laptop it does <img src='http://ninetynine.be/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).</p>
<p>MamppControl checks if Xampp is already running on startup, and behaves appropriately with that knowledge &#8230; </p>
<p><br/><br />
<strong>Screenshots</strong></p>
<p><a rel="lightbox[MamppControl]" href="http://ninetynine.be/blog/wp-content/uploads/2009/05/mamppcontrol-quicksilver.jpg" title="MamppControl Quicksilver Thumb"><div id="attachment_213" class="wp-caption alignleft" style="width: 110px">&nbsp;<img src="http://ninetynine.be/blog/wp-content/uploads/2009/05/mamppcontrol-quicksilver-thumb.jpg" alt="MamppControl Quicksilver" title="MamppControl Quicksilver Thumb" width="100" height="100" class="size-full wp-image-213" /><p class="wp-caption-text">&nbsp;Quicksilver</p></div></a><a href="http://ninetynine.be/blog/wp-content/uploads/2009/05/mamppcontrol-security.jpg" rel="lightbox[MamppControl]" title="MamppControl Security Thumb"><div id="attachment_215" class="wp-caption alignleft" style="width: 110px">&nbsp;<img src="http://ninetynine.be/blog/wp-content/uploads/2009/05/mamppcontrol-security-thumb.jpg" alt="MamppControl Security" title="MamppControl Security Thumb" width="100" height="100" class="size-full wp-image-215" /><p class="wp-caption-text">&nbsp;Security&nbsp;login</p></div></a><a rel="lightbox[MamppControl]" href="http://ninetynine.be/blog/wp-content/uploads/2009/05/mamppcontrol-icon.jpg" title="MamppControl Icon Thumb"><div id="attachment_209" class="wp-caption alignleft" style="width: 110px">&nbsp;<img src="http://ninetynine.be/blog/wp-content/uploads/2009/05/mamppcontrol-icon-thumb.jpg" alt="MamppControl Icon" title="MamppControl Icon Thumb" width="100" height="100" class="size-full wp-image-209" /><p class="wp-caption-text">&nbsp;Tray&nbsp;Icon</p></div></a><a href="http://ninetynine.be/blog/wp-content/uploads/2009/05/mamppcontrol-menu.jpg" rel="lightbox[MamppControl]" title="MamppControl Menu Thumb" ><div id="attachment_211" class="wp-caption alignleft" style="width: 110px">&nbsp;<img src="http://ninetynine.be/blog/wp-content/uploads/2009/05/mamppcontrol-menu-thumb.jpg" alt="MamppControl Menu" title="MamppControl Menu Thumb" width="100" height="100" class="size-medium wp-image-211" /><p class="wp-caption-text">&nbsp;Tray&nbsp;Menu</p></div></a></p>
<p><br style="clear:left;"/><br />
<strong>Download</strong></p>
<p>MamppControl is licensed under the MIT license.</p>
<blockquote><p>Copyright (c) 2009 Ninetynine.be</p>
<p>Permission is hereby granted, free of charge, to any person<br />
obtaining a copy of this software and associated documentation<br />
files (the &#8220;Software&#8221;), to deal in the Software without<br />
restriction, including without limitation the rights to use,<br />
copy, modify, merge, publish, distribute, sublicense, and/or sell<br />
copies of the Software, and to permit persons to whom the<br />
Software is furnished to do so, subject to the following<br />
conditions:</p>
<p>The above copyright notice and this permission notice shall be<br />
included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED &#8220;AS IS&#8221;, WITHOUT WARRANTY OF ANY KIND,<br />
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES<br />
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND<br />
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT<br />
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,<br />
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br />
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR<br />
OTHER DEALINGS IN THE SOFTWARE.
</p></blockquote>
<p><br/><br />
<b>Download : </b><a href="http://ninetynine.be/blog/wp-content/plugins/download-monitor/download.php?id=1" title="Download MamppControl">MamppControl</a> - 116.76 kB<br />
<br/><br />
Current version: 2.0<br />
Requirements:<br/><br />
&nbsp;&nbsp;&nbsp;&#8226; Mac OS X 10.5 or higher.<br />
&nbsp;&nbsp;&nbsp;&#8226; Xampp installation @( /Applications/xampp/xamppfiles/mampp )</p>
<p><br/><br />
<b>Version History</b> </p>
<p><em>v1.0</em></p>
<ul>
<li>First public release</li>
</ul>
<p><em>v2.0</em></p>
<ul>
<li>Added support for latest Xampp for Mac OSX (1.0.1)</li>
<li>Added option to choose path to &#8220;xampp&#8221; executable</li>
<li>Added complete events for starting &#038; stopping &#038; reloading</li>
<li>Some minor changes internally</li>
</ul>
<p><br/></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://ninetynine.be/blog/2009/05/mamppcontrol-xampp-tray-launcher/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex: Runtime font embedding using compiled CSS with loader</title>
		<link>http://ninetynine.be/blog/2009/04/flex-runtime-font-embedding-using-compiled-css-with-loader/</link>
		<comments>http://ninetynine.be/blog/2009/04/flex-runtime-font-embedding-using-compiled-css-with-loader/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 19:57:52 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://ninetynine.be/blog/?p=118</guid>
		<description><![CDATA[A missing feature in Flex is the ability to load fonts at runtime. &#8216;Why is this useful?&#8217;, you could ask. Well one situation is you&#8217;re creating an online rich text editor, and you want to add a font to the font list. You would only have to edit the css and upload the new swf [...]]]></description>
			<content:encoded><![CDATA[<p>A missing feature in Flex is the ability to load fonts at runtime. </p>
<p>&#8216;Why is this useful?&#8217;, you could ask. Well one situation is you&#8217;re creating an online rich text editor, and you want to add a font<br />
to the font list. You would only have to edit the css and upload the new swf instead of the whole application. Or you want a client<br />
to be able to add fonts without him having the source code from the application.</p>
<p><br/>Luckily it&#8217;s possible in Flex to load runtime CSS compiled as an SWF with the StyleManager class.<br />
<a href="http://livedocs.adobe.com/flex/gumbo/langref/mx/styles/StyleManager.html">StyleManager on LiveDocs</a></p>
<p>Fonts.css Example :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #a1a100;">@font-face {</span>
    src<span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;fonts/Arial.ttf&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    fontFamily<span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;Arial&quot;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><strong>How to compile the CSS to SWF?</strong><br/><br />
<span id="more-118"></span><br />
<img src="http://ninetynine.be/blog/wp-content/uploads/2009/04/compile-css-to-swf.png" alt="Flex Builder Compile CSS to SWF" title="Flex Builder Compile CSS to SWF" width="216" height="59" class="alignleft size-full wp-image-131"   style="border:1px solid #C0C0C0"/><br />
In Flex Builder you can right click any CSS inside your source and check the &#8220;compile CSS to SWF&#8221; option.<br />
<br/><br />
An alternative way to compile the CSS to SWF is using the command line :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">mxmlc Fonts.css</pre></td></tr></table></div>

<p><br/><br />
<strong>Loading the compiled stylesheet</strong></p>
<p>For the example where we just compiled the Fonts.css to Fonts.swf</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">styles</span>.<span style="color: #006600;">StyleManager</span>;
&nbsp;
StyleManager.<span style="color: #006600;">loadStyleDeclarations</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Fonts.swf&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>It&#8217;s as simple as that&#8230;  you can now start using the font.<br />
The nice thing about this is you can now load your fonts visually using an intermediate loader or animation.<br />
<br/><br />
<strong>Loading the stylesheet visually with intermediate loader</strong></p>
<p>First thing we do is create a custom titlewindow with a preloader in it to show the loading.<br />
We can catch the <strong>StyleEvent.COMPLETE</strong> with an <strong>IEventDispatcher</strong>.<br />
Right click the example for the source code.</p>
<p>
<object width="500" height="100">
<param name="movie" value="http://ninetynine.be/blog/wp-content/uploads/2009/04/fontEmbedding.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="500" height="100" src="http://ninetynine.be/blog/wp-content/uploads/2009/04/fontEmbedding.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p><br/><br />
You can use this to &#8216;preload&#8217; any stylesheet.</p>
<p>Compiling CSS to SWF and loading it runtime is also used for application with theme support.<br />
You can read more about that and view an example here : <a href="http://onflash.org/ted/2007/01/flex-201-understand-runtime-css.php">Understanding runtime CSS</a><br />
<br/></p>
<p>Happy coding!</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://ninetynine.be/blog/2009/04/flex-runtime-font-embedding-using-compiled-css-with-loader/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Growl messages with AIR</title>
		<link>http://ninetynine.be/blog/2009/03/growl-messages-with-air/</link>
		<comments>http://ninetynine.be/blog/2009/03/growl-messages-with-air/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 20:21:40 +0000</pubDate>
		<dc:creator>michiel</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[growl]]></category>
		<category><![CDATA[notification]]></category>

		<guid isPermaLink="false">http://ninetynine.be/blog/?p=46</guid>
		<description><![CDATA[For an AIR application that I&#8217;m creating (more about that later), I needed some way to show the users some event happened while the application was running in the background. So what&#8217;s better on Mac OS than showing growl notifications ? Adobe has worked together with the Growl team to add support for AIR and [...]]]></description>
			<content:encoded><![CDATA[<p>For an AIR application that I&#8217;m creating (more about that later), I needed some way to show the users some event happened while the application was running in the background. So what&#8217;s better on Mac OS than showing <a href="http://www.growl.info">growl</a> notifications <img src='http://ninetynine.be/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ?<br />
<br/><br />
<img class="alignnone size-full wp-image-54" title="Growl message with as3" src="http://ninetynine.be/blog/wp-content/uploads/2009/03/growl-with-as3.png" alt="Growl message with as3" width="341" height="121" /><br />
<br/><br />
Adobe has worked together with the Growl team to add support for AIR and flash applications.<br />
<a href="http://www.mikechambers.com/blog/">Mike Chambers</a> has put together an open source project named <a href="http://code.google.com/p/as3growl/">as3growl</a> which provides an API to work with the new Growl build.<br />
<br/><br />
<span id="more-46"></span></p>
<blockquote><p>The as3growl library is an ActionScript library that leverages new TCP socket communication functionality within the Growl notification framework to allow Adobe AIR and Flash applications to register with, send notifications, and receive events from the Growl service.</p></blockquote>
<p>You can grab the latest as3growl <a href="http://code.google.com/p/as3growl/downloads/list">here</a> or with the svn :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> checkout http:<span style="color: #000000; font-weight: bold;">//</span>as3growl.googlecode.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span> as3growl-read-only</pre></td></tr></table></div>

<p><br/>The support for AIR and flash is not yet in the release version, so the first step is download the nightly build from growl :</p>
<p><a href="http://bitbucket.org/evands/growl/changeset/eb9d3e4d9fa3/">http://bitbucket.org/evands/growl/changeset/eb9d3e4d9fa3/</a></p>
<blockquote>
<ol>
<li>Unzip</li>
<li>Open Growl.xcodeproj in Xcode 3.1</li>
<li>Set target to &#8220;Deployment&#8221;</li>
<li>Build</li>
<li>Double click the &#8220;Build/Deployment/Growl.prefPane&#8221; file to install the compiled Growl. </li>
</ol>
</blockquote>
<p>To start using the as3growl API, you can check out the example on the wiki:<br />
<a href="To start using the as3growl API, you can check out the wiki: http://code.google.com/p/as3growl/wiki/UsingTheLibrary">http://code.google.com/p/as3growl/wiki/UsingTheLibrary</a></p>
<p>I&#8217;ll probably post a little tutorial later!</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://ninetynine.be/blog/2009/03/growl-messages-with-air/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

