i'm writing an FTP server, but i don't understand the PASV command, any server sends a response like this:
227 Entering Passive Mode (213,229,112,130,216,4)
what does the numbers in brackets mean? And whats the difference between normal and passive mode?
Yes, you've got (213,229,112,130,216,4) as a result. 213,229,112,130 is IP address. 216 is upper 8bits in decimal. 4 is lower 8bits in decimal. So port number is 216 * 256 + 4. You should parse them in bracket.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With