mirror of
https://github.com/narkoz/hacker-scripts
synced 2025-08-23 19:07:33 +00:00
fucking coffee using coffeescript
This commit is contained in:
parent
61dbe67ae9
commit
95a25f20ea
28
coffee/fucking.coffee
Executable file
28
coffee/fucking.coffee
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env coffee
|
||||
|
||||
username = 'name'
|
||||
|
||||
host = 'localhost'
|
||||
port = '3000'
|
||||
pass = '5555'
|
||||
|
||||
sh = require('child_process').execSync
|
||||
|
||||
# weekend
|
||||
process.exit 0 if new Date().getDay() in [6, 0]
|
||||
|
||||
# no sessions
|
||||
process.exit 0 unless new RegExp(username).test sh('who -q').toString()
|
||||
|
||||
conn = require('net').createConnection(port, host)
|
||||
|
||||
setTimeout ->
|
||||
conn.write "#{pass}\nsys brew\n"
|
||||
setTimeout ->
|
||||
conn.end 'sys pour'
|
||||
process.exit(0)
|
||||
, 2 * 1000
|
||||
, 1 * 1000
|
||||
|
||||
# alert
|
||||
sh('say come here and take your fucking coffee')
|
Loading…
x
Reference in New Issue
Block a user