Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from ftplib import FTP
- from os import remove
- host = ""
- port = 25
- username = ""
- password = ""
- name_file = "command.txt"
- ftp = FTP(host)
- ftp.login(username, password)
- with open(name_file, w) as f:
- f.write("start")
- ftp.delete(name_file)
- file = open(name_file,'rb')
- ftp.storbinary('STOR command.txt', file)
- file.close()
- remove(name_file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement