Celebrating Workarounds, Kludges, and Hacks
itwbennett writes: We all have some favorite workarounds that right a perceived wrong (like getting around the Wall Street Journal paywall) or make something work the way we think it ought to. From turning off annoying features in your Prius to getting around sanctions in Crimea and convincing your Android phone you're somewhere you're not, workarounds are a point of pride, showing off our ingenuity and resourcefulness. And sometimes artful workarounds can even keep businesses operating in times of crisis. Take, for example, the Sony employees, who, in the wake of the Great Hack of 2014 when the company's servers went down, dug out old company BlackBerrys that, while they had been abandoned, had never had their plans deactivated. Because BlackBerrys used RIM's email servers instead of Sony's, they could still communicate with one another, and employees with BlackBerrys became the company's lifeline as it slowly put itself back together.
What hacks and workarounds keep your life sane?
At an old job, we were given sudoer privileges, but there was a blacklist of dangerous commands that we couldn't sudo (such as bash, su, etc), so I wrote a one line script to get around that called hijack:
$@
Then I could type
$sudo hijack
and sudo any command I wanted.
http://yetanotherpoliticalrant.blogspot.com
I wanted to play an old abandonware game, but the only copy I could find had been cracked to bypass the "copy protection" questions, and the crack had some unfortunate side effects. An old text file showed which two bytes to change in DEBUG to crack it, so I knew which two bytes had been changed in which file, but I didn't know what the original values were. Fortunately, SCUMMVM's source code shows the hash of the file it's looking for. So I wrote a shell script to create 2^16 copies of the copy with all possible values for those 2 bytes, and looked for the one with the right hash.
Back when a 10 MB full-height 5-1/4" hard drive was still somewhat of a big deal, I acquired one that had boot sector damage. It could be low-level formatted just fine, but the first few cylinders were damaged so it couldn't be a bootable drive in a PC-XT clone.
It used an optical limit sensor to detect when the stepper motor moving the head in and out was at the outer end of travel. I epoxied a little bit of metal onto the end of the encoder to slightly extend the head inward. After a fresh low-level format, the new 'track zero' was defect free and the drive was bootable and could be deployed as the C: drive. I think I then put it to use as the C: drive in the PC-XT that I ran my BBS on (WWIV 3.2.1, 1200 baud, online 24/7)
I don't use foursquare, but a friend was bragging about being mayor at a couple places. I commented that I could be mayor in a month or two. He ended up betting me I couldn't. I warned him that it was super easy and he would be stupid for making that bet, but he still did it. That night, shortly after a few drunken minutes trying to type my password, the first cron job started running...
#!/usr/bin/perl
# call it from cron with:
# perl foursquare_checkin <location_id> <latitude> <longitude> <your_login_email> <password>
# Ex: perl foursquare_checkin 2021944 40.676141 -73.983452 foo@bar.baz 12345
my ($user,$pass) = @ARGV[3,4];
my $auth = MIME::Base64::encode("$user:$pass",'');
use MIME::Base64;
use IO::Socket;
sleep(rand()*600); # so checkins are slightly random
my $sock = IO::Socket::INET->new(PeerAddr=>'api.foursquare.com', PeerPort=>80,
Proto =>'tcp', Type=>SOCK_STREAM) or die;
$ARGV[1] += rand() * 0.0001 - 0.00005; # wobble location
$ARGV[2] += rand() * 0.0001 - 0.00005;
my $str = "vid=$ARGV[0]&private=0&geolat=$ARGV[1]&geolong=$ARGV[2]";
print $sock "POST
my $res = <$sock>;
And yes, I know that's ugly, and there's easier and cleaner ways, but it got the job done well enough to get me mayor of a few places and really pissed off the gambler before I turned it off for good. I have no idea if this still works (ie. lack of any form of message authenticity or handshake etc), but it wouldn't surprise me if it did... feel free becoming mayor of anywhere you want (you can even checkin to places across the country and back on a regular basis and they didn't catch it). But if it no longer works, don't ask me.