Advertisement
opexxx

mountsdcard.py

Jun 16th, 2014
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import time
  4. import pexpect
  5.  
  6.  
  7. command = "sshfs root@localhost:/sdcard/ /media/sdcard/"
  8.  
  9. try:
  10.     sshfs = pexpect.spawn(command)
  11.     sshfs.expect("root@localhost's password: ")
  12.     time.sleep (0.1)
  13.     sshfs.sendline ("yourpassword")
  14.     time.sleep (0.1)
  15.     sshfs.expect (pexpect.EOF)
  16. except Exception, e:
  17.     print str(e)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement