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?
< >
Showing 1-2 of 2 comments
Ichinin 20 Jul @ 1:07am 
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 21 Jul @ 11:36am 
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.
< >
Showing 1-2 of 2 comments
Per page: 1530 50