Live data from Hacker News

Ask HN: What's your proudest hack?

news.ycombinator.com

231–240 of 414 posts

Re: Ask HN: What's your proudest hack?

#231
post #146

I applied for a job at a medical cannabis operation in Canada right before legalization hit. I was curious to see if they had checked out my personal website, so I grabbed my webserver logs and I recognized one IP from the city the job was based in. More than likely, the public IP of the business in question. On a whim, I ran the IP through Shodan.io and it showed that 47808 was open - The BACNet protocol. I had no i…

Reminds me of the time I found a “warm introduction” referral, an open invitation to potential network management positions at a company, buried in their BGP/ASN infrastructure information. (It’s been about a decade so I don’t remember exactly what specifics the info was in, but you wouldn’t have found this specific email and opening line without mucking round with their BGP and ASN info.)

I emailed but they weren’t hiring and I was mainly curious if the job would be better than what I had at the time.

Re: Ask HN: What's your proudest hack?

#232
I have a couple:

1. I was working as an intern at a router company (basically doing manual QA of software releases). One day one of the software developers comes by and wants to see how hard it would be to add a feature (IP address autonegotiation for point-to-point links). The code already existed in a library, but there was not official way to enable it. The developer did mention that it could happen automatically if the up address was unspecified. I was able to get it active by creating a virtual interface with a manually set IP address, setting the point-to-point link to use the same IP address as the virtual interface, then deleting the virtual interface.

2. I was working on a Government funded research project and some other company was responsible for developing the board support package. The board we were working on had 1 ARM core and a 7-core DSP in a NUMA configuration. I had a processing pipeline that split the processing between cores so that each core handled a different part of the chain. The full code did not fit in DSP memory, so we had separate images for each core. I was seeing crashes every time one of the DSP cores finished handling a message. Eventually I was able to determine that the messages passed between cores by the platform were actually C++ classes with a virtual destructor. My work-around was to overwrite the first 4 bytes of any message the DSPs received with 4 bytes from an empty reference message created locally. That overwrote the vtable and prevented the crash.

Re: Ask HN: What's your proudest hack?

#234
I was working at Compaq in 1998 or so, and they had this thing called "SmartStart", which was a CD-ROM with drivers for Windows, SCO OpenServer, SCO Unixware, Netware, etc. Especially important were the storage drivers, because they had to be injected into the OS install to allow the OS to be installed on Compaq's newest RAID controllers, which the OS didn't have drivers for. There was a build process for all the SCO OpenServer and SCO Unixware drivers that was done once a week, through a checklist of manual steps. This was a process that took a few hours. Among the steps for this process was creating floppy disc images, and Openserver didn't have a loopback device, so we just left a floppy in the drive to write out images to physical media and read them back in via dd. Some step in the process seemed to want an actual floppy device. This was problematic because the floppy discs would fail from time to time and they were terribly slow.

I was kind of wanting to move from the SmartStart team to the storage driver team, but I didn't really know too much about drivers, so I started digging into how to write drivers for SCO OpenServer, and made a little driver where you could write 256 bytes into it, it would store this in memory, and then you could read them back out. Suddenly, an idea occurred to me... what if instead of 256 bytes, I made the buffer 1.44M bytes, the size of a floppy? I'd have a RAM disk that I could use in the build process instead of physical floppies. (The native RAM disk wouldn't work for reasons I now forget). So I tried it. It failed, on some ioctl call. I coded up some dummy code for this ioctl in my driver, and... it worked. And it was way faster than the actual floppy drive (obviously). So I ended up completely automating the build process, eliminating the error prone and slow floppy drive, and having now written a driver, I ended up getting off the SmartStart team and onto the storage driver team, which was way better.

Re: Ask HN: What's your proudest hack?

#235
In the mid 90s I was trying to figure out how I could play quake on my local lan as well as with friends on the (young at the time) internet.

The only thing out there that would support it was this software called WinGate that did a thing called socks proxy.

The problem was that WinGate cost over two hundred dollars, which I couldn't afford and I refused to pirate it.

I was reading a book about the internals of the IP protocol and I had an idea...

What if I took the traffic that was addressed to an external IP address and assigned it to a high port number, specific to each computer. When I got network packets back on that high number port, I could rewrite the IP packet to deliver it to the originating computer.

I coded up a minimal little working example in C.

What I didn't realize at the time was that I'd basically (re) invented NAT.

I never ended up developing into a robust solution because it was around then that the Linux kernel added "ip masquerading" with a custom kernel compilation flag, which did the same thing but better.

Still, was a cool hack.

Re: Ask HN: What's your proudest hack?

#237
post #117

I was located in Sydney Australia, trying to fix a literally showstopper bug in the signal processing of the bank of Land Mobile Radio base stations that were being used to coordinate the stage management for the Opening Ceremony of the London Olympics. Less than 24 hours to go before the final dress rehearsal, and the production company was preparing to spend megabucks to pull all the radios out and replace them wit…

Thanks for reminding that classic engineering is still alive.

What bugs me the most is that when you talk about engineering or even search for anything engineering-related all that ever shows up is software engineering. It's become much harder to find information about more classical engineering subjects.

Re: Ask HN: What's your proudest hack?

#239
i just told this story earlier today on HN! It's something I did just in the past few days, but it is quite satisfying.

My site has recently been the target of some extremely aggressive "card testers" (criminals who have huge lists of stolen credit cards; they use bots to stuff small donations into donation forms to test which cards are still working). At first I just blocked the offending IPs, but they kept finding new IPs, creating a lot of annoying work for me. So I pivoted--instead of blocking their IPs, I started feeding them randomly generated false responses with a statistically accurate "success" rate. They are trying to build a list of working cards, and getting absolute garbage results.

It is still ongoing, but so far they have run ~50k card tests in over a week, and 99.9% of the data they have collected from us looks legit, but it is totally bogus. It pleases me to know that I am polluting their data, and ultimately wasting a lot of their time and effort. Consume excrement, evil-doers!

Re: Ask HN: What's your proudest hack?

#240
A few jobs ago I was working on printer firmware. There was some bug where after so many pages were printed the colors would start to band. Anyways, the fix ended up changing a == to a <=. I looked up an ascii table and it was literally a 1-bit change. I like to brag about that one on occasion but it also put things into perspective how the difference between something working or not can literally come down to a single bit.
Post reply on HN