Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- from ftplib import FTP
- humaxip = '192.168.XX.YY'
- humaxuser = 'humaxftp'
- humaxpass = '0000'
- humaxpath = '/media/drive1/.tsr'
- filename = '0.ts'
- def main():
- ftp = FTP(humaxip)
- ftp.set_pasv(False)
- ftp.login(humaxuser, humaxpass)
- ftp.cwd(humaxpath)
- command = "RETR " + filename
- ftp.retrbinary(command, open('/dev/stdout', 'wb').write)
- if __name__ == "__main__":
- main()
Add Comment
Please, Sign In to add comment