Grey Hack

Grey Hack

Does file transferring via ftp api work?
I tried ssh file transferring with next lines


hostShell = get_shell
remoteSshShell = hostShell.connect_service(hostIp, 22, hostLogin, hostPass, "ssh")
remoteSshShell.scp(fileSrcPath, "/home/", hostShell)


And all went good and smooth, but the same-ish thing with ftp just doesn't work


hostShell = get_shell
remoteFtpShell = hostShell.connect_service(hostIp, 21, hostLogin, hostPass, "ftp")
remoteFtpShell.put(fileSrcPath, "/home/", hostShell)


Although files can be transferred via command line FTP session without problems.
What I'm doing wrong?
< >
正在显示第 1 - 2 条,共 2 条留言
Ichinin 7 月 20 日 上午 1:07 
I haven't used FTP in Greyhack like ever, but try checking permissions.

Normally IRL FTP writes to a specific folder and it RARELY have access to the users home folder. Only Scp have that permission as SSH sessions are tied to the users login. FTP has no session management and has a specific folder it writes files into.
Simulacrum 7 月 21 日 上午 11:36 
In Grey Hack ftp console app can access any directory (that allowed to access with your user) and downloads files to the current user's home directory. So I expected same behavior from the script api. Speaking of the permissions... I've forwarded the 21 port from router to the ftp server. It was enough for the default ftp console programm.
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50