Reminds me of this brilliant The Daily WTF submission. [0] [0] https://thedailywtf.com/articles/ITAPPMONROBOT
Ask HN: Weirdest hack that you ever saw in production?
211–220 of 289 posts
Re: Ask HN: Weirdest hack that you ever saw in production?
#212Big C codebase. To be more precise, they said it's C++, but as far as I could see, it was C compiled with g++. Some code read xml data. Instead of choosing one of the xml-parsers available, author decided to write another one. Instead of using C++ features, atoi() used. For empty strings, atoi() got NULL and segfaulted. Signal 11 has been handled and suppressed in order to avoid crashes. Certainly, the code had other…
Re: Ask HN: Weirdest hack that you ever saw in production?
#213Earlier quoted context omitted.
I've got one of those from "Only on WIndows" series. One of my colleagues uses WIndows and tends to remote in from home. Unfortunately when a cleaner cleans the office after hours she sometimes accidentally hits the CAPS key and he can't log in anymore remotely. His solution was to rip out the CAPS key and cover the hole with duct tape.
I do this, too. The first thing I do when I get a new keyboard is to remove the caps lock key. I never used it in my 20 years of PC usages and I don't get why it's still there. Back in my CounterStrike gaming days I would also remove the Windows key because it would crash the game when accidentally pressed.
Re: Ask HN: Weirdest hack that you ever saw in production?
#214A long time ago (early 1990's, IIRC), I came across a Novell Netware LAN in which none of the Mac OS clients could print to a then-very-costly laser printer shared on the network if a particular a Windows 3.0 client elsewhere the LAN was powered off. It turns out that when the costly printer was purchased, there wasn't a Mac OS driver available for it, so the people who installed the LAN created their own homemade pr…
Re: Ask HN: Weirdest hack that you ever saw in production?
#215Earlier quoted context omitted.
Sounds like a point-to-point directional wifi radio. They're far from a hack and have been used to great success upwards of 2miles away from each other with 1Gbps throughput, even for small ISPs.
Yeah I can’t remember what it was. Someone said laser link above, I feel like it was microwave - I do remember being concerned we’d cook birds.
Re: Ask HN: Weirdest hack that you ever saw in production?
#216Earlier quoted context omitted.
I use a posh script like this when i dont want the computer to lock. $ws = New-Object -COM wscript.shell; while($true){ $ws.SendKeys("j"); Sleep 60;} Ive used it for demos that way the computer doesnt lock before the demo starts, its pretty short and easy to remember. Also on windows if you spam SendKeys("{Left}") everything you type is backwards and when you hit the windows key it freezes the computer in an interest…
bash/X11 equivalent: function mouse_around { while true; do sleep "$1" xdotool mousemove_relative 1 1 xdotool mousemove_relative -- -1 -1 done } mouse_around 60
Re: Ask HN: Weirdest hack that you ever saw in production?
#217This was probably not considered a hack when it was implemented but at some point in the early 2000s someone deployed two binary programs on an old Compaq rack server running RedHat Linux of some version. I think they're called lpr and lpd. But I've tried to find their source and it's not in any major printer packages. By running strings and hexdump on them I think my co-worker finally managed to trace it to a packag…
Re: Ask HN: Weirdest hack that you ever saw in production?
#218In the midnineties I was hired to improve the performance (and eventually rewrite) a custom in-house search engine. I dipped into the software and there were some quick wins, but I couldn’t get the damn thing to reply quicker than 100 ms. In desperation I just grepped for the number 100 and sure enough I found a 100 ms sleep in the routines handling the connections. Turned out the author had made a mess of his socket…
I didn't have the guts to remove it.
Re: Ask HN: Weirdest hack that you ever saw in production?
#219I installed 65 cash registers all over Ireland. Each one had only an RS232 serial port. I had to read and aggregate their daily reads between 5am and 10am (only time these outlets were not running). It was not possible to read this particular cash register when it was in operation mode OR if it was in OFF mode. Also we did not have access to GSM sims and there was no WIFI at stores. SO: We installed 56K modems and pl…
Re: Ask HN: Weirdest hack that you ever saw in production?
#220I was hired because the regular firewall/security sysadmins resisted installing tooling the director wanted that would allow them to be effectively 'monitored' doing their work on the firewalls distributed worldwide. In particular the director wanted to use Tripwire to alert when files were changed on the firewalls. He had tried to push this through 3 times before and each time it was rebuffed/scrapped one way or another.
As I went through the testing phase I took careful note of the security issues I found. When all was done I had 2 big holes I could not easily close. The first one was that from the management server (a simple Java app) you could click file/open and using the explorer window you could 'run' explorer.exe thus opening the Windows shell/GUI (as well as run command.com, notepad.exe). I closed all these with file permissions and other settings.
The final one was much harder though. You could, using the same file/open explorer window, open the log files of the GUI (with a notepad like functionality), and alter and save the logs again without notification (non-repudiation violation). The user account had to be able to write to that log for the entries to be created.
My solution was to create a long-running script in the background that would cat and empty all of the log entries every 2 seconds to another file location further limited by tight permissions only to the script account.
I deployed this in production for over a year and to my surprise it never stopped running (or more likely I thought, overflow and/or lock up the system).
My worst kludge...