亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

忘記ftp密碼的解決方法示例

 更新時(shí)間:2014年01月22日 11:41:37   投稿:zxhpj  
忘記ftp密碼了怎么辦?下面介紹一個(gè)使用python ftplib庫(kù)的方法,大家參考使用吧

python具體強(qiáng)大的庫(kù)文件,很多功能都有相應(yīng)的庫(kù)文件,所以很有必要進(jìn)行學(xué)習(xí)一下,其中有一個(gè)ftp相應(yīng)的庫(kù)文件ftplib,我們只需要其中的登錄功能,然后利用多線程調(diào)用相應(yīng)字典里面的字段進(jìn)行登錄,還能根據(jù)自己的需要,根據(jù)自身的情況編寫需要的程序,讓程序代替我們?nèi)プ鲆恍┛菰锏闹貜?fù)工作。

下面直接上代碼,下面是主文件

復(fù)制代碼 代碼如下:

import os
import time
import threading

class mythread(threading.Thread):
def __init__(self,command):
threading.Thread.__init__(self)
self.command=command
def run(self):
kk=os.system(self.command)
ushand=open(“user.txt”,”r”)
pshand=open(“passwd.txt”,”r”)
listuser=[]
listpass=[]
for us in open(“user.txt”,”r”):
lineus=ushand.readline().strip(‘\n’)
listuser.append(lineus)
for ps in open(“passwd.txt”,”r”):
lineps=pshand.readline().strip(‘\n’)
listpass.append(lineps)
for i in listuser:
for j in listpass:
command=”ftp.py %s %s” %(i,j)
print command
my_thread=mythread(command)
my_thread.start()
time.sleep(0.1)

相關(guān)文章

最新評(píng)論