Created
October 18, 2017 14:11
-
-
Save andrewsosa/3fff13e2156a37f07be0549a76412331 to your computer and use it in GitHub Desktop.
[DigitalOcean Web Console Login] #tags: digitalocean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pynput.keyboard import Key, Controller | |
import time | |
keyboard = Controller() | |
# # Press and release space | |
# keyboard.press(Key.space) | |
# keyboard.release(Key.space) | |
# | |
# # Type a lower case A; this will work even if no key on the | |
# # physical keyboard is labelled 'A' | |
# keyboard.press('a') | |
# keyboard.release('a') | |
# | |
# # Type two upper case As | |
# keyboard.press('A') | |
# keyboard.release('A') | |
# with keyboard.pressed(Key.shift): | |
# keyboard.press('a') | |
# keyboard.release('a') | |
def enter(): | |
keyboard.press(Key.enter) | |
keyboard.release(Key.enter) | |
def type(text): | |
keyboard.type(text) | |
enter() | |
time.sleep(2) | |
def countdown(count): | |
for i in range(count): | |
print i | |
time.sleep(1) | |
# keyboard.type('username') | |
# # time.sleep(2) | |
# keyboard.type('password') | |
# time.sleep(2) | |
countdown(5) | |
# time.sleep(5) | |
type('username') | |
type('oldpassword') | |
type('oldpassword') | |
type('newpassword') | |
type('newpassword') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment