How to get port in FTP protocol from passive mode?

后端 未结 2 842
再見小時候
再見小時候 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:42

    the port number is a 16-bit value between 0 and 65535 due to some constraints the authors have decided that all numbers between commas should be 8-bit (between 0 and 255). Thus, the 16-bit port number is represented with 2 8-bit numbers.

    In your case the port number will be 230 * 256 + 205 = 59085

提交回复
热议问题