忘記ftp密碼的解決方法示例
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ù)工作。
下面直接上代碼,下面是主文件
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)文章
Django零基礎(chǔ)入門之路由path和re_path詳解
這篇文章主要介紹了Django零基礎(chǔ)入門之路由path和re_path,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2021-09-09python 浮點(diǎn)數(shù)四舍五入需要注意的地方
這篇文章主要介紹了python 四舍五入需要注意的地方,幫助大家避免一些不必要的坑,感興趣的朋友可以了解下2020-08-08Django中實(shí)現(xiàn)一個(gè)高性能計(jì)數(shù)器(Counter)實(shí)例
這篇文章主要介紹了Django中實(shí)現(xiàn)一個(gè)高性能計(jì)數(shù)器(Counter)實(shí)例,分解成一步一步去講解,并配有例子,需要的朋友可以參考下2014-07-07tensorflow pb to tflite 精度下降詳解
這篇文章主要介紹了tensorflow pb to tflite 精度下降詳解,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2020-05-05Python腳本實(shí)時(shí)處理log文件的方法
Python腳本是用來對(duì)實(shí)時(shí)文件的內(nèi)容監(jiān)控。接下來通過本文給大家介紹Python腳本實(shí)時(shí)處理log文件的方法,需要的朋友參考下吧2016-11-11Python實(shí)現(xiàn)的根據(jù)IP地址計(jì)算子網(wǎng)掩碼位數(shù)功能示例
這篇文章主要介紹了Python實(shí)現(xiàn)的根據(jù)IP地址計(jì)算子網(wǎng)掩碼位數(shù)功能,涉及Python數(shù)值運(yùn)算相關(guān)操作技巧,需要的朋友可以參考下2018-05-05