How to get port in FTP protocol from passive mode?

后端 未结 2 845
再見小時候
再見小時候 2021-01-30 21:12

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 w

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-30 21:41

    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

提交回复
热议问题