前言

 

 


PASV mode 的 port 計算

 

Command:    PASV
Response:    227 Entering Passive Mode (x,x,x,x,35,42)
Command:    NLST
Response:    150 Opening data channel for directory listing of "/"
Response:    226 Successfully transferred "/"
Status:    Directory listing successful

(first value x 256) + second value = 35 x 256 + 42 = 9002

 


TLS

implicit FTP: ftps = port 990

explicit FTP: port 21

log:

Command:    AUTH TLS
Response:    234 Using authentication type TLS

PBSZ(RFC2228)

Command:    PBSZ 0
Response:    200 PBSZ=0

The buffer-size to be used by the security mechanism when it is encrypting data on the data-channel.

However, since TLS is a transport-layer protocol and therefore doesn't require explicit encryption of data by the application layer, this buffer-size is redundant. 

A value of '0' is always passed as a parameter.

PROT

Command:    PROT P
Response:    200 Protection level set to P

defines whether or not the data channel is to be protected or not.

Clear (the default)    <-- PROT C
Private                     <-- PROT P