mirror of
https://github.com/narkoz/hacker-scripts
synced 2025-08-23 10:57:13 +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:
parent
b0117c2d93
commit
cc6585c697
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user