-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_gui.py
More file actions
72 lines (59 loc) · 1.68 KB
/
Copy pathrun_gui.py
File metadata and controls
72 lines (59 loc) · 1.68 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
RSA CTF工具集 GUI启动脚本
用于启动图形用户界面
"""
import sys
import os
def check_dependencies():
"""检查依赖是否安装"""
missing_deps = []
try:
import PyQt6
except ImportError:
missing_deps.append("PyQt6")
try:
import gmpy2
except ImportError:
missing_deps.append("gmpy2")
try:
import rsa
except ImportError:
missing_deps.append("rsa")
try:
from Crypto.Util.number import long_to_bytes
except ImportError:
missing_deps.append("pycryptodome")
if missing_deps:
print("❌ 缺少以下依赖包:")
for dep in missing_deps:
print(f" - {dep}")
print("\n请运行以下命令安装:")
print("pip install PyQt6 pycryptodome gmpy2 rsa requests")
return False
return True
def main():
"""主函数"""
print("🔐 RSA CTF工具集 - GUI版本启动中...")
print("=" * 50)
# 检查依赖
print("📦 检查依赖包...")
if not check_dependencies():
sys.exit(1)
print("✅ 依赖检查通过")
# 导入GUI模块
try:
from src.gui.rsa_gui import main as gui_main
print("🚀 启动GUI界面...")
gui_main()
except Exception as e:
print(f"❌ 启动GUI失败: {e}")
print("\n请确保所有文件都在正确位置:")
print("- src/gui/rsa_gui.py")
print("- src/core/rsa_ctf_tool.py")
print("- src/core/rsa_attacks.py")
print("- src/core/factor_tool.py")
sys.exit(1)
if __name__ == "__main__":
main()