Ask Your Question
0

FTP passive port calculation?

asked 2019-10-11 10:48:49 +0000

kuchenmann gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-10-11 10:55:20 +0000

kuchenmann gravatar image

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

first value * 256 + second value:

238*256+20 = 60928+20 = 60948

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-10-11 10:48:49 +0000

Seen: 28 times

Last updated: Oct 11