WetSocks Revival
How to get a broken METAR/TAF Toolbar application working again; the fun way! Seeing what we can do to get WetSocks Windows 98 tray weather app working again.
How to get a broken METAR/TAF Toolbar application working again; the fun way!
It all started in the past. On my old PC in 1997 I used to run a little tray bar application (which were the coolest thing in my mind back then) called WetSocks by Locutus Codeware (later renamed to RoboMagic, and then subsequently disappeared from the internet). I loved this sort of thing. The ability to get live information from the internet and display it easily without having to go to a web page to view it was so novel and exciting.
Recently, I spun up a Windows 98 VM and played around with all my old apps, including WetSocks. Unfortunately, I then discovered that the service that WetSocks relied upon was no longer available. It sees that NOAA had discontinued that service long ago in favour of more reliable and easier to maintain and access services. Progress marches on I guess.
I decided I wanted to get it working again, purely for nostalgia's sake. I knew it relied on METAR and TAF information, which is still widely available, I just needed to get WetSocks to use an alternate source for that information. The battle begins.
Examining the DNS logs to see what it was the application is querying for:
Trolling the IIS Logs to work out what's going on:
So we know we're looking for the mgetmetar.pl and the mgettaf.pl files in the /cgi-bin/ folder. Okay Cool; and we're doing a query ?cccc=YBBN. Perfect.
Now; the challenge, the site is no longer around... What do we do? I know, time for the Wayback machine!
Now the Wayback machine has one curious little flaw that could make this problematic; it usually doesn't cache queried server files like this. You get this sort of thing.
Maybe we can try to see if someone linked to the getmetar.pl with a query string. Let's try a common airport, like KLAX.
Strangely enough, a lot of weather apps used this approach, even though NOAA offer a much simpler http and ftp accessible raw text version of the METAR and TAF, that still works today... Oh well :P
So, now to get my IIS instance to return the same thing. Voila.
Bingo! We have a winner. It's now able to fetch and decode the METAR and TAF information.
All that remains is to modify the pl files to run a bit of ASP code to go and fetch the current METAR and TAF data and replace it in to the HTML of the current PL file.
Now that that's done, I will have to whip this up into a web service on AWS or Azure so all anyone need do to continue to use legacy apps like WetSocks (and trust me, there appears to be a tonne of legacy weather apps that fetch data this way) is to add an A record into their DNS server or a hosts file to point weather.noaa.gov to the new location. I will update this post once I have that set up.
Currently, I am cheating a little by using a PowerShell script to generate the page dynamically. It's lazy, I know, but it will do until I get time to finish a web API.
Couldn't be happier :)
Sidenote: The SocketWatch app (which updates the Windows 98 clock time) still works perfectly. I guess NTP is just NTP. :)