SHARE
TWEET

Untitled

a guest Aug 17th, 2018 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import ssh
  2.  
  3. def normalize(lst):
  4.     return map(lambda x: x.rstrip('\n')[2:], lst)
  5.    
  6. s = ssh.Connection(host = '192.168.1.101', username = 'root', password = '****')
  7.  
  8. lista = s.execute("cd /private/var/mobile/Media/DCIM/100APPLE/; find . -type f -mtime -4 -exec ls {} \;")
  9. lista = normalize(lista)
  10.  
  11. for cur_file in lista:
  12.     src = "/private/var/mobile/Media/DCIM/100APPLE/%s" % (cur_file)
  13.     dest = "/home/giovanni/public/%s" % (cur_file)
  14.     s.get(src, dest)
  15.  
  16. s.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top