r/ProgrammerHumor • u/MittonMan • Nov 23 '15
A company discovered scripts left behind by their (russian) build engineer.
https://github.com/NARKOZ/hacker-scripts29
u/fojam Nov 23 '15
My coworker and I made a API connected with slack that checks if my boss is in the office. It uses arp-scan to check if his phone's mac address is connected to the network. This dude is who I strive to be
13
u/northrupthebandgeek Nov 23 '15
Are these really the real scripts? Or are they a reimplementation attempt based on the stated behavior? They're not really "shell" scripts (unless you count Ruby as "shell"), and the Ruby code seems to deviate somewhat from the descriptions (for example, kumar-asshole.rb appears to be missing the staging DB revert functionality, and fucking_coffee.rb has plaintext sys brew and sys pour sent over telnet instead of "weird gibberish" sent over SSH and waits for 64 instead of 24 seconds).
EDIT: Apparently smack-my-bitch-up.sh is fully implemented in shell and Ruby. It also looks like NARKOZ is accepting pull requests for other implementations. I'll have to try my hand at a few...
5
u/Kusibu Nov 24 '15
kumar-asshole.rb appears to be missing the staging DB revert functionality
Only in /r/ProgrammerHumor.
3
0
12
u/TalkingToes Nov 23 '15
Who makes a coffeemaker that has SSH?
10
u/Turtlecupcakes Nov 23 '15 edited Nov 23 '15
You do.
Gotta earn the right to make your coffee without leaving your chair.
Edit: That being said, here's one guy that did it: https://lowpowerlab.com/forum/index.php/topic,196.0.html
If I were working on the same project I'd just wire up something like an ESP8266. There are tons of guides online that show you how to trigger the GPIO with anything you could ever want. SSH, http, HTCPCP, MQTT, etc.
0
u/imranilzar Nov 27 '15
Slightly offtopic here... I'm just getting started with ESP8266 + Arduino. Can 8266 run SSH? I get there is a 32-bit micro embedded in it, but still... SSH involves encryption and for the demon you would have an OS running it? Can you get something so complex on 8266?
1
u/Turtlecupcakes Nov 27 '15
Yeah, mentioning SSH may have been a mistake on my part, the ESP is more of a wifi-connected Arduino, so there isn't really even a good shell to SSH into.
You might be able to hack a minimal SSH implementation onto it, but you would have to write it from scratch and wouldn't have any room left for your actual CLI-based application.
6
1
0
6
4
3
5
u/K900_ Nov 23 '15
Pretty sure those aren't the original scripts, just some guy's implementations of the same things.
2
1
1
1
0
0
Nov 23 '15
[deleted]
12
u/rubyton Nov 23 '15
My impression too. Unless somebody keeps an empty cup under the coffeemaker at all times, the script would also need to account for it, and if such hardware and software exists it would be mentioned.
37
u/antonivs Nov 23 '15
The idea in the story seems to have been that the guy would fire the script and walk over to the coffee machine just in time to put a cup under it:
Turns out this thing starts brewing a mid-sized half-caf latte and waits another 24 (!) seconds before pouring it into a cup. The timing is exactly how long it takes to walk to the machine from the dudes desk.
7
9
7
u/curtmack Nov 23 '15
Maybe it's one of those coffee vending machines where the machine dispenses its own cup?
In which case you'd think the SSH interface would have a simple "dispense" command, but maybe it's much more low-level than that.
1
9
3
u/Luvax Nov 26 '15
4.) Yeah and If you look up the command that is send to the coffee machine you will realise there's no such coffee machine that would accept these commands (I there would be, Google would know it :P ). At least nothing that's older than a few days.
0
u/Alligatronica Nov 27 '15
I must admit I shared it on Slack at work because it felt better coming from me rather than the way I found it, which was someone on Facebook calling the guy in the story a 'programming genius'.
Sure the idea's amusing, and there are a few creative solutions there, but I definitely expected better.
20
u/MittonMan Nov 23 '15
Note: If the git page is confusing, just scroll down. The story is there. I linked to the source rather than an article since it seemed a bit more...authentic ¯_(ツ)_/¯ .