2
0
mirror of https://github.com/narkoz/hacker-scripts synced 2025-08-23 19:07:33 +00:00

Slightly-more-accurate fucking_coffee.rb

Implemented a `delay` variable, and set it to 24 instead of 64 to better reflect the original story.
This commit is contained in:
Ryan S. Northrup 2015-11-23 09:57:25 -08:00
parent b0117c2d93
commit cc6585c697

View File

@ -11,10 +11,11 @@ require 'net/telnet'
coffee_machine_ip = '10.10.42.42'
password = '1234'
password_prompt = 'Password: '
delay = 24
con = Net::Telnet.new('Host' => coffee_machine_ip)
con.cmd('String' => password, 'Match' => /#{password_prompt}/)
con.cmd('sys brew')
sleep 64
sleep delay
con.cmd('sys pour')
con.close