<?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>Skypher</title>
	<atom:link href="http://skypher.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://skypher.com</link>
	<description>The blog for absolutely nothing!</description>
	<lastBuildDate>Wed, 18 Aug 2010 15:09:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Fix for Windows batch script arguments handling &#8220;feature&#8221;</title>
		<link>http://skypher.com/index.php/2010/08/17/batch-command-line-arguments/</link>
		<comments>http://skypher.com/index.php/2010/08/17/batch-command-line-arguments/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 15:40:54 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[batch scripts]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=494</guid>
		<description><![CDATA[<p>Windows is full of &#8220;features&#8221; that probably seemed like a good idea at the time but which turn out to be a mayor pain in certain situation...]]></description>
			<content:encoded><![CDATA[<p>Windows is full of &#8220;features&#8221; that probably seemed like a good idea at the time but which turn out to be a mayor pain in certain situation. One of these is a feature in the handling of arguments passed to batch scripts: when you pass an argument that contains an equal sign or semicolon to a batch script, the argument gets split in two as if you had typed a space instead. Here is a simple example of a batch script that shows the first four arguments it was passed:</p>
<p><code><br />
@ECHO OFF<br />
ECHO Argument #1 = [ %1 ]<br />
ECHO Argument #2 = [ %2 ]<br />
ECHO Argument #3 = [ %3 ]<br />
ECHO Argument #4 = [ %4 ]<br />
ECHO Arguments   = [ %1 %2 %3 %4 ]<br />
&nbsp;<br />
</code></p>
<p>And here is the output of this script, when executed with quotes, equal signs and semicolons in the command-line arguments:</p>
<p><code style="color: silver; background: black"><br />
C:\&gt;test.cmd 1=not2;not3 " 2 " 3 4<br />
Argument #1 = [ 1 ]<br />
Argument #2 = [ not2 ]<br />
Argument #3 = [ not3 ]<br />
Argument #4 = [ " 2 " ]<br />
Arguments   = [ 1 not2 not3 " 2 " ]<br />
&nbsp;<br />
</code></p>
<p>This &#8220;feature&#8221; has existed since <a href="http://support.microsoft.com/kb/35938">MS-DOS</a> and apparently it got reported often enough to MS that they created <a href="http://support.microsoft.com/kb/71247">a second KB article</a> to tell you that they know it is a problem. Unfortunately, both KB articles offer no work-around. They also do not mention that this affects all versions of Windows to date as well.</p>
<p>If you use any of my tools, you may have noticed that I often allow you to specify options through command-line arguments in the form &#8220;&#8211;option=value&#8221;. If you are trying to write even the simplest batch wrapper script for any of these tools, you will immediately run into problems because of this &#8220;feature&#8221;: it is impossible for the script to know if the user typed &#8220;&#8211;option value details&#8221; or &#8220;&#8211;option=value;details&#8221; through conventional argument parsing.</p>
<p>Because I was frequently jumping through all kinds of flaming hoops to work around this &#8220;feature&#8221;, I decided to create a proper work-around to address this issue.</p>
<p><strong>The solution</strong><br />
After reading through the &#8220;help&#8221; output for most commands, I found that &#8220;help call&#8221; explains the existence of &#8220;%*&#8221;:</p>
<p><code style="color: silver; background: black"><br />
C:\&gt;help call<br />
Calls one batch program from another.<br />
&nbsp;<br />
&lt;snip&gt;<br />
    %* in a batch script refers to all the arguments (e.g. %1 %2 %3<br />
        %4 %5 ...)<br />
&lt;snip&gt;<br />
&nbsp;<br />
</code><br />
You may have noticed in my original example that &#8220;%*&#8221; retains the arguments passed to the script as is (without substituting equal signs, semicolons or any other characters for spaces). So, one solution would be to parse this string manually. In &#8220;help set&#8221; I found a way to extract a single character from a string as well as a way to create a counter that can be used as an index into the string:</p>
<p><code style="color: silver; background: black"><br />
C:\&gt;help set<br />
Displays, sets, or removes cmd.exe environment variables.<br />
&nbsp;<br />
&lt;snip&gt;<br />
Two new switches have been added to the SET command:<br />
&nbsp;<br />
    SET /A expression<br />
    SET /P variable=[promptString]<br />
&nbsp;<br />
The /A switch specifies that the string to the right of the equal sign<br />
is a numerical expression that is evaluated.  The expression evaluator<br />
is pretty simple and supports the following operations, in decreasing<br />
order of precedence:<br />
&nbsp;<br />
    ()                  - grouping<br />
    ! ~ -               - unary operators<br />
    * / %               - arithmetic operators<br />
    + -                 - arithmetic operators<br />
    &lt;&lt; &gt;&gt;               - logical shift<br />
    &amp;                   - bitwise and<br />
    ^                   - bitwise exclusive or<br />
    |                   - bitwise or<br />
    = *= /= %= += -=    - assignment<br />
      &amp;= ^= |= &lt;&lt;= &gt;&gt;=<br />
    ,                   - expression separator<br />
&nbsp;<br />
&lt;snip&gt;<br />
May also specify substrings for an expansion.<br />
&nbsp;<br />
    %PATH:~10,5%<br />
&nbsp;<br />
would expand the PATH environment variable, and then use only the 5<br />
characters that begin at the 11th (offset 10) character of the expanded<br />
result.  If the length is not specified, then it defaults to the<br />
remainder of the variable value.  If either number (offset or length) is<br />
negative, then the number used is the length of the environment variable<br />
value added to the offset or length specified.<br />
&lt;snip&gt;<br />
&nbsp;<br />
</code></p>
<p>In &#8220;help cmd&#8221; we can read about delayed environment variable expansion, which can be used to read/write environment variables at runtime:</p>
<p><code style="color: silver; background: black"><br />
C:\&gt;help cmd<br />
Starts a new instance of the Windows command interpreter<br />
&nbsp;<br />
&lt;snip&gt;<br />
/V:ON   Enable delayed environment variable expansion using ! as the<br />
        delimiter. For example, /V:ON would allow !var! to expand the<br />
        variable var at execution time.  The var syntax expands variables<br />
        at input time, which is quite a different thing when inside of a FOR<br />
        loop.<br />
&lt;snip&gt;<br />
&nbsp;<br />
</code></p>
<p>And in &#8220;help setlocal&#8221; we can find that it is possible to enable delayed environment variable expansion without having to restart cmd.exe:</p>
<p><code style="color: silver; background: black"><br />
C:\&gt;help setlocal<br />
&lt;snip&gt;<br />
        ENABLEDELAYEDEXPANSION / DISABLEDELAYEDEXPANSION<br />
            enable or disable delayed environment variable<br />
            expansion. These arguments takes precedence over the CMD<br />
            /V:ON or /V:OFF switches. See CMD /? for details.<br />
&nbsp;<br />
These modifications last until the matching ENDLOCAL command,<br />
regardless of their setting prior to the SETLOCAL command.<br />
&lt;snip&gt;<br />
&nbsp;<br />
</code></p>
<p>By combing these features, we can create a batch script &#8220;function&#8221; that parses the command line character by character, taking into consideration quotes, equal signs, semicolons, etc&#8230; and creating an environment variable for each argument, in quoted, unquoted and original form, as well as an environment variable that contains the number of arguments:</p>
<p><code><br />
&#x3a;PARSE_ARGV<br />
  SET PARSE_ARGV_ARG=[]<br />
  SET PARSE_ARGV_END=FALSE<br />
  SET PARSE_ARGV_INSIDE_QUOTES=FALSE<br />
  SET /A ARGC = 0<br />
  SET /A PARSE_ARGV_INDEX=1<br />
  &#x3a;PARSE_ARGV_LOOP<br />
  CALL &#x3a;PARSE_ARGV_CHAR !PARSE_ARGV_INDEX! "%%ARGV&#x3a;~!PARSE_ARGV_INDEX!,1%%"<br />
  IF ERRORLEVEL 1 (<br />
    EXIT /B 1<br />
  )<br />
  IF !PARSE_ARGV_END! == TRUE (<br />
    EXIT /B 0<br />
  )<br />
  SET /A PARSE_ARGV_INDEX=!PARSE_ARGV_INDEX! + 1<br />
  GOTO &#x3a;PARSE_ARGV_LOOP<br />
&nbsp;<br />
  &#x3a;PARSE_ARGV_CHAR<br />
    IF ^%~2 == ^" (<br />
      SET PARSE_ARGV_END=FALSE<br />
      SET PARSE_ARGV_ARG=.%PARSE_ARGV_ARG&#x3a;~1,-1%%~2.<br />
      IF !PARSE_ARGV_INSIDE_QUOTES! == TRUE (<br />
        SET PARSE_ARGV_INSIDE_QUOTES=FALSE<br />
      ) ELSE (<br />
        SET PARSE_ARGV_INSIDE_QUOTES=TRUE<br />
      )<br />
      EXIT /B 0<br />
    )<br />
    IF %2 == "" (<br />
      IF !PARSE_ARGV_INSIDE_QUOTES! == TRUE (<br />
        EXIT /B 1<br />
      )<br />
      SET PARSE_ARGV_END=TRUE<br />
    ) ELSE IF NOT "%~2!PARSE_ARGV_INSIDE_QUOTES!" == " FALSE" (<br />
      SET PARSE_ARGV_ARG=[%PARSE_ARGV_ARG&#x3a;~1,-1%%~2]<br />
      EXIT /B 0<br />
    )<br />
    IF NOT !PARSE_ARGV_INDEX! == 1 (<br />
      SET /A ARGC = !ARGC! + 1<br />
      SET ARG!ARGC!=%PARSE_ARGV_ARG&#x3a;~1,-1%<br />
      IF ^%PARSE_ARGV_ARG&#x3a;~1,1% == ^" (<br />
        SET ARG!ARGC!_=%PARSE_ARGV_ARG&#x3a;~2,-2%<br />
        SET ARG!ARGC!Q=%PARSE_ARGV_ARG&#x3a;~1,-1%<br />
      ) ELSE (<br />
        SET ARG!ARGC!_=%PARSE_ARGV_ARG&#x3a;~1,-1%<br />
        SET ARG!ARGC!Q="%PARSE_ARGV_ARG&#x3a;~1,-1%"<br />
      )<br />
      SET PARSE_ARGV_ARG=[]<br />
      SET PARSE_ARGV_INSIDE_QUOTES=FALSE<br />
    )<br />
    EXIT /B 0<br />
&nbsp;<br />
</code></p>
<p>To use it in a batch script, you should add the code to the end of the script and call it at the start like so:</p>
<p><code><br />
@ECHO OFF<br />
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION<br />
&nbsp;<br />
SET ARGV=.%*<br />
CALL &#x3a;PARSE_ARGV<br />
IF ERRORLEVEL 1 (<br />
  ECHO Cannot parse arguments<br />
  ENDLOCAL<br />
  EXIT /B 1<br />
)<br />
&nbsp;<br />
<em>REM Main code goes here</em><br />
ENDLOCAL<br />
EXIT /B 0<br />
&nbsp;<br />
&#x3a;PARSE_ARGV<br />
&lt;snip&gt;<br />
&nbsp;<br />
</code><br />
Note: you should make sure your main code does not &#8220;fall through&#8221; into the PARSE_ARGV function by using &#8220;EXIT /B 0&#8243; at the end of your code.</p>
<p>For each argument passed to the script, numbered environment variables will be created to store the arguments value &#8220;as is&#8221; and in quoted and unquoted form. Additionally, an environment variable will be created that contains the number of arguments supplied. Here is a list of the created environment variables and what they contain:</p>
<ul>
<li>!ARGC! &#8211; Contains the number of arguments,</li>
<li>!ARGx! &#8211; Contains the value of the x-th argument as is,</li>
<li>!ARGx_! &#8211; Contains the value of the x-th argument with any quotes removed,</li>
<li>!ARGxQ! &#8211; Contains the value of the x-th argument with quotes added if not already present,</li>
</ul>
<p>For example: the values for the first argument will be stored in !ARG1!, !ARG1_! and !ARG1Q!.</p>
<p>To make it easier to access any argument(s) by number, the following functions can be used:</p>
<p>To read the values of !ARGx!, !ARGx_! and !ARGxQ! for argument number x into environment variables !y!, !y_! and !yQ! use the below code and &#8220;CALL :GETARG x y&#8221;:</p>
<p><code><br />
&#x3a;GETARG<br />
  SET %2=!ARG%1!<br />
  SET %2_=!ARG%1_!<br />
  SET %2Q=!ARG%1Q!<br />
  EXIT /B 0<br />
&nbsp;<br />
</code><br />
eg. &#8220;CALL :GETARG 1 FIRST_ARGUMENT&#8221; will set !FIRST_ARGUMENT!, !FIRST_ARGUMENT_! and !FIRST_ARGUMENTQ! to the values of !ARG1!, !ARG1_! and !ARG1Q! respectively.</p>
<p>To read the values of the numbered arguments x-y into environment variable !z! use the below code and &#8220;CALL :GETARGS x y z&#8221;:<br />
<code><br />
&#x3a;GETARGS<br />
  SET %3=<br />
  FOR /L %%I IN (%1,1,%2) DO (<br />
    IF %%I == %1 (<br />
      SET %3=!ARG%%I!<br />
    ) ELSE (<br />
      SET %3=!%3! !ARG%%I!<br />
    )<br />
  )<br />
  EXIT /B 0<br />
&nbsp;<br />
</code><br />
eg. &#8220;CALL :GETARGS 1 3 FIRST_THREE_ARGUMENT&#8221; will set !FIRST_THREE_ARGUMENTS! to the values of !ARG1!, !ARG2! and !ARG3! concatinated.</p>
<p>To conclude this post, here is an example that shows how you can use these functions to create a script that parses the command-line arguments correctly and greatly simplifies the handling of a variable number of arguments:</p>
<p><code><br />
@ECHO OFF<br />
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION<br />
&nbsp;<br />
SET ARGV=.%*<br />
CALL &#x3a;PARSE_ARGV<br />
IF ERRORLEVEL 1 (<br />
  ECHO Cannot parse arguments<br />
  ENDLOCAL<br />
  EXIT /B 1<br />
)<br />
&nbsp;<br />
ECHO Arguments count = !ARGC!<br />
FOR /L %%I IN (1,1,!ARGC!) DO (<br />
  CALL &#x3a;GETARG %%I ARGI<br />
  ECHO Argument #%%I = [ !ARGI! ]<br />
)<br />
CALL &#x3a;GETARGS 1 !ARGC! ARGS<br />
ECHO Arguments   = [ !ARGS! ]<br />
&nbsp;<br />
ENDLOCAL<br />
EXIT /B 0<br />
&nbsp;<br />
&#x3a;GETARG<br />
  &lt;snip&gt;<br />
&nbsp;<br />
&#x3a;GETARGS<br />
  &lt;snip&gt;<br />
&nbsp;<br />
&#x3a;PARSE_ARGV<br />
  &lt;snip&gt;<br />
&nbsp;<br />
</code></p>
<p>You can download the example <a href="http://skypher.com/SkyLined/download/batch_command_line_arguments/test.cmd">here</a>. If put the output of this code for the initial test case and various numbers of arguments below:</p>
<p><code style="color:silver; background:black;"><br />
C:\&gt;test.cmd 1=not2;not3 " 2 " 3 4<br />
Arguments count = 4<br />
Argument #1 = [ 1=not2;not3 ]<br />
Argument #2 = [ " 2 " ]<br />
Argument #3 = [ 3 ]<br />
Argument #4 = [ 4 ]<br />
Arguments   = [ 1=not2;not3 " 2 " 3 4 ]<br />
&nbsp;<br />
C:\&gt;test.cmd<br />
Arguments count = 0<br />
Arguments   = [  ]<br />
&nbsp;<br />
C:\&gt;test.cmd 1<br />
Arguments count = 1<br />
Argument #1 = [ 1 ]<br />
Arguments   = [ 1 ]<br />
&nbsp;<br />
C:\&gt;test.cmd 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18<br />
Arguments count = 18<br />
Argument #1 = [ 1 ]<br />
Argument #2 = [ 2 ]<br />
Argument #3 = [ 3 ]<br />
Argument #4 = [ 4 ]<br />
Argument #5 = [ 5 ]<br />
Argument #6 = [ 6 ]<br />
Argument #7 = [ 7 ]<br />
Argument #8 = [ 8 ]<br />
Argument #9 = [ 9 ]<br />
Argument #10 = [ 10 ]<br />
Argument #11 = [ 11 ]<br />
Argument #12 = [ 12 ]<br />
Argument #13 = [ 13 ]<br />
Argument #14 = [ 14 ]<br />
Argument #15 = [ 15 ]<br />
Argument #16 = [ 16 ]<br />
Argument #17 = [ 17 ]<br />
Argument #18 = [ 18 ]<br />
Arguments   = [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ]<br />
&nbsp;<br />
</code></p>
<p><strong>Limitations/caveats</strong></p>
<ul>
<li>This code depends on the Command Extensions feature as described in &#8220;help cmd&#8221;, if they are disabled and cannot be enabled or are unavailable, the code will not run. As far as I can tell, all versions of Windows since Windows XP at least support the feature and allow it to be enabled if it is disabled, so I do not expect this to be a problem.</li>
<li>This code does not handle unclosed quotes in the arguments. If you execute a test script that uses this code with an unclosed quote in the arguments,as in [test.cmd "], an error message will be shown and the script will not run. Because I do not know of any valid use-case, I expect that this is often caused by an accidentally forgotten closing quote. I assume that the user benefits more from an error that allows him/her to fix the missing quote than from a program that tries to make assumptions about what the user wants.</li>
</ul>
<p>I hope you&#8217;ll find this useful. Please use the comments to let me know if you do or if you have any suggestions!</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/08/17/batch-command-line-arguments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Issue 17 &#8211; Msxml2.XMLHTTP.3.0 response handling memory corruption</title>
		<link>http://skypher.com/index.php/2010/08/10/ms10-051/</link>
		<comments>http://skypher.com/index.php/2010/08/10/ms10-051/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 18:49:16 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Repro]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=487</guid>
		<description><![CDATA[<p>Today Microsoft released <a href="http://www.microsoft.com/technet/security/bulletin/ms10-051.mspx">MS10-051</a>; a fix for a vulnerability in MSXML 3.0 which I reported to them April 12th 2010.</p>
<p>Case details can be found <a href="http://code.google.com/p/skylined/issues/detail?id=17">here</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p>Today Microsoft released <a href="http://www.microsoft.com/technet/security/bulletin/ms10-051.mspx">MS10-051</a>; a fix for a vulnerability in MSXML 3.0 which I reported to them April 12th 2010.</p>
<p>Case details can be found <a href="http://code.google.com/p/skylined/issues/detail?id=17">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/08/10/ms10-051/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JsSfx &#8211; JavaScript compression/obfuscation</title>
		<link>http://skypher.com/index.php/2010/08/10/jssfx/</link>
		<comments>http://skypher.com/index.php/2010/08/10/jssfx/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 10:43:02 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=483</guid>
		<description><![CDATA[<p>I revisited and released an old tool for compressing and obfuscating JavaScript. Given a JavaScript as input, it will generate and output self-extracting compressed JavaScript.</p>
<p><a href="http://code.google.com/p/jssfx/">http://code.google.com/p/jssfx/
</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I revisited and released an old tool for compressing and obfuscating JavaScript. Given a JavaScript as input, it will generate and output self-extracting compressed JavaScript.</p>
<p><a href="http://code.google.com/p/jssfx/">http://code.google.com/p/jssfx/<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/08/10/jssfx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ultra-Edit buffer overflow in GNU Aspell</title>
		<link>http://skypher.com/index.php/2010/07/16/ultra-edit-buffer-overflow-in-gnu-aspell/</link>
		<comments>http://skypher.com/index.php/2010/07/16/ultra-edit-buffer-overflow-in-gnu-aspell/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 08:26:23 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[PoC]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=476</guid>
		<description><![CDATA[<p>While looking at logs from my fuzzers, I found a bug in <a href="http://www.ultraedit.com/">UltraEdit</a> that triggered when I loaded a file with a long string of alphabetic characters...]]></description>
			<content:encoded><![CDATA[<p>While looking at logs from my fuzzers, I found a bug in <a href="http://www.ultraedit.com/">UltraEdit</a> that triggered when I loaded a file with a long string of alphabetic characters. A bit of debugging indicated that UltraEdit was using a version of <a href="http://aspell.net">GNU Aspell</a> that had a buffer overflow when handling long words. UltraEdit has been using Aspell since version 11<sup><a href="http://en.wikipedia.org/wiki/UltraEdit">[1]</a></sup>. I&#8217;ve not looked at exploitability, but the application seems to detect the overflow and terminate cleanly, so they may be saved by mitigations. IDM, the creators of UltraEdit, have since released a new version that fixes the issue.</p>
<p>Case history: <a href="http://code.google.com/p/skylined/issues/detail?id=2">http://code.google.com/p/skylined/issues/detail?id=2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/07/16/ultra-edit-buffer-overflow-in-gnu-aspell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video Playback on Android 2</title>
		<link>http://skypher.com/index.php/2010/05/21/video-playback-on-android-2/</link>
		<comments>http://skypher.com/index.php/2010/05/21/video-playback-on-android-2/#comments</comments>
		<pubDate>Fri, 21 May 2010 14:56:48 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=469</guid>
		<description><![CDATA[<p>After my <a href="http://skypher.com/index.php/2009/03/29/video-playback-on-android/">first post on the subject</a> I got the tip for a better, cleaner and faster encoder.</p>
<p>Kudos to Henk and Todd for the tip!</p>
<p>For the complete story on how to play your own video&#8217;s on android:</p>
<p>Install Jeff Hamilton’s ‘Video Player’ from the market...]]></description>
			<content:encoded><![CDATA[<p>After my <a href="http://skypher.com/index.php/2009/03/29/video-playback-on-android/">first post on the subject</a> I got the tip for a better, cleaner and faster encoder.</p>
<p>Kudos to Henk and Todd for the tip!</p>
<p>For the complete story on how to play your own video&#8217;s on android:</p>
<p><em>Install Jeff Hamilton’s ‘Video Player’ from the market.<br />
This is a simple, no BS video player which supports playing MP4 or 3GPP with H.264, H.263 encoding and MP3, AAC or AMR Audio from your SD card.</p>
<p>Now that was easy.</em></p>
<p>Download iPodMe (either google it or go to to Softpedia  <a href="http://www.softpedia.com/progDownload/iPodME-Download-119389.html">http://www.softpedia.com/progDownload/iPodME-Download-119389.html</a>)</p>
<p>iPodMe is so straight forward that I&#8217;m not going into that program, you can&#8217;t go wrong, it&#8217;s too easy!<br />
Only tip: Look at the resolution you are setting it to, try and match your phone.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/05/21/video-playback-on-android-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Strings &#8216; vs &#8220;</title>
		<link>http://skypher.com/index.php/2010/05/17/php-strings-vs/</link>
		<comments>http://skypher.com/index.php/2010/05/17/php-strings-vs/#comments</comments>
		<pubDate>Mon, 17 May 2010 19:45:22 +0000</pubDate>
		<dc:creator>Cipher</dc:creator>
				<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=464</guid>
		<description><![CDATA[<p>It&#8217;s wideley known that PHP supports both &#8216; (single quote) and &#8221; (double qoute) for string delimiting.
It&#8217;s also widely known that PHP evaluates the DQ (Double Quote) Strings and replaces variables with their actual value...]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s wideley known that PHP supports both &#8216; (single quote) and &#8221; (double qoute) for string delimiting.<br />
It&#8217;s also widely known that PHP evaluates the DQ (Double Quote) Strings and replaces variables with their actual value. But not a lot has been written about what is actually faster.</p>
<p>Its quite simple: SQ (Single Quotes) is faster. Hands down.</p>
<p>It&#8217;s even faster when adding the variable by concatenating multiple strings. Please look at the following code: <code><br />
//variable used in DQ<br />
$time = microtime();<br />
for($i=0;$i<1000;++$i){<br />
	$$i = "Some Random String $i with a number";<br />
}<br />
echo microtime()-$time;<br />
//Variable used in concatenation with DQ<br />
echo '<br/>';<br />
for($i=0;$i<1000;++$i){<br />
	$$i = "Some Random String ".$i." with a number";<br />
}<br />
echo microtime()-$time;<br />
//variable used in concatenation with SQ<br />
echo '<br/>';<br />
$time = microtime();<br />
for($i=0;$i<1000;++$i){<br />
	$$i = 'Some Random String '.$i.' with a number';<br />
}<br />
echo microtime()-$time;<br />
</code></p>
<p>Code speaks for itself. In order of speed:<br />
1. SQ<br />
2. DQ without concat.<br />
3. DQ with concat.</p>
<p>Why, easy: Single quotes does not require evaluating. DQ without concat requires 1 evaluate. DQ with concat requires 2 evaluations of the string.<br />
So, in conclusion: double quotes are evil!</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/05/17/php-strings-vs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MSIE 6,7, 8 &amp; 9 insertAdjacentElement NULL ptr</title>
		<link>http://skypher.com/index.php/2010/04/12/msie-67-8-9-insertadjacentelement-null-ptr/</link>
		<comments>http://skypher.com/index.php/2010/04/12/msie-67-8-9-insertadjacentelement-null-ptr/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 12:03:10 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[Repro]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=459</guid>
		<description><![CDATA[<p>  img=new Image();
  img.insertAdjacentElement("afterEnd",img);</p>
<p>More details here: <a href="http://code.google.com/p/skylined/issues/detail?id=15">http://code.google.com/p/skylined/issues/detail?id=15</a></p>
]]></description>
			<content:encoded><![CDATA[<p><code>  img=new Image();<br />
  img.insertAdjacentElement("afterEnd",img);</code></p>
<p>More details here: <a href="http://code.google.com/p/skylined/issues/detail?id=15">http://code.google.com/p/skylined/issues/detail?id=15</a></p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/04/12/msie-67-8-9-insertadjacentelement-null-ptr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple QuickTime memory corruption when loading BMP file</title>
		<link>http://skypher.com/index.php/2010/04/12/apple-quicktime-memory-corruption-when-loading-bmp-file/</link>
		<comments>http://skypher.com/index.php/2010/04/12/apple-quicktime-memory-corruption-when-loading-bmp-file/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 11:53:01 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=455</guid>
		<description><![CDATA[<p>From <a href="http://support.apple.com/kb/HT4104">http://support.apple.com/kb/HT4104</a>:
CVE-ID: CVE-2010-0536</p>
<p>Impact: Opening a maliciously crafted BMP image may lead to an unexpected application termination or arbitrary code execution</p>
<p>Description: A memory corruption issue exists in the handling of BMP images...]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://support.apple.com/kb/HT4104">http://support.apple.com/kb/HT4104</a>:<br />
CVE-ID: CVE-2010-0536</p>
<p>Impact: Opening a maliciously crafted BMP image may lead to an unexpected application termination or arbitrary code execution</p>
<p>Description: A memory corruption issue exists in the handling of BMP images. Opening a maliciously crafted BMP image may lead to an unexpected application termination or arbitrary code execution. This update addresses the issue by performing additional validation of BMP images.</p>
<p>More details here:<br />
<a href="http://code.google.com/p/skylined/issues/detail?id=11">http://code.google.com/p/skylined/issues/detail?id=11</a></p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/04/12/apple-quicktime-memory-corruption-when-loading-bmp-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSIE 8,9 (X)HTML stack exhaustion</title>
		<link>http://skypher.com/index.php/2010/04/12/msie-89-xhtml-stack-exhaustion/</link>
		<comments>http://skypher.com/index.php/2010/04/12/msie-89-xhtml-stack-exhaustion/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 11:45:23 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[Repro]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=452</guid>
		<description><![CDATA[<p>Many nested tags in MSIE can cause stack exhaustion, which can crash the tab and even the entire browser.</p>
<p>&#60;?xml version="1.0" encoding="UTF-8"?&#62;
&#60;!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&#62;
&#60;html xmlns="http://www.w3.org/1999/xhtml"&#62;
  &#60;address/&#62;&#60;address/&#62;&#60;address/&#62;&#60;address/&#62;&#60;address/&#62;&#60;address/&#62;......]]></description>
			<content:encoded><![CDATA[<p>Many nested tags in MSIE can cause stack exhaustion, which can crash the tab and even the entire browser.</p>
<p><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br />
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />
  &lt;address/&gt;&lt;address/&gt;&lt;address/&gt;&lt;address/&gt;&lt;address/&gt;&lt;address/&gt;.... etc...<br />
&lt;/html&gt;</code></p>
<p>More details here: <a href="http://code.google.com/p/skylined/issues/detail?id=14">http://code.google.com/p/skylined/issues/detail?id=14</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/04/12/msie-89-xhtml-stack-exhaustion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSIE 9 regular expression related crashes</title>
		<link>http://skypher.com/index.php/2010/04/12/msie-9-regular-expression-related-crashes/</link>
		<comments>http://skypher.com/index.php/2010/04/12/msie-9-regular-expression-related-crashes/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 11:32:07 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PoC]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=446</guid>
		<description><![CDATA[<p>The following code snippets will crash MSIE 9 platform review...]]></description>
			<content:encoded><![CDATA[<p>The following code snippets will crash MSIE 9 platform review. Because this is not a stable release, but a preview of a product in development, it is expected to have a few bugs here and there &#8211; so don&#8217;t go browsing the web with it <img src='http://skypher.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><code>&lt;SCRIPT&gt;/+&lt;/SCRIPT&gt;<br />
&lt;SCRIPT&gt;/(&lt;/SCRIPT&gt;<br />
&lt;SCRIPT&gt;/[B-A]/;&lt;/SCRIPT&gt;</code></p>
<p>More details here: <a href="http://code.google.com/p/skylined/issues/detail?id=13">http://code.google.com/p/skylined/issues/detail?id=13</a></p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/04/12/msie-9-regular-expression-related-crashes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
