Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ssh
- def normalize(lst):
- return map(lambda x: x.rstrip('\n')[2:], lst)
- s = ssh.Connection(host = '192.168.1.101', username = 'root', password = '****')
- lista = s.execute("cd /private/var/mobile/Media/DCIM/100APPLE/; find . -type f -mtime -4 -exec ls {} \;")
- lista = normalize(lista)
- for cur_file in lista:
- src = "/private/var/mobile/Media/DCIM/100APPLE/%s" % (cur_file)
- dest = "/home/giovanni/public/%s" % (cur_file)
- s.get(src, dest)
- s.close()
Add Comment
Please, Sign In to add comment