FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
hacker-scripts/python/fucking_coffee.py at master · jwzdata/hacker-scripts · GitHub
jwzdata
/
hacker-scripts
Public
forked from
NARKOZ/hacker-scripts
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
hacker-scripts
/
python
/
fucking_coffee.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
27 lines (21 loc) · 523 Bytes
Breadcrumbs
hacker-scripts
/
python
/
fucking_coffee.py
Copy path
File metadata and controls
executable file
·
27 lines (21 loc) · 523 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
import
sys
import
subprocess
import
telnetlib
import
time
# exit if no sessions with my username are found
output
=
subprocess
.
check_output
(
'who'
)
if
'my_username'
not
in
output
:
sys
.
exit
()
coffee_machine_ip
=
'10.10.42.42'
password
=
'1234'
password_prompt
=
'Password: '
con
=
telnetlib
.
Telnet
(
coffee_machine_ip
)
con
.
read_until
(
password_prompt
)
con
.
write
(
password
+
"
\n
"
)
# Make some coffee!
con
.
write
(
"sys brew
\n
"
)
time
.
sleep
(
64
)
# love the smell!
con
.
write
(
"sys pour
\n
"
)
con
.
close
()
Back
|
FazBrowse Home
|
New Git URL