|
1 | 1 | import config
|
2 | 2 | from Lovelymem_ui import Ui_MainWindow
|
3 |
| -from PySide6.QtWidgets import QMainWindow, QFileDialog, QMessageBox, QApplication, QWidget, QTableWidgetItem, QHeaderView, QMenu, QTableWidget |
| 3 | +from PySide6.QtWidgets import QMainWindow, QFileDialog, QMessageBox, QApplication, QWidget, QTableWidgetItem, QHeaderView |
4 | 4 | from PySide6.QtCore import Qt, QThread, Signal,QRect
|
5 | 5 | import sys
|
6 | 6 | import os
|
7 | 7 | import subprocess
|
8 | 8 | from colorama import Fore, Back, Style
|
9 |
| -import csv |
10 | 9 | import shutil
|
11 | 10 | from PySide6 import QtGui
|
12 | 11 | import convert.netstat
|
13 | 12 | import convert.loadcsv
|
14 | 13 | import pandas as pd
|
15 | 14 | from PySide6 import QtWidgets
|
16 | 15 | import re,hexdump
|
17 |
| -import binascii |
18 | 16 | from PIL import Image
|
19 | 17 |
|
20 | 18 |
|
@@ -135,12 +133,10 @@ def get_truepath(selectstr):
|
135 | 133 | print(Fore.YELLOW + '[*] 正在打开目录:' + os.path.dirname(truepath) + Style.RESET_ALL)
|
136 | 134 | os.system('explorer.exe ' + os.path.dirname(truepath))
|
137 | 135 | elif action == copy_str: #复制内容并发送至搜索框
|
138 |
| - # Get the content of the selected cell |
139 |
| - local_pos = self.tableWidget_find.mapFromGlobal(self.mapToGlobal(pos)) |
140 |
| - header_height = self.tableWidget_find.horizontalHeader().height() |
141 |
| - local_pos.setY(local_pos.y() - header_height) |
142 |
| - selected_item = self.tableWidget_find.itemAt(local_pos) |
143 |
| - if selected_item is not None: |
| 136 | + # Get the content of the selected cell |
| 137 | + selected_items = self.tableWidget_find.selectedItems() |
| 138 | + if selected_items: |
| 139 | + selected_item = selected_items[0] |
144 | 140 | selectstr = selected_item.text()
|
145 | 141 | self.lineEdit_str.setText(selectstr)
|
146 | 142 | clipboard = QApplication.clipboard()
|
@@ -557,12 +553,21 @@ def load_netstat(self):
|
557 | 553 | return self.loadcsv2table(netstatpath)
|
558 | 554 |
|
559 | 555 | def closeEvent(self, event):
|
560 |
| - reply = QMessageBox.question(self, '退出', '确认退出吗?退出会结束MemProcFS进程', QMessageBox.Yes | QMessageBox.No, QMessageBox.No) |
| 556 | + pixmap = QtGui.QPixmap("res/qrcode.png") |
| 557 | + pixmap = pixmap.scaled(200, 200) |
| 558 | + msg = QMessageBox() |
| 559 | + msg.setIconPixmap(pixmap) |
| 560 | + msg.setTextInteractionFlags(Qt.TextSelectableByMouse) |
| 561 | + msg.setTextFormat(Qt.RichText) |
| 562 | + msg.setText("<center><h2>确认退出吗?</h2></center><center><h2>退出会结束MemProcFS进程</h2></center>") |
| 563 | + msg.setWindowTitle("请我喝杯咖啡吧!") |
| 564 | + msg.setWindowIcon(QtGui.QIcon('res/logo.ico')) |
| 565 | + msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No) |
| 566 | + reply = msg.exec() |
561 | 567 | if reply == QMessageBox.Yes:
|
562 | 568 | event.accept()
|
563 | 569 | # 结束MemProcFS进程,结束MemProcFS.exe
|
564 | 570 | os.system('taskkill /F /IM MemProcFS.exe')
|
565 |
| - |
566 | 571 | else:
|
567 | 572 | event.ignore()
|
568 | 573 | #----------------------------------------------------------------------------------------------------------
|
|
0 commit comments