FTPc: added retr command (just print to console for now).

git-svn-id: svn://kolibrios.org@3793 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-07-09 21:31:47 +00:00
parent 6dfcbb3d54
commit 1531cabb38
2 changed files with 42 additions and 0 deletions

View File

@ -205,6 +205,12 @@ wait_for_usercommand:
cmp dword[s], "cwd "
je cmd_cwd
cmp dword[s], "retr"
je cmd_retr
; cmp dword[s], "stor"
; je cmd_stor
invoke con_write_asciiz, str_unknown
jmp wait_for_usercommand

View File

@ -29,3 +29,39 @@ cmd_cwd:
mcall send, [socketnum], s, , 0
jmp wait_for_servercommand
cmd_retr:
call open_dataconnection
mov dword[s], "RETR"
mov byte[s+4], " "
mov ecx, 256
xor al, al
mov edi, s
repne scasb
lea esi, [edi - s - 1]
mcall send, [socketnum], s, , 0
jmp wait_for_servercommand
cmd_stor:
call open_dataconnection
mov dword[s], "STOR"
mov byte[s+4], " "
mov ecx, 256
xor al, al
mov edi, s
repne scasb
lea esi, [edi - s - 1]
mcall send, [socketnum], s, , 0
jmp wait_for_servercommand