Monthly Archives: December 2006

Livskraft 2006

Me and my sister Susanna are now leaving for the New Year’s camp Livskraft that takes place in Uppsala, Sweden. I will be back in January.

Ext3 filesystem support for Windows

I just want to give credits to the people at http://www.fs-driver.org for creating an incredible little tool that has saved my day a couple of times. They have produced a fully functional and stable way to access Ext3-formatted disks under Windows.

Now you might ask, what is Ext3? It is a file system, a way to arrange all those files and folders on a hard drive, CD-rom or USB memory drive. Ext3 is a very versalite and safe file system, even though there are other more specialized alternatives that perform faster in some areas. You could say that Ext3 has become the industry standard file system for Linux systems all over the world.
The Windows counterpart of Ext3 is called NTFS, and is a proprietary system developed by Microsoft, which means that it still is difficult to fully use NTFS disks under Linux and other free systems. File systems are extremely complicated, and without proper specifications it is difficult to decipher the inner workings of the file system. Full NTFS support under Linux is coming closer every day, but even if full support is announced, it remains a proprietary Microsoft system and should be avoided.

To share data between Linux and Windows used to be quirky, leaving the obselote FAT32 file system as the only file system supported fully by both Linux and Windows. Until Windows got support for Ext3!

I tried it out on my 80GB USB hard drive, plugged it in to a Windows box and installed the driver. Suddenly a new disk drive popped up in Explorer, and I could read and write to all my files. Wonderful! This meant that I finally can use a real file system for all my storage needs. Thumbs up!

Tip: Create a small partition on you USB drive formatted with FAT32 that only contains the installation file for the Ext3 driver. This means that you can bring your disk to any Windows computer, install the driver from the mini-partition, and then take advantage of all the features of a real file system!

Free internet on the X2000 trains – How?

So I travelled home to my home town Västerås by train today, and I figured something out.
The Swedish Express-class trains (the type I travelled in) called X2000 are equipped with both electric 230V outlets and wireless internet. The electricity is free, but the wireless internet costs several Swedish Kronor per hour if you are a poor student that only travels on second class tickets like me. You are using your laptop but feeling handicapped without internet, or just have to check your e-mail right now. So what to do?

There is a way I found to get an internet connection for free! I am not going to show you how to crack the login system, or do a heavy-duty crack. If you expected that, go back to your parent’s house and stick to Counter-Strike or some other trivial way to spend your time. Besides, that would be too obvious and might draw the attendants’ attention to you (and it is illegal!).
Before continuing, I also want to issue this disclaimer: I do not take any responsibility for anything that happens to you by doing this. If anybody finds out what you are doing, you might lose your ticket, be dropped off at the next station, be charged a heavy fine, or even charged in court. This method is written here for educational purposes and the joy of breaking a system only, and I do not encourage anybody to commit a crime.

So if the main entrance (cracking the login system) is the wrong way we just take the back door! In this case the one big weak point in the system is quite discreet and simple, but it requires that you get up from your seat and walk! Oh, no! The nightmare for a geek!

Don’t bring your laptop, you are just out on an intelligence mission for now. Head over all the way to the first class section of the train (probably the frontmost couch) and sneak in. I think that you not are allowed to enter the first-class section with a second-class tickets, so
you will need good timing and you have to be smart. Here comes the plan: First-class passengers get an internet connection for free, and they log in with a code they have printed on their ticket. Swedish railway tickets are in the size of flight tickets, so they are
easy to spot if their owners let them lay around on their trays and tables. What you do is that you walk quite quickly to the very front of the train, pretending to be on your way to the front of the train just for the fun of it. The real thing, though, is that you are looking for
open train tickets laying around. When you reached the front of the train, stare out of the window for a few seconds, play that you get bored of it and start walking back, more slowly this time. Remember where you spotted open tickets and walk slowly past them while
discreetly peering on them to find out the code. One tip is that you pretend to lose your balance of the train rocking and stand still for one second just beside the victim.

The most difficult part of this hack is that you will have to memorize a thirteen-figure code containing letters and numbers, but if you are a geek like me you probably have no problems to quickly memorize long strings of nonsense text (IP addresses anyone?) The code is on the upper middle side of the ticket if you wondered. You have the same type of code on your second-class ticket if you want to practice reading and memorizing that one.

Now go back to your seat, rehearsing the code over and over again as you walk. Sit down at your laptop and write it up somewhere safe. That is your ticket for a free internet connection!
Of course you must not steal the ticket, even if it seems tempting. The art of trainleeching is to leave as little a trace as possible.

Configure your computer to use the wireless connection. The SSID is “SJ” and there is no encryption. Head to the web page http://www.sjinternetombord.se and enter the code. Press login!

If everything goes right, you are now presented with a happy message confirming that you have logged in and the internet is ready to use.

Happy surfing!

There is one catch, though. The code seems to be a one-time code only, so what probably happens when you use the code is that the person who really owns the code will not get their free internet connection. They might call the technical support, which in turn might check the logs, and find that the code has been used by a specific MAC address (an address unique to your network interface). This address ties the login to your specific computer! You therefore have to choose your “target” wisely. Of course there are ways to change a MAC address, but that is outside the scope of this guide.

So this was a proof-of-concept of trainleeching on the Swedish X2000 trains. Use this information wisely. This guide was written on board an X2000 and of course posted from a leeched internet connection!

For first-class passengers I have the following recommendation: Keep your ticket clear of curious bystanders and your code hidden.

And now my recommendation for SJ: Why don’t you open up your networks for everybody to use? You save support costs for a complex coded system, get more happy passengers, and even more people will choose to travel by train instead of by domestic airlines (which is becoming a more and more popular in Sweden)

Finally, a last word of advice: Have fun! If you like this article or want to give some feedback, write your comment below.

The state of Python curses support?

The past months, I have been developing a program written in the beautiful and fun language of Python during my spare hours on board Elida. It is too early to reveal any details, but I do feel excited about the program and its features, and I hope to make a first alpha
release next year.
The program uses the ncurses library, which is a standard tool used by almost anybody who develops graphical applications that run on the Linux and Unix console. However, the Python implementation seems to have several shortcomings, some that have caused trouble for me.

First off is the apparent lack of support for wide characters. It might just be that the Python packages I use are not compiled with support for wide characters. Wide characters means letters and characters Unicode character set, supporting any letter in any language through all known history, compared to 256 characters that the standard ASCII character set supports. When displaying strings with these extended characters, my program just displays garbled text. Solution: Filter out all non-ASCII characters (ugly)

Then is the troubles of inputting key codes. When I press different control characters on the console, “Ctrl-J” is the same as “Enter”, “Ctrl-H” is the same as Backspace and so on. I want to take use of the combination Ctrl-J and Ctrl-H, but that means that the Enter and Backspace keys get the same actions. That is not what I want. I have looked at the source code of ncmpc, an excellent music player program that uses curses in a similar manner to my program, and it seems to get different key codes for Ctrl-J and Enter, which of course makes me jealous.

On board the ship I have just to little possibility to get out on the Internet to make a thorough research on these issues, but by reading my offline documentation for Python and Curses, I get the impression that the curses support is just not ready for prime-time yet. Is there anybody out there who happens to know more about this issue, or that even has any experience developing with this toolkit? I would love some input on this, since I feel a bit confused about everything right now.

Military service – Not for me!

I got a letter this Friday from the Swedish military service authorities. I am liberated from doing military service, and I don’t even have to go through the recruitment process! I feel very joyful and relieved, I have for a long time wished to become assured of this.

The last two weeks with Elida have been spent on the island of Öckerö, a few kilometres north of Gothenburg. We are moored at “Ö-varvet”, a local shipyard that is installing the electric components of the Diesel engine. Elida V has got the side rails installed, and I have been working with the radios and navigation equipment. As a certified passenger ship, there are tough requirements on the quality and number of communications equipment on board. To this date, I have installed one long range MF/HF (short wave) radio, one VHF radio, one NAVTEX (navigation information and text messages) receiver, one GPS receiver, three hand-held and water-resistant VHF radios and one SART transponder (a radar beacon for locating the ship in case of emergency. What is left are the two combined AIS/GPS units and the chart plotter.

This weekend I spent with Robert, Karin, Ellinor and Mattias in Gothenburg, away from the ship. We slept over at Ellinor’s and Mattias’ apartment, watched Happy Feet on Friday (yay!), went Christmas shopping on Saturday (I am finished buying Christmas presents!), and on Sunday we went to service at the Livets Ord (Word of Life) church. Thanks to Ellinor and Mattias for their hospitality and all the good food!

On Thursday I am leaving for Västerås, where I will spend Christmas with my family. After that, Livskraft!

Radio equipment

So we finally got started installing various radio and navigation equipment on Elida V. I and Robert attached the various devices to the navigation cabin on the deckhouse. We have a lot of radios, and a lot of antennas, but this is because the equipment is heavily regulated by the maritime administration. Being a passenger ship, Elida V needs to be fully equipped with shortwave radios, VHF radios (about 4-5 of them), GPS, AIS, NAVTEX and lots of other things.

On Monday we will leave the harbour of Fiskebäck to tug the boat to the shipyard at Öckerö, which will install the final electric equipment for the engine to run.

December is already here, and we have been in Fiskebäck for two months straight and building the ship all the time. What keeps me thinking is the relatively high temperature so late on the year. Although it now has become evening, the thermometer still shows 12 degrees celsius. I guess there won’t be no white christmas this year. Normal temperature in December is around zero degrees as far as I know.

Over Christmas I will travel home to Västerås to be with my family, and on New Year’s Eve I will be at Livskraft in Uppsala, a christian new-years camp for people like me. Hopefully I and my friends will be responsible for the café entertainment during the evenings.

We have also got wireless LAN on the ship. I am typing this message from the rear window of the captain’s cabin, connecting to our office about hundred meters inshore. That is a great relief, since I am able to check my mail, blog and do various surfing without having to freeze outside (it is still too cold outside to sit still comfortably)