THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

FTP passive port calculation?

  • retag add tags

Does anybody know, how the passive port in FTP is calculated? Usually, the server-ip-address is shown in decimal and readable, separated by ",". example:

File Transfer Protocol (FTP)
227 Entering Passive Mode (192,168,145,95,238,20)\r\n
    Response code: Entering Passive Mode (227)
    Response arg: Entering Passive Mode (192,168,145,95,238,20)
    Passive IP address: 192.168.145.95
    Passive port: 60948

192,168,145,95 = ip-address 192.168.145.95 But passive port bytes 238,20 mean passive-port: 60948

kuchenmann's avatar
3
kuchenmann
asked 2019-10-11 10:48:49 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

found the answer here: https://www.melvinswebstuff.com/blog/...

first value * 256 + second value:

238*256+20 = 60928+20 = 60948

kuchenmann's avatar
3
kuchenmann
answered 2019-10-11 10:55:20 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer