Fix crash of ftpget command (#562)

This commit is contained in:
fe7ch 2017-07-29 21:07:37 +03:00 committed by Michel Oosterhof
parent 6a84e49779
commit 45c306f197
1 changed files with 6 additions and 5 deletions

View File

@ -27,11 +27,11 @@ Usage: ftpget [OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE
Download a file via FTP
-c Continue previous transfer
-v Verbose
-u USER Username
-p PASS Password
-P NUM Port\n\n""")
-c Continue previous transfer
-v Verbose
-u USER Username
-p PASS Password
-P NUM Port\n\n""")
def start(self):
try:
@ -132,6 +132,7 @@ Download a file via FTP
self.safeoutfile = None
# Update the honeyfs to point to downloaded file
self.fs.mkfile(fakeoutfile, 0, 0, os.path.getsize(hash_path), 33188)
self.fs.update_realfile(self.fs.getfile(fakeoutfile), hash_path)
self.fs.chown(fakeoutfile, self.protocol.user.uid, self.protocol.user.gid)