Advertisement
Guest User

LEHA_SCRIPT

a guest
Sep 20th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. from subprocess import Popen, PIPE
  2. import sys
  3.  
  4. assert all(len(s) == 8 for s in sys.argv[1:])
  5.  
  6. with Popen("./C", stdin=PIPE) as proc:
  7.     inp = bytes([int(s, 2) for s in sys.argv[1:]])
  8.     proc.communicate(inp)
  9.     print("RETURN:", proc.returncode)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement