Advertisement
Guest User

Untitled

a guest
Dec 26th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. (000050)12/26/2014 11:36:51 AM - (not logged in) (10.233.83.43)> Connected on port 21, sending welcome message...
  2. (000050)12/26/2014 11:36:51 AM - (not logged in) (10.233.83.43)> AUTH TLS
  3. (000050)12/26/2014 11:36:51 AM - (not logged in) (10.233.83.43)> 234 Using authentication type TLS
  4. (000050)12/26/2014 11:36:52 AM - (not logged in) (10.233.83.43)> SSL connection established
  5. (000050)12/26/2014 11:36:52 AM - (not logged in) (10.233.83.43)> USER XXXXXX
  6. (000050)12/26/2014 11:36:52 AM - (not logged in) (10.233.83.43)> 331 Password required for ardvarc
  7. (000050)12/26/2014 11:36:52 AM - (not logged in) (10.233.83.43)> PASS *******
  8. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 230 Logged on
  9. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> PROT P
  10. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 200 Protection level set to P
  11. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> SYST
  12. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 215 UNIX emulated by FileZilla
  13. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> CWD /SETTINGS/ftps/
  14. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 250 CWD successful. "/SETTINGS/ftps" is current directory.
  15. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> PWD
  16. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 257 "/SETTINGS/ftps" is current directory.
  17. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> PORT 10,233,83,43,158,211
  18. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 200 Port command successful
  19. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> LIST
  20. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 150 Opening data channel for directory listing of "/SETTINGS/ftps"
  21. (000050)12/26/2014 11:36:52 AM - ardvarc (10.233.83.43)> 426 Connection closed; aborted transfer of "/SETTINGS/ftps"
  22.  
  23. FTPSClient ftp = new FTPSClient(false);
  24. //try to connect
  25. ftp.connect(serverAddress);
  26. //login to server
  27. if(!ftp.login(userId, password))
  28. {
  29. ftp.logout();
  30. return;
  31. }
  32. int reply = ftp.getReplyCode();
  33. //FTPReply stores a set of constants for FTP reply codes.
  34. if (!FTPReply.isPositiveCompletion(reply))
  35. {
  36. ftp.disconnect();
  37. return ;
  38. }
  39.  
  40.  
  41. //disabled the server certificate validataion for now to check if this is causing any problem....
  42. X509TrustManager trustmanager= TrustManagerUtils.getAcceptAllTrustManager();
  43. ftp.setTrustManager(trustmanager);
  44.  
  45. ftp.execPROT("P");
  46. //enter passive mode
  47. ftp.enterLocalActiveMode();
  48. //get system name
  49. System.out.println("Remote system is " + ftp.getSystemType());
  50. //change current directory
  51. ftp.changeWorkingDirectory(remoteDirectory);
  52. System.out.println("Current directory is " + ftp.printWorkingDirectory());
  53.  
  54. //get list of filenames
  55. FTPFile[] ftpFiles = ftp.listFiles();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement