Who made this stack?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Who made this stack?
Hi,
I have attached the beginnings of a FTP Server that someone began to create.
I am trying to track this person down to ask a few questions as I would like to finish it off and move it over the iOS (using mergSockets)
Realise this is a long shot...
I have attached the beginnings of a FTP Server that someone began to create.
I am trying to track this person down to ask a few questions as I would like to finish it off and move it over the iOS (using mergSockets)
Realise this is a long shot...
- Attachments
-
- FTP_Server.zip
- (2.15 KiB) Downloaded 240 times
Re: Who made this stack?
I have been tinkering with this today trying to piece in the other peices to get ACTIVE Mode working (and the rest of what is required for PASSIVE Mode)
I have hit a stumble with trying to read all of the data of the ACTIVE MODE PORT REQUEST message that is sent from the FTP Client.
I am using the below to catch the PORT Request for ACTIVE Mode from the Client but when I process the pMsg I am only getting the line highlighted in the attached screen capture..
EDIT: Reading through the dictionary tells me without having a "until" in the socket read command that it will recieve the FIRST char only. so I tried using a "read from socket until "Active port" with message r0" in the handler below but it just doesnt seem to stop reading... can anyone suggest a more appropriate until statement.
I could provide the Packet Captures if that help anyone?
on r7 TheIP, pMsg --ACTIVE
put "Request 4 Port Active -" && pMsg after fld "log"
write "200" & crlf to socket theIP -- Acccept Connection
read from socket theIP with message r0
end r7
if pMsg contains "PORT" then
put pMsg into fld tFld
put false into xferpasv
r7 TheIP,pMsg
exit r0
end if
I need to be able to read the portion from the message "Active port: xxxxx" so I can use that in my subsequent message back to the Client.
I have hit a stumble with trying to read all of the data of the ACTIVE MODE PORT REQUEST message that is sent from the FTP Client.
I am using the below to catch the PORT Request for ACTIVE Mode from the Client but when I process the pMsg I am only getting the line highlighted in the attached screen capture..
EDIT: Reading through the dictionary tells me without having a "until" in the socket read command that it will recieve the FIRST char only. so I tried using a "read from socket until "Active port" with message r0" in the handler below but it just doesnt seem to stop reading... can anyone suggest a more appropriate until statement.
I could provide the Packet Captures if that help anyone?
on r7 TheIP, pMsg --ACTIVE
put "Request 4 Port Active -" && pMsg after fld "log"
write "200" & crlf to socket theIP -- Acccept Connection
read from socket theIP with message r0
end r7
if pMsg contains "PORT" then
put pMsg into fld tFld
put false into xferpasv
r7 TheIP,pMsg
exit r0
end if
I need to be able to read the portion from the message "Active port: xxxxx" so I can use that in my subsequent message back to the Client.
Re: Who made this stack?
Hi Nakia,
can't you:
...
read from socket theIP for 4 lines
## and then check if line 4 begins with "Active port:"
## But maybe this is not "standard" input?
...
Best
Klaus
can't you:
...
read from socket theIP for 4 lines
## and then check if line 4 begins with "Active port:"
## But maybe this is not "standard" input?
...
Best
Klaus
Re: Who made this stack?
Hi Klaus,
Thanks for your reponse.
I think you are correct but I am yet to give that a shot. I see this working in this regard but what I am unsure about following this is
what I should do to esnure I read all the BIN data once I get the stack to start accepting the transferring the data.
From my testing so far the Windows FTP Client doesn't tell the server the SIZE of the file before attempting to send it so I am struggling with how I would
successfully complete the read when the actual BIN data begins to transfer.
Anyway, Im gunna keep ticking away at it..
small steps!!!
Thanks for your reponse.
I think you are correct but I am yet to give that a shot. I see this working in this regard but what I am unsure about following this is
what I should do to esnure I read all the BIN data once I get the stack to start accepting the transferring the data.
From my testing so far the Windows FTP Client doesn't tell the server the SIZE of the file before attempting to send it so I am struggling with how I would
successfully complete the read when the actual BIN data begins to transfer.
Anyway, Im gunna keep ticking away at it..
small steps!!!
Re: Who made this stack?
Code: Select all
read from socket theIP until CRLF
Re: Who made this stack?
Hi,
I will send you an email.
Tried reading for x lines and read until CRLF but I still just cant get that data
(I have a theory however)
I will send you an email.
Tried reading for x lines and read until CRLF but I still just cant get that data
(I have a theory however)
Re: Who made this stack?
Email sent..
Will keep this thread updated as it progresses
Will keep this thread updated as it progresses