MD5批量解密工具,CMD5批量解密,MD5解密源码,sha1批量解密工具免费下载

系列文章目录

` 提示:免费分享一款MD5批量解密的工具
附带python源代码
复制下面的代码,保存为md5.py
然后python md5.py就可以了


在这里插入图片描述


1.批量解密代码

代码如下(示例):

import tkinter as tk
from tkinter import ttk, filedialog, messagebox
import requests
import json

def decrypt_passwords(api_key, passwords):
    success_count = 0
    failure_count = 0
    results = []
    
    for idx, password in enumerate(passwords, start=1):
        url = f'https://www.xdapi.com/api/md5decrypt/password?key={api_key}&md5={password}'
        response = requests.get(url)
        
        try:
            data = response.json()
            
            if data['data']:
                decrypted = data['data']
                success_count += 1
            else:
                decrypted = "Failed"  # 如果decrypted为空则设置为“Failed”
                failure_count += 1
                
            results.append((idx, password, decrypted, data['exec_time'], data['code'], response.status_code))
            
        except (json.JSONDecodeError, KeyError) as e:
            results.append((idx, password, "Error Decoding/Missing Fields", "-", "-", response.status_code))
            failure_count += 1
    
    total_count = success_count + failure_count
    success_rate = (success_count / total_count) * 100 if total_count > 0 else 0
    
    label_summary.config(text=f"Total: {total_count}, Success: {success_count}, Failure: {failure_count}, Success Rate: {success_rate:.2f}%")
    
    return results


def apply_api_key():
    # 使用webbrowser模块打开申请API KEY的网址
    import webbrowser
    webbrowser.open_new("https://www.xdapi.com/doc/160")

def load_passwords_from_file():
    file_path = filedialog.askopenfilename(filetypes=[("Text files", "*.txt")])
    if file_path:
        with open(file_path, 'r', encoding='utf-8') as file:
            passwords = file.read().splitlines()
        return passwords
    return []

def decrypt_and_show_results():
    api_key = entry_api_key.get()
    if not api_key:
        messagebox.showerror("Error", "Please enter an API key.")
        return
      
    passwords = load_passwords_from_file()
    if not passwords:
        messagebox.showerror("Error", "No passwords loaded.")
        return
      
    results = decrypt_passwords(api_key, passwords)
      
    for item in tree.get_children():
        tree.delete(item)
      
    for idx, password, decrypted, exec_time, code, status_code in results:
        tree.insert('', 'end', values=(idx, password, decrypted, exec_time, code, status_code))
      
    with open('ok.txt', 'w', encoding='utf-8') as file:
        for result in results:
            file.write(f"ID: {result[0]}, Password: {result[1]}, Decrypted: {result[2]}, Exec Time: {result[3]}, Code: {result[4]}, Status Code: {result[5]}\n")

root = tk.Tk()
root.title("Password Decryption Tool")

# 创建Label用于显示统计信息并将其放在底部
label_summary = tk.Label(root, text="")
label_summary.pack(side="bottom")


# 创建Button用于申请API KEY
button_apply_key = tk.Button(root, text="Apply API Key", command=apply_api_key)
button_apply_key.pack(pady=5)

columns = ("ID", "Password", "Decrypted", "Exec Time", "Code", "Status Code")
tree = ttk.Treeview(root, columns=columns, show="headings")
for col in columns:
    tree.heading(col, text=col)
tree.pack(fill="both", expand=True)

label_api_key = tk.Label(root, text="API Key:")
label_api_key.pack(pady=5)
entry_api_key = tk.Entry(root)
entry_api_key.pack(pady=5)

button_decrypt = tk.Button(root, text="Decrypt Passwords", command=decrypt_and_show_results)
button_decrypt.pack(pady=5)

root.mainloop()


评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值