<?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>ZaneHooper.com &#187; Uncategorized</title>
	<atom:link href="http://zanehooper.com/blog/category/uncategorized/feed" rel="self" type="application/rss+xml" />
	<link>http://zanehooper.com</link>
	<description>Web developer, designer, and Internet Entrepreneur</description>
	<lastBuildDate>Sat, 17 Dec 2011 21:52:18 +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>FFMPEG for Steaming</title>
		<link>http://zanehooper.com/blog/ffmpeg-for-steaming.html</link>
		<comments>http://zanehooper.com/blog/ffmpeg-for-steaming.html#comments</comments>
		<pubDate>Sat, 17 Dec 2011 21:52:18 +0000</pubDate>
		<dc:creator>Zane Hooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zanehooper.com/?p=67</guid>
		<description><![CDATA[While working on Gamevue (Gamevue.net), I had to find a high-quality compression for FLV that would stream with the lowest bandwidth possible. First of all, http://ubuntuforums.org/showthread.php?t=786095 is a great tutorial for installing FFMPEG. In my case, it was actually installed on Debian through SSH. Also, http://www.kilobitspersecond.com/2007/05/24/ffmpeg-quality-comparison/ does a very good job of looking into the different qscale options. For [...]]]></description>
			<content:encoded><![CDATA[<p>While working on Gamevue (Gamevue.net), I had to find a high-quality compression for FLV that would stream with the lowest bandwidth possible.</p>
<p>First of all, <a href="http://ubuntuforums.org/showthread.php?t=786095">http://ubuntuforums.org/showthread.php?t=786095</a> is a great tutorial for installing FFMPEG. In my case, it was actually installed on Debian through SSH.</p>
<p>Also, <a href="http://www.kilobitspersecond.com/2007/05/24/ffmpeg-quality-comparison/">http://www.kilobitspersecond.com/2007/05/24/ffmpeg-quality-comparison/</a> does a very good job of looking into the different qscale options.</p>
<p>For a video, I chose my friend Ron&#8217;s video named &#8220;potter&#8221; which is about 5 minutes long, 720p, and around 450MB in size before any sort of compression. Note that this takes a while to convert if you don&#8217;t have a very fast server.</p>
<p>The code:</p>
<pre>ffmpeg -i /path/potter.mp4 -qscale {QSCALE} -ar {ARATE} -ac 2 -acodec {ACODEC} -vcodec {VCODEC} -ab {ABITRATE} -f flv -s 1280x720 /path/potter_{ARATE}_{ABITRATE}_720p.flv</pre>
<p>After a few tests with different video codecs, I chose libx264. After messing with a different video from Ron, I was very happy with the results.<br />
Before conversion: <a href="http://localhostr.com/files/F6c63r0/capture.png">http://localhostr.com/files/F6c63r0/capture.png</a> (29.3 MB)<br />
After conversion: <a href="http://localhostr.com/files/RufUdEt/capture.png">http://localhostr.com/files/RufUdEt/capture.png</a> (6.7 MB)</p>
<p>The converted file&#8217;s size was only 23% of the original file&#8217;s size with an audio rate of 22050 Hz, video codec libx264, and the audio codec libfaac.</p>
<p><strong>More Tests (audio)</strong></p>
<p>I tried 22050 and 44100 as the audio rates and 196k and 256k as the audio bit rates and LAME MP3 and AAC as the audio codecs.<br />
The results were quite similar to each other.</p>
<pre>gamevue:/path# du potter*
121596  potter_22050_196k_720p.flv
124824  potter_22050_196k_LAME_720p.flv
121596  potter_22050_256k_720p.flv
124824  potter_22050_256k_LAME_720p.flv
124528  potter_44100_196k_720p.flv
126016  potter_44100_196k_LAME_720p.flv
124528  potter_44100_256k_720p.flv
128408  potter_44100_256k_LAME_720p.flv</pre>
<p>The quality difference in audio was not very much going from LAME to AAC, but it did shave off almost 4MB on the higher quality audio file.<br />
Audio Codec chosen: AAC (libfaac)<br />
Video Codec chosen: x264 (libx264)<br />
Audio Rate chosen: 44100<br />
Audio Bit Rate chosen: 256k</p>
]]></content:encoded>
			<wfw:commentRss>http://zanehooper.com/blog/ffmpeg-for-steaming.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zero Remorse&#8217;s Complete Reconstruction</title>
		<link>http://zanehooper.com/blog/zero-remorses-complete-reconstruction.html</link>
		<comments>http://zanehooper.com/blog/zero-remorses-complete-reconstruction.html#comments</comments>
		<pubDate>Tue, 12 Oct 2010 04:35:05 +0000</pubDate>
		<dc:creator>Zane Hooper</dc:creator>
				<category><![CDATA[Jobs]]></category>
		<category><![CDATA[New Jobs]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zanehooper.com/?p=43</guid>
		<description><![CDATA[Zero Remorse, a professional Australian gaming team,  has asked for a complete reconstruction of their website. I&#8217;m developing the PHP and MySQL server-side and the XHTML, CSS, JS, jQuery, and AJAX client-side. This includes incorporation into a PHPBB forums system, a recent, upcoming, and current matches feature, and much more.]]></description>
			<content:encoded><![CDATA[<div id="attachment_44" class="wp-caption alignnone" style="width: 597px"><a href="http://zanehooper.com/wp-content/uploads/zero-remorse.jpg"><img class="size-large wp-image-44    " style="margin-top: 10px; margin-bottom: 10px;" title="Zero Remorse" src="http://zanehooper.com/wp-content/uploads/zero-remorse-1024x457.jpg" alt="Zero Remorse" width="587" height="262" /></a><p class="wp-caption-text">Zero Remorse&#39;s new template</p></div>
<p><a title="Zero Remorse: Australian Gaming Team" href="http://www.zero-remorse.net/" target="_blank">Zero Remorse</a>, a professional Australian gaming team,  has asked for a complete reconstruction of their website. I&#8217;m developing the PHP and MySQL server-side and the XHTML, CSS, JS, jQuery, and AJAX client-side. This includes incorporation into a PHPBB forums system, a recent, upcoming, and current matches feature, and much more.</p>
]]></content:encoded>
			<wfw:commentRss>http://zanehooper.com/blog/zero-remorses-complete-reconstruction.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EoReality&#8217;s New Website</title>
		<link>http://zanehooper.com/blog/eorealitys-new-website.html</link>
		<comments>http://zanehooper.com/blog/eorealitys-new-website.html#comments</comments>
		<pubDate>Tue, 12 Oct 2010 04:05:55 +0000</pubDate>
		<dc:creator>Zane Hooper</dc:creator>
				<category><![CDATA[Jobs]]></category>
		<category><![CDATA[New Jobs]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zanehooper.com/?p=35</guid>
		<description><![CDATA[Well, this is posted a few months after the actual completion and launch of EoReality&#8216;s new template. This template was designed by sYnergy Forge (check them out, my favorite game/clan template designer I&#8217;ve ever seen) and coded in XHTML/PHP/CSS and some jQuery/Javascript/AJAX. About EoReality: By providing the highest quality performance servers in the industry, EoReality [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://eoreality.net" style="margin-right:10px;margin-bottom:10px;"><img class="alignleft" title="EoReality" src="http://zanehooper.com/wp-content/uploads/EoR.jpg" alt="EoReality" width="602" height="269" /></a></p>
<p>Well, this is posted a few months after the actual completion and launch of <a title="EoReality Hosting" href="http://eoreality.net" target="_blank">EoReality</a>&#8216;s new template. This template was designed by <a title="sYnergy Forge Design" href="http://www.synergy-forge.com/" target="_blank">sYnergy Forge</a> (check them out, my favorite game/clan template designer I&#8217;ve ever seen) and coded in XHTML/PHP/CSS and some jQuery/Javascript/AJAX.</p>
<p><strong>About </strong><a title="EoReality" href="http://EoReality.net" target="_blank"><strong>EoReality</strong></a><strong>:</strong></p>
<p>By providing the highest quality performance servers in the industry, <a title="EoReality" href="http://eoreality.net" target="_blank">EoReality</a> has gained the trust of top teams, organizations, and players. <a title="EoReality Hosting" href="http://eoreality.net" target="_blank">EoReality</a> runs its highly optimized servers on premium networks to ensure the lowest possible pings, best trace routes and accurate hit registration. What are you waiting for? Stop playing and start gaming. <a title="EoReality" href="http://eoreality.net" target="_blank">End of Reality</a>.</p>
<p><a title="EoReality Hosting" href="http://eoreality.net" target="_blank">EoReality</a> now provides hosting for my server(s), which allows upload speeds of up to 1gbps (as if that high is even needed) because it runs on Google Fiber&#8217;s new super-fast network.</p>
<p><strong>Note:</strong> <a title="EoReality Hosting" href="http://eoreality.net" target="_blank">EoReality</a> will be replacing the template I developed with a new one in the near future, so sorry if mine isn&#8217;t there any more.</p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://zanehooper.com/blog/eorealitys-new-website.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Security: Part 2 &#8211; Protecting vulnerable files</title>
		<link>http://zanehooper.com/blog/php-security-part-2-protecting-vulnerable-files.html</link>
		<comments>http://zanehooper.com/blog/php-security-part-2-protecting-vulnerable-files.html#comments</comments>
		<pubDate>Mon, 12 Jul 2010 03:01:29 +0000</pubDate>
		<dc:creator>Zane Hooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zanehooper.com/?p=25</guid>
		<description><![CDATA[While developing, a lot of files are files you don&#8217;t want users to see &#8211; whether they are admin, config, or page files &#8211; should be well secured. Admin Files You&#8217;re administrative home page (if you have an administration panel) should require the user to be of a certain level (state, whatever you want to [...]]]></description>
			<content:encoded><![CDATA[<p>While developing, a lot of files are files you don&#8217;t want users to see &#8211; whether they are admin, config, or page files &#8211; should be well secured.</p>
<p><strong>Admin Files</strong></p>
<p>You&#8217;re administrative home page (if you have an administration panel) should require the user to be of a certain level (state, whatever you want to call it) or in a certain user group. This value SHOULD NOT be stored in a cookie. Cookies can be modified too easily, and a nosy hacker would be able to be in your admin panel in seconds.</p>
<p>If you have properly secured your admin panel so that a regular user cannot access it, the next step is to secure the files (assuming you&#8217;re using a paged interface, which I will explain here).</p>
<p>A paged interface is one in which there is a home page that includes files in a pages folder of some sort. There are multiple insecurities that I will cover with this:</p>
<ol>
<li>Users accessing the directory of the pages</li>
<li>Users accessing other directories through this system</li>
</ol>
<p><strong>1. Users accessing the directory of the pages</strong></p>
<p>This can happen through multiple ways. One thing you must do is make sure that the file exists using if( file_exists( $file_name ) ), otherwise a user could enter an incorrect value and PHP will try to include a page that doesn&#8217;t exist. This step covers up your tracks for hiding the directory.</p>
<p>Next, you want to protect the files of the directory. My favorite way to do this is through a .htaccess file (for apache users). In the pages directory, add a .htaccess file with the contents:</p>
<div id="_mcePaste">RewriteEngine on</div>
<div id="_mcePaste">RewriteRule ^(.*)$ /path/to/where/they/should/go.php [L] #Security: Does not allow anyone into anywhere in this folder. Includes still work.</div>
<p>This protects the path and sends the user to the specified path. This could be a home page, a 404 error, page, or whatever you want. I do know that some people don&#8217;t like this method, or don&#8217;t have Apache, so the other way would be to use define( &#8216;SITE&#8217;, true ); in your index page and then add at the beginning of everyone of your pages, add if( !defined(&#8216;SITE&#8217;) ) die( &#8216;Hey! You\&#8217;re not supposed to be here!&#8217; );</p>
<p>These methods protect your pages directory from direct access but still allow use of PHP&#8217;s include(  ), include_once(  ), require(  ), and require_once(  ) functions.</p>
<p><strong>2. Users accessing other directories through this system</strong></p>
<p>This is a pretty simple hack that I found once while testing out the security of my files. I thought &#8220;Well, if I can access anything in the pages directory, what&#8217;s to keep me from accessing other directories?&#8221;</p>
<p>This hack is quite simple actually, and allows the hacker to figure out entire directories of a website and generate plenty of errors. As I said in Part 1, to be good at security you need to learn to hack first. So here&#8217;s how the hack works:</p>
<p>[Some Website]/index.php?page=ucp</p>
<p>Seems pretty simple right? That&#8217;s how links work. The PHP script then performs include( &#8216;pages/ucp.php&#8217; ), but what if we change UCP?</p>
<p>[Some Website]/index.php?page=../index</p>
<p>Hmm&#8230; PHP interprets this as include( &#8216;pages/../index.php&#8217; ), which includes the index page again. Now we start getting errors. Actually, now it includes the index page over and over until the page breaks. Now the user can do some snooping around, with things like:</p>
<p>[Some Website]/index.php?page=../admin/delete_user&amp;id=1</p>
<p>Using things like this the user can access admin/delete_user.php?id=1 and wreak havoc on the website. The simplest protection ever can fix this:</p>
<p>$page = str_replace( &#8216;../&#8217;, &#8221;, $page );</p>
<p>And you&#8217;re done!</p>
<p>Up Next: <strong>PHP Security: Part 3 &#8211; XSS Worms/Hacks</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://zanehooper.com/blog/php-security-part-2-protecting-vulnerable-files.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

