Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

When I entered passive mode in FTP, I have got:

227 Entering Passive Mode (213,180,204,183,230,205).

First 4 numbers are the IP addresses, but what are the two last?

Are they two ports?

question from:https://stackoverflow.com/questions/9966993/how-to-get-port-in-ftp-protocol-from-passive-mode

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
226 views
Welcome To Ask or Share your Answers For Others

1 Answer

the last two are: p1 and p2 from RFC of ftp: http://www.faqs.org/rfcs/rfc959.html

to get port, use:

p1 * 256 + p2, then connect to this port


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...