Skip to content

Instantly share code, notes, and snippets.

@zedsec390
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zedsec390/5c1503a271a8e4e96088 to your computer and use it in GitHub Desktop.
Save zedsec390/5c1503a271a8e4e96088 to your computer and use it in GitHub Desktop.
Patch for 2.7.6 Python (rocket ported tools) pty.py - allows for spawning shell via python
--- pty.py.old 2015-08-21 12:29:10.000000000 -0500
+++ pty.py 2015-08-21 12:29:10.000000000 -0500
@@ -61,6 +61,7 @@
return master_fd, tty_name
for x in 'pqrstuvwxyzPQRST':
for y in '0123456789abcdef':
+ y='000' + y
pty_name = '/dev/pty' + x + y
try:
fd = os.open(pty_name, os.O_RDWR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment