I connected to an FTP server that uses TLS Explicit encryption using the ftplib from Python, i can switch between paths, but i can't retrieve the files and directories from it.
from ftplib import FTP_TLS
ftps = FTP_TLS('HOST')
ftps.login('USER', 'PASS')
ftps.prot_p()
ftps.cwd('path/to/files/')
print(ftps.sendcmd('PWD')) #print current path
ftps.retrlines('LIST') #code stop here
When i debug, the code stop in this line on the retrlines function from ftplib.py:
with self.transfercmd(cmd) as conn, \
conn.makefile('r', encoding=self.encoding) as fp:
I have tried to use other functions, like ftp.nlst(), but the same issue happens.