Guest User

Untitled

a guest
Oct 31st, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/usr/bin/env python
  2. from ftplib import FTP
  3.  
  4. humaxip = '192.168.XX.YY'
  5. humaxuser = 'humaxftp'
  6. humaxpass = '0000'
  7. humaxpath = '/media/drive1/.tsr'
  8. filename = '0.ts'
  9.  
  10.  
  11. def main():
  12. ftp = FTP(humaxip)
  13. ftp.set_pasv(False)
  14. ftp.login(humaxuser, humaxpass)
  15.  
  16. ftp.cwd(humaxpath)
  17.  
  18. command = "RETR " + filename
  19. ftp.retrbinary(command, open('/dev/stdout', 'wb').write)
  20.  
  21. if __name__ == "__main__":
  22. main()
Add Comment
Please, Sign In to add comment