Welcome to maniacmartin, the personal site of Martin Smith.
I'm listening to Fleetwood Mac – The Chain

25 June 2008

Split Ticket Rail Travel

Filed under: Blog — martin @ 5:35 pm

Previously, I thought that that the cheapest way to travel from Market Rasen to Oxford and back was a Saver Return (Route not via London) with a Young Person’s 16-25 Railcard, costing £32.35.

However, that was before I learnt about Split Tickets. Basically, if on both your journeys, your train goes through a certain station, and the train makes a stop there, buying 2 tickets — one to this station, and one from that ticket to the destination — may be cheaper.

This is usually when traveling to a busy station from far away. Get a ticket to an en-route nearby small station, then a ticket from this station to your destination.

First of all, I needed to find an outgoing and return route that were the same, as previously I have taken previous outbound and return routes. Such a route exists, and it is:
Market Rasen → Lincoln → Nottingham → Birmingham New St → Oxford.

In this case, the greatest saving can be made by splitting around Leamington Spa, 2 stops up the line from Oxford. This also holds for returns from Oxford to Market Rasen.
The Saver Return with 16-25 Railcard from Market Rasen to Leamington Spa is £20.95, and from Leamington Spa to Oxford is £9.10, totaling £30.05, which is £2.30 or 7.1% less than a direct return ticket. Enough to pay for a sandwich en route :)

Note that if you buy these tickets, you’re committed to traveling via your split point on the return route. This is not a problem for me, as all non-London routes between Market Rasen and Oxford stop at Leamington Spa.

Also, on busy routes, 2 singles may be cheaper than a return. So, with split tickets, the cheapest way to do a return might involve 4 single tickets.

22 May 2008

Javascript and Online Banking

Filed under: Blog — martin @ 12:10 pm

I have recently started using Opera for my day-to-day surfing, as Firefox 3 Beta 5 locks up now and again, and decides to use 100% CPU. This usually happens when I have a few tabs loading that have Flash video in them. However, Opera’s javascript engine isn’t quite like IE or Firefox’s.

This caught me out when I tried to login to Internet Banking at a certain bank. Like many other banks, they have some drop-down menus for you to select the requested digits from your security code, presumably to stop keyloggers. But unlike password entry fields, drop-down menus are much easier to shoulder surf, so they use Javascript to make the entry display an asterisk in the drop-down as soon as you’ve made your selection.

Of course, this caused Opera to fail to login, with a message along the lines of “You’ve got your account details or security details wrong, or you’re not registered for online banking“. So I tried again, and soon locked myself out.

Had they actually tested the site on a few browsers, this would have been easily discovered, and could have been fixed, or they could sniff the user agent and display a different page, or a message telling customers to use a different browser. That’s not ideal, I know, but it stops customers locking themselves out.

Of course, at the other end of the spectrum, Natwest sniff user agents, and reject virtually every browser, yet faking to be IE yields a perfectly working site anyway.

And then there’s HSBC. When their site eventually loads, has the first part of the login process on a non-SSL served page, which POSTs to an SSL page. Whilst this could be argued to be secure, it goes against what the banks have been telling Joe Consumer (”look for the padlock”), and its possible for a fake entry form to be sent through DNS poisoning or a man-in-the-middle attack, which POSTs elsewhere. People will not spot this as easily as a canned phishing email.

Maybe someone can enlighten me on why banks feel the need to reinvent the wheel. We have SSL. We have EV SSL certificates. SSL has been proven to work. Why do banks make sites that depend on Javascript, specific browsers, and bulky calculator-like devices that fit oh-so-easily in your wallet?

Of course, its their response to keyloggers and phishing emails. However, I don’t have a virus-ridden Windows box, nor do I believe the scams that drop into my inbox every day. I don’t see why I should have to waste time because someone couldn’t be bothered to sniff the user agent, display a warning or actually test some Javascript which was designed to safeguard users who’ll type their bank details into anything and open any attachment without a second thought. (Should people who pose such a security risk to their own account even be given internet banking?)

In fact, I don’t think the bank has any reason to need my email address at all, but it doesn’t stop MBNA sending official advertising emails from suspicious looking email addresses, with links to URLs that look equalling fishy. When you have real banks sending out these phishy emails, no wonder Joe Consumer falls for scam ones. (For the record MBNA didn’t reply when I emailed them asking why they engage in this practice.)

18 February 2008

Fixing SpamAssassin’s FORGED_HOTMAIL_RCVD false positives

Filed under: Blog — martin @ 12:17 am

Lately people have been telling me about emails that I never received. A quick analysis reveals that these ended up in my Trash folder - meaning that SpamAssassin gave them a high spam rating.

After delving into Perl and examining Hotmail’s mail headers, it seems that Hotmail recently changed the structure of their headers (probably with the merge with Windows Live Mail), and as such the characteristic header style that SpamAssassin expects from Hotmail’s SMTP servers isn’t found, and it thinks that its a spammer is pretending to be hotmail.

Luckily, SpamAssassin 3.2.x has a new FORGED_HOTMAIL_RCVD2 header with the new hotmail header structure defined. But this version isn’t available in the stable Debian Etch. Version 3.2.x is, however, in the Debian Lenny repository, and being all Perl, installs and runs fine on Etch with no extra dependancies. All of your settings from Etch’s SA will still work (or at least they did for me).

To upgrade, simply type the following from a root console (The old version of SA will be removed automatically):
wget http://ftp.uk.debian.org/debian/pool/main/s/spamassassin/spamassassin_3.2.3-1_all.deb
dpkg -i spamassassin_3.2.3-1_all.deb

If you haven’t discovered the joys of Debian, I’m sure you can find a SpamAssassin 3.2.x package for your distro if you hunt hard enough.

I found the new version to be slightly slower, but more accurate, than the old version.

2 December 2007

GNER’s AJAX Ticket Booking Website

Filed under: Blog — Tags: , , , , , — martin @ 3:14 am

I needed to buy some train tickets today, after getting the times from National Rail. Of course, National Rail don’t sell tickets, instead referring you to the train companies themselves. Well, I know what you’re thinking - that I could just buy tickets from my station. My station doesn’t have a ticket machine, nor is it staffed. So I try a few train companies’ sites. It seems they all subcontract our to The Train Line’s buggy system. The Train Line is a horrid site to use. It relies heavily on sessions, needs you to register before it shows you prices and generally irks me all of the time.

By chance I stumbled onto GNER’s site. They have recently moved to their own custom-designed ticket sales system, and I must say they’ve done a very good job indeed. Not only does it have a Web 2.0 “feel” (being clean and intuitive), it clearly explains the difference between the ticket times, and has AJAX light-boxes displaying each route after you click the more info buttons on them.

Furthermore, it shows a list of prices and a list of possible route-times. Clicking the price you want greys out the routes you are then not allowed to use, and clicking the route you want will grey out the ticket types that can’t be used with this route. Details of train changes are updated in realtime using AJAX as you highlight different routes. It also managed to find a great deal more routes than The Train Line did, in less time. And what’s more, you can of course buy tickets for any UK train from any UK train company. In future, I’ll be buying all of my advance tickets online from GNER, as their website is much more intuitive than the others. Good work GNER!

23 November 2007

Integrate NHS computer systems

Filed under: Blog — martin @ 5:07 pm

For all you foreigners, the NHS is Britain’s free state-funded health system.

A lot of people are opposed to the NHS’s ongoing computerization of patients’ records, because it is seen as a waste of taxpayer’s money. Whilst I agree that our government has a history of badly-implemented IT projects that have gone vastly overbudget, the NHS should have been centralized years ago. Surgeries all have their own systems, and most parts of the NHS rely at least partly on paper records. When you move house, you change your registered doctor, and your old surgery sends your records in a bundle to your new surgery.

At St. John’s College and, presumably, many other Oxford colleges, there is a policy whereby you must be registered with an Oxford doctor. This means you cannot be registered with a doctor in your home town. Last summer, when I wanted something as routine as a repeat prescription, my home surgery initially refused because I wasn’t “on their books”. After persevering, I had to fill a temporary resident form (or something to that effect.), which needed my NHS number, something I don’t carry around on me.

Of course now I’m old enough to have to pay for my prescriptions, the amount dispensed seems to have reduced. (You pay pertype of medication, no matter how much of that particular drug you are dispensed). Now I’m back in Oxford, I’ll have to make sure I top up my supplies before going home. But the doctors here have never prescribed me that medicine. Will they issue a repeat prescription when given an old repeat prescription from another surgery? I’ll probably have to book an appointment with one of the doctors, wasting a slot, just to get them to do some paperwork.

This is 2007. Virtually every other sizable organisation has integrated computer systems. Why should the NHS be any different? And why do I need to get a new repeat prescription printed for every instance of the repeat prescription. Surely that can make a form that says “Repeat prescriptions every 60 days until 01/01/2008″ that is stamped every time you make a claim off it, or something similar? The current system wastes everybody’s time and causes unnecessary inconvenience.

20 October 2007

Hyperlinking to Piracy Sites is against UK law?

Filed under: Blog, E-petitions — martin @ 5:15 pm

Slashdot and The Guardian recently reported about the arrest of the owner of tv-links.co.uk and the sites subsequent closing down. TV Links was a site which linked to videos on other sites (like Youtube and Veoh) where users could see TV series. The arrest was made by officers from Gloucestershire County Council trading standards in conjunction with investigators from Fact and Gloucestershire Police.

The biggest use of TV links that I know of was people watching sci-fi series that had been released in North America, but that the industry wouldn’t make available to UK viewers. So these series-followers had no legal route to get the series in the UK when it was released in America. Maybe the industry should look at why people are using TV links and provide a legal route for them to get the programmes, without making them wait weeks after it’s been aired in America. No-one wants to wait to see programmes that have been aired.

The big concern to me is the americanization of our country. It seems it is now illegal to link to a site which could be used for piracy. In effect this makes merely distributing information on how to copy copyright material illegal. Websites like BBC seem to have covered themselves by not linking to any of the sites in question when reporting news stories about piracy, but is there any difference in telling people they can get movies from The Pirate Bay, than telling them they can get movies from The Pirate Bay? An interesting question would be whether telling someone they can buy pirate DVDs at a certain place at Hemswell market also counts as “facilitation of copyright infringement”.

11 October 2007

Cycling from Rasen to Oxford

Filed under: Blog — martin @ 10:33 am

First, let me apologise for neglecting my trusty readers. But I’m back, back my magical journey.

On the Sunday at the start of freshers’ week I cycled from Middle Rasen to St John’s College, Oxford in 15 hours 59 minutes, including all stops. Unfortunately due to a dark start at 5.09am, I couldn’t set up my odometer to accurately measure the distance, but I’ll attach a map to show you. Note that I didn’t go as the crow flies (120 miles), but saught out backroads, so the distance is a bit more.

It was a nice cycle, because I wisely chose to carry virtually nothing and get my mum to bring it all in the car the following day. I wouldn’t say it was overly exerting, but I didn’t quite realise how hilly central England is, living in Lincolnshire and all. By two-thirds of the way there’s definitely only one possible speed.

Donov blogged this first. Here’s what he had to say:

Martin is INSANE
Mon, 01 Oct 2007
yesterday martin completed a 150 MILE cycle rids from his house in middle rasen to OXFORD, this journey took him 17 hours in total and has made me think that he is insane.


View Larger Map

17 September 2007

SSH hangs accessing CentOS4 in VMware

Filed under: Blog — martin @ 9:30 pm

CentOS 4, VMware and SSH are three things that I cannot get to work together. Let me tell you the whole story and hopefully you’ll be able to spot a blindingly obvious mistake that I can’t.

I have a VMware install on my Kubuntu Feisty laptop. (The free edition that bugs you to get a free serial when you install, so they get another email to spam). This copy of VMware runs Debian, Windows XP, and if you’re feeling extremely patient, Windows Vista without any problems that I can see.

So, I decided to make a CentOS image so I can learn how it differs Debian (not having used Redhat-based distros before). That way I can break a vmware image and not my VPS. So northie and I installed CentOS 4 inside VMware from an ISO. Networking in VMware was set to Bridged, so the guest distro gets an IP from the router’s DHCP server. Everything installed without any errors, and the CentOS vm could wget things off the internet. I typed /etc/init.d/sshd start

On the VMware host, I typed ssh root@192.168.1.11
I was shown and accepted the vm’s key, and then ssh hung. It didn’t cut me off, or say connection closed and show a prompt. It just sat there for 2 minutes and then timed out. As if there was some major packet loss.

I remembered specifically disabling the firewall and SELinux at install time, but i peeked around /etc/selinux and other places to confirm this. I then tried other vmware networking settings, such as NAT. Then I copied /etc/ssh/sshd_config from my laptop to the vm. I added another user onto the vm and SSH into that. Finally I downloaded a pre-made CentOS 4 VMware image and tried that. But every time it would just hang. Occasionally it would ask for a password, then hang and time out. But I couldn’t get a prompt through SSH. I can ping the vm fine though

I then decided to see if the VM could SSH itself:
ssh localhost worked, yet ssh 192.168.1.11 showed its certificate then hung. However, sshd was set to bind to all interfaces (and was listening, I checked) and ifconfig proved 192.168.1.11 was an IP of the vm

If anyone knows how to fix this, please tell me!

15 September 2007

Moving to CentOS

Filed under: Blog, Computer — martin @ 2:31 pm

I’ve finally decided that enough is enough with DirectAdmin. It’s haphazard way of downloading tar.gzs and compiling from source to random places that it only knows is a sure way to make a disaster in the future. Not only does this make applying updates a cumbersome process, as it doesn’t use any sort of repository or anything, it also means that when something does go wrong it can take ages to track down.

Amidst the ill-thought-out shell scripts, perl scripts and binary blobs, sometimes you can work out what its up to, sometimes not. And things being broken because of syntax errors (e.g. missing closing brackets) in a paid product is not something I really have time to sort out any more.

Now, for all of you screaming “Use SSH with webmin/virtualmin”, I would love to, but other server users would be less than pleased to lose their shiny control panel, so that leaves cPanel and Plesk. I’ve decided to go with Plesk, because it looks shinierâ„¢ and is rumoured to be more secure and manage things better behind the scenes, even if its interface isn’t as intuitive as cPanel’s.

Of course, control panel providers only truly support Redhat derivatives (the Debian etch build wouldn’t even install for me), so I’m moving my server to CentOS (even though I prefer Debian). At least it will work, which is the main thing.

11 August 2007

Random Drive

Filed under: Blog, Computer — martin @ 10:56 am

So it was just before 5pm yesterday and I was bored. After checking a few things on #friends, Donov and I set out on an adventure. Our drive took us through many places including Lincoln Rush Hour, the M1 and the entire width of the Peak District, including the Cat and Fiddle (A537 Buxton-Macclesfield - hilly and bendy with cliff edges and real fun to drive on).

By sheer coincidence when we stopped to consult the map who should walk down the street but Compsoc’s treasurer David North. He seemed to recognise me but was unsure, so I waved :). The look was priceless, but of course I forgot my camera. David helpfully informed me, “I live here”.

As it happens David was on a walk to burn off excess biscuits, which was lucky really as I forgot to write down his house number when I looked up his address in whois records.

After talking about bambi, DNS propagation, CSS and other stuff we made our way back along the speed-camera-dense roads, stopping for a pizza. Mmmm pizza. And thus the adventure was overl

Older Posts »