配置 vsftp ,用 python 测试 ftp 很方便
#!/usr/bin/env python #-*- coding:utf-8 -*- #author: jpuyy.com date #modified by xx at date from ftplib import FTP def ftp_list(file = "group_xitong"): ftp=FTP() ftp.set_debuglevel(2) #ftp.connect('106.186.23.161','21') ftp.connect('119.28.3.73','4413') ftp.login('ftpuser1','QAXjAHd7pAziK8') print ftp.getwelcome() ftp.cwd('/') ftp.retrlines('LIST') ftp.quit() ftp_list()
Leave a Reply