[英]227 Entering Passive Mode replay of FTPServer to ip address and port
i recived the replay message from FTPServer when i send the PASV command as following 当我发送PASV命令时,我从FTPServer接收到重播消息,如下所示
227 Entering Passive Mode (159,153,197,77,194,82) 227进入被动模式(159,153,197,77,194,82)
how would i get the ip address from this string replay message. 我如何从此字符串重播消息中获取IP地址。 and convert it to InternetAddress.... 并将其转换为InternetAddress。
thanks 谢谢
227 Entering Passive Mode (h1,h2,h3,h4,p1,p2)
is the syntax, h1-h4 are the 4 bytes of the ip address, p1 and p2 is a 2 byte port number, but i don't see how you'd convert that into an rsc822 internet address, which is in the local@domain
form. 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2)
是语法,h1-h4是IP地址的4个字节,p1和p2是2个字节的端口号,但是我不知道如何您将其转换为rsc822互联网地址,该地址为local@domain
形式。 Oh and btw you can use string.substring(27,string.length-2).split(",")
to get the params as seperate strings, then use Byte.parseByte(string)
for each of the values 哦,顺便说一句,您可以使用string.substring(27,string.length-2).split(",")
将参数作为单独的字符串获取,然后对每个值使用Byte.parseByte(string)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.