Skip to content

Instantly share code, notes, and snippets.

@beefy
Created June 3, 2016 16:33
Show Gist options
  • Save beefy/e3ddec2ca46cb43fc650ce5e48cfa065 to your computer and use it in GitHub Desktop.
Save beefy/e3ddec2ca46cb43fc650ce5e48cfa065 to your computer and use it in GitHub Desktop.
Generate keyboard input, useful if "paste" is unusable
import win32com.client
import time
shell = win32com.client.Dispatch("WScript.Shell")
type_str = 'KexAlgorithms diffie-hellman-group1-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1'
time.sleep(3)
shell.SendKeys(type_str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment