2013-06-24 21:33:16 +02:00
|
|
|
cmd_list:
|
|
|
|
|
|
|
|
call open_dataconnection
|
|
|
|
|
|
|
|
mov dword[s], "LIST"
|
2013-07-09 22:19:08 +02:00
|
|
|
mov byte[s+4], 0x0a
|
|
|
|
mcall send, [socketnum], s, 5
|
2013-06-24 21:33:16 +02:00
|
|
|
|
2013-07-09 22:19:08 +02:00
|
|
|
jmp wait_for_servercommand
|
2013-06-24 21:33:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
cmd_help:
|
|
|
|
|
|
|
|
push str_help
|
|
|
|
call [con_write_asciiz]
|
|
|
|
|
2013-07-09 22:55:18 +02:00
|
|
|
jmp wait_for_usercommand
|
|
|
|
|
|
|
|
cmd_cwd:
|
|
|
|
|
|
|
|
mov dword[s], "CWD "
|
|
|
|
|
|
|
|
mov ecx, 256
|
|
|
|
xor al, al
|
|
|
|
mov edi, s
|
|
|
|
repne scasb
|
|
|
|
lea esi, [edi - s - 1]
|
|
|
|
|
|
|
|
mcall send, [socketnum], s, , 0
|
|
|
|
|
2013-07-09 23:31:47 +02:00
|
|
|
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
|
|
|
|
|
2013-07-09 22:55:18 +02:00
|
|
|
jmp wait_for_servercommand
|