Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (000050)12/26/2014 11:36:51 AM - (not logged in) (10.233.83.43)> Connected on port 21, sending welcome message...
- (000050)12/26/2014 11:36:51 AM - (not logged in) (10.233.83.43)> AUTH TLS
- (000050)12/26/2014 11:36:51 AM - (not logged in) (10.233.83.43)> 234 Using authentication type TLS
- (000050)12/26/2014 11:36:52 AM - (not logged in) (10.233.83.43)> SSL connection established
- (000050)12/26/2014 11:36:52 AM - (not logged in) (10.233.83.43)> USER XXXXXX
- (000050)12/26/2014 11:36:52 AM - (not logged in) (10.233.83.43)> 331 Password required for ardvarc
- (000050)12/26/2014 11:36:52 AM - (not logged in) (10.233.83.43)> PASS *******
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 230 Logged on
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> PROT P
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 200 Protection level set to P
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> SYST
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 215 UNIX emulated by FileZilla
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> CWD /SETTINGS/ftps/
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 250 CWD successful. "/SETTINGS/ftps" is current directory.
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> PWD
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 257 "/SETTINGS/ftps" is current directory.
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> PORT 10,233,83,43,158,211
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 200 Port command successful
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> LIST
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 150 Opening data channel for directory listing of "/SETTINGS/ftps"
- (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 426 Connection closed; aborted transfer of "/SETTINGS/ftps"
- FTPSClient ftp = new FTPSClient(false);
- //try to connect
- ftp.connect(serverAddress);
- //login to server
- if(!ftp.login(userId, password))
- {
- ftp.logout();
- return;
- }
- int reply = ftp.getReplyCode();
- //FTPReply stores a set of constants for FTP reply codes.
- if (!FTPReply.isPositiveCompletion(reply))
- {
- ftp.disconnect();
- return ;
- }
- //disabled the server certificate validataion for now to check if this is causing any problem....
- X509TrustManager trustmanager= TrustManagerUtils.getAcceptAllTrustManager();
- ftp.setTrustManager(trustmanager);
- ftp.execPROT("P");
- //enter passive mode
- ftp.enterLocalActiveMode();
- //get system name
- System.out.println("Remote system is " + ftp.getSystemType());
- //change current directory
- ftp.changeWorkingDirectory(remoteDirectory);
- System.out.println("Current directory is " + ftp.printWorkingDirectory());
- //get list of filenames
- FTPFile[] ftpFiles = ftp.listFiles();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement