Skip to content

Instantly share code, notes, and snippets.

@rafaelgallani
Last active January 9, 2022 01:38
Show Gist options
  • Select an option

  • Save rafaelgallani/1d8f1a51bbc36912929f6dadbdb70e89 to your computer and use it in GitHub Desktop.

Select an option

Save rafaelgallani/1d8f1a51bbc36912929f6dadbdb70e89 to your computer and use it in GitHub Desktop.
Import Metamask private key
import os
import pyautogui
import time
def click(x, y):
pyautogui.moveTo(x,y)
pyautogui.click()
time.sleep(1)
time.sleep(3)
pyautogui.hotkey('alt', 'shift', 'm')
time.sleep(10)
click(1839, 127)
click(1617, 349)
pyautogui.hotkey('ctrl', 'a')
pyautogui.write(os.getenv('PRIVATE_KEY'), interval=0.1)
pyautogui.press('tab')
pyautogui.press('tab')
pyautogui.press('enter')
time.sleep(5)
pyautogui.hotkey('alt', 'f4')
pyautogui.press('enter')
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment