|
|
1
2
首先,如果您正在对检索到的FTP列表执行自动化任务,那么您可能应该考虑
NAME LIST (NLST)
...
This command is intended to return information that
can be used by a program to further process the
files automatically.
这个
Twisted documentation
给
It can cope with most common file listing formats.
这让我怀疑;我不喜欢“应付”的解决方案。
如果你的目标服务器支持它们,那么你应该更喜欢
7. Listings for Machine Processing (MLST and MLSD) The MLST and MLSD commands are intended to standardize the file and directory information returned by the server-FTP process. These commands differ from the LIST command in that the format of the replies is strictly defined although extensible.
但是,这些较新的命令可能在您的目标服务器上不可用,我在Twisted中也看不到它们。因此
至于你问题的症结所在,有三个可能的原因:
您可以通过查看通过电线发送的内容来消除(2)和(3),并证明原因是(1)。如果作为Twisted API或Pure-FTPD服务器日志记录配置的一部分,此选项对您不可用,则您可能需要中断诸如tcpdump、snoop或WireShark之类的网络嗅探器(假设允许您在环境中执行此操作)。请注意,您不仅需要跟踪控制连接(端口21),还需要跟踪数据连接(因为它携带了
祝你好运。 |
|
|
2
0
这在某种程度上是意料之中的。FTPFileListProtocol无法理解每个FTP输出,因为有些输出很古怪。如文档字符串中所述: 如果你需要一个古怪的FTP服务器的不同邪恶,你可以 覆盖C{fileLinePattern}或C{parseDirectoryLine()}。 在这种情况下,这可能是一个错误:也许你可以改进fileLinePattern,让它理解带空格的文件名。如果是这样,欢迎您在Twisted跟踪器中打开一个bug。 |
|
|
Hatshepsut · 多次回调后触发延迟列表 8 年前 |
|
Swatcat · 扭曲的WX反应堆未在wxPython中闭合 8 年前 |
|
|
user9099802 · 已知版本twisted python 8 年前 |
|
|
manuele · 使用扭曲矩阵的异步执行 8 年前 |
|
|
Daniel F · Twisted服务器:monkey补丁文件 8 年前 |
|
|
Brian · 如何为客户端设置子策略列表(Twisted) 8 年前 |
|
|
bits · Twisted upload多文件密钥错误 8 年前 |