Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess
- a = subprocess.Popen( ['echo','<YOURPASSWORDGOESHERE>'], stdout=subprocess.PIPE )
- b = subprocess.Popen( [ 'sudo', '-S', 'date' ], stdin = a.stdout )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement