From f9a3328d1fc641cca680ffd002806d82cf59e0ab Mon Sep 17 00:00:00 2001 From: Felix <> Date: Tue, 18 Mar 2025 18:07:13 +0800 Subject: [PATCH] Push v1.0.1 exe --- .gitignore | 12 ++++++++++-- gui.py | 36 ++++++++++++++++++++++++++++++++++++ requirements.txt | Bin 450 -> 984 bytes 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3f43bdc..3617bca 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ /.idea/ /__pycache__/ /.idea/ +/upx-5.0.0-win64/ +/VulnDataAnalyzer_*/ # 忽略日志文件 *.log @@ -13,10 +15,16 @@ *说明*.txt # 忽略源文件 -index.html +*.html # 忽略测试输出的文件 data.json index.json *.xlsx -*.bak \ No newline at end of file +*.bak +*.zip +build.py + +# 忽略图片 +*.png +*.ico \ No newline at end of file diff --git a/gui.py b/gui.py index ee3abb9..e08f168 100644 --- a/gui.py +++ b/gui.py @@ -14,6 +14,8 @@ from openpyxl import Workbook from openpyxl.styles import Font, PatternFill, Border, Side, Alignment from openpyxl.utils import get_column_letter import time +import requests +from packaging import version class JsonExtractorGUI: def __init__(self, root): @@ -21,6 +23,16 @@ class JsonExtractorGUI: self.root.title("漏扫数据分析工具 v1.0.1 - By Felix") self.root.geometry("800x600") + # 创建菜单栏 + self.menubar = tk.Menu(self.root) + self.root.config(menu=self.menubar) + + # 创建帮助菜单 + self.help_menu = tk.Menu(self.menubar, tearoff=0) + self.menubar.add_cascade(label="帮助", menu=self.help_menu) + self.help_menu.add_command(label="关于", command=self.show_about) + self.help_menu.add_command(label="检查更新", command=self.check_update) + # 创建标签页 self.notebook = ttk.Notebook(root) self.notebook.pack(fill="both", expand=True, padx=5, pady=5) @@ -1098,6 +1110,30 @@ class JsonExtractorGUI: self.lvmeng_log(f"处理旧版绿盟漏扫结果时出错: {str(e)}", "ERROR") raise + def show_about(self): + about_text = "漏扫数据分析工具 v1.0.1\n\n" + about_text += "作者: Felix\n" + about_text += "开源地址: https://github.com/Felix-sec/VulnDataAnalyzer" + messagebox.showinfo("关于", about_text) + + def check_update(self): + try: + # 获取Github最新release版本 + api_url = "https://api.github.com/repos/Felix-sec/VulnDataAnalyzer/releases/latest" + response = requests.get(api_url) + response.raise_for_status() + latest_version = response.json()["tag_name"].strip("v") + current_version = "1.0.1" + + if version.parse(latest_version) > version.parse(current_version): + update_text = f"发现新版本: v{latest_version}\n当前版本: v{current_version}\n\n" + update_text += "请访问项目地址下载最新版本:\nhttps://github.com/Felix-sec/VulnDataAnalyzer/releases" + messagebox.showinfo("检查更新", update_text) + else: + messagebox.showinfo("检查更新", "当前已是最新版本!") + except Exception as e: + messagebox.showerror("检查更新", f"检查更新失败:{str(e)}") + if __name__ == "__main__": root = TkinterDnD.Tk() app = JsonExtractorGUI(root) diff --git a/requirements.txt b/requirements.txt index 2307f6a2a8fb511a637695b2ac70a8f48d639973..454e7e120ac42ad461c3bdece5a331aae1ede25a 100644 GIT binary patch literal 984 zcmY+D;ZDLp5QO))iH`z-0-`^B7E+}`LuqS!D){i~H@k&O8js|5c4l_={Qb$TvSd5! zEVtJ7_RKf4sm*Q8xwLz`vllC6|O35Hb>wPr0~7PS}0J zci?`4+Xh5p8ztKhx8nwth**;M)ZinzVt6BwffS!ybqcz1z0pBpzay`c)$asQ60s%bz(b;R_rom@*BiFX}7F0WXK!an&6N7}q*Or)Wt5|z&1 z(-v)EKy delta 39 vcmcb?eu$ar|G$Z91{1faapp0UGUPH8FjP)9W;CDN!zeS^hAC|F6Q&&iAPf!4