Add files via upload

This commit is contained in:
PYDT authored and GitHub committed 2023-06-06 00:00:03 +08:00
1 parent ed3dac054a
commit d724473bc2
4 files changed
+36 -27

No files matched your search

+21 -5
View File
@@ -746,7 +746,7 @@ class MainWindow_Controller(QtWidgets.QMainWindow):
try:
if file != "":
self.Virus_Scan = True
self.ui.Virus_Scan_text.setText(self.text_Translate("正在初始化中..."))
self.ui.Virus_Scan_text.setText(self.text_Translate("正在初始化中"))
self.ui.Virus_Scan_choose_Button.hide()
QApplication.processEvents()
if file not in self.whitelist:
@@ -980,11 +980,27 @@ class MainWindow_Controller(QtWidgets.QMainWindow):
def Clean_System_Files(self):
try:
if QMessageBox.warning(self,self.text_Translate("清理系統檔案"),self.text_Translate("您確定要清理系統檔案嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
subprocess.run("cleanmgr", check=True)
if QMessageBox.warning(self,self.text_Translate("清理系統垃圾"),self.text_Translate("您確定要清理系統垃圾嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
self.total_deleted_size = 0
self.traverse_temp_files(f"C:/Users/{os.getlogin()}/AppData/Local/Temp")
self.traverse_temp_files(f"C:/$Recycle.Bin")
QMessageBox.information(self,self.text_Translate("完成"),self.text_Translate(f"成功清理了{self.total_deleted_size} 位元的系統垃圾"),QMessageBox.Ok)
except Exception as e:
self.pyas_bug_log(e)
def traverse_temp_files(self, path):
for fd in os.listdir(path):
try:
fullpath = str(os.path.join(path,fd)).replace("\\", "/")
QApplication.processEvents()
if os.path.isdir(fullpath):
self.traverse_temp_files(fullpath)
else:
os.remove(fullpath)
self.total_deleted_size += os.path.getsize(fullpath)
except:
continue
def Enable_Safe_Mode(self):
try:
if QMessageBox.warning(self,self.text_Translate("啟用安全模式"),self.text_Translate("您確定要啟用安全模式嗎?"),QMessageBox.Yes|QMessageBox.No) == 16384:
@@ -1168,7 +1184,7 @@ class MainWindow_Controller(QtWidgets.QMainWindow):
try:
for action, file in win32file.ReadDirectoryChangesW(hDir,1024,True,win32con.FILE_NOTIFY_CHANGE_FILE_NAME|win32con.FILE_NOTIFY_CHANGE_DIR_NAME|win32con.FILE_NOTIFY_CHANGE_ATTRIBUTES|win32con.FILE_NOTIFY_CHANGE_SIZE|win32con.FILE_NOTIFY_CHANGE_LAST_WRITE|win32con.FILE_NOTIFY_CHANGE_SECURITY,None,None):
file = str(f"{path}{file}").replace("\\", "/")
if self.pyas == file or file in self.whitelist or ":/$Recycle.Bin" in file or ":/Windows" in file or ":/Program" in file:
if self.pyas == file or file in self.whitelist or ":/$Recycle.Bin" in file or ":/Windows" in file:
continue
elif action and str(os.path.splitext(file)[1]).lower() in sflist:
if self.sign_scan(file) and self.api_scan(file):
@@ -1208,7 +1224,7 @@ class MainWindow_Controller(QtWidgets.QMainWindow):
pass
if __name__ == '__main__':
pyas_version = "2.7.0"
pyas_version = "2.7.1"
QtCore.QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
QtGui.QGuiApplication.setAttribute(Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
app = QtWidgets.QApplication(sys.argv)
+13 -20
View File
@@ -4,7 +4,7 @@ translations = {"zh_TW": {"已开启":"已開啟","已关闭":"已關閉","On":"
"錯誤":"错误","實時":"实时","發現":"发现","本機":"电脑","資料":"数据",
"誤殺":"误杀","開發":"开发","關閉":"关闭","資訊":"资讯","裝置":"设备",
"總數":"总数","註冊":"注册","圖標":"图标","路徑":"路径","網路":"网络",
"編輯":"编辑","增":"增","單":"单","簽":"签","無":"无","關":"关","權":"权",
"編輯":"编辑","位元":"字节","增":"增","單":"单","簽":"签","無":"无",
"項":"项","掃":"扫","試":"试","黃":"黄","嗎":"吗","防":"保","鑰":"钥",
"當":"当","後":"后","護":"护","導":"导","區":"区","復":"复","攔":"拦",
"請":"请","統":"统","刪":"删","進":"进","個":"个","選":"选","啟":"启",
@@ -14,21 +14,18 @@ translations = {"zh_TW": {"已开启":"已開啟","已关闭":"已關閉","On":"
"類":"类","輸":"输","執":"执","數":"数","尋":"寻","網":"网","詢":"询",
"製":"制","員":"员","許":"许","條":"条","藍":"蓝","紅":"红","綠":"绿",
"態":"态","擇":"择","務":"务","連":"连","檢":"检","測":"测","庫":"库",
"強":"强"},
"關":"关","權":"权","強":"强"},
"en_US": {"已開啟":"On","已關閉":"Off","已开启":"On","已关闭":"Off",",":", ",
"立即刪除":"Delete Now","安全模式":"Safe Mode","官方網站":"Website",
"許可條款":"License Terms","可疑":"Suspicious ","惡意軟體":"Malware ",
"啟用":"Enable ","禁用":"Disable ","正在初始化中":"Initializing ",
"正在掃描":"Scanning ","正在檢測":"Checking ","正在尋找":"Searching ",
"正在刪除":"Deleting ","立即刪除":"Delete Now","安全模式":"Safe Mode",
"最小化到":"Minimize To ","可疑":"Suspicious ","惡意軟體":"Malware ",
"確定要":"Sure Want To ","官方網站":"Website","許可條款":"License Terms",
"正在掃描":"Scanning ","正在刪除":"Deleting ","最小化到":"Minimize To ",
"確定要":"Sure Want To ","靈敏度":"Sensitivity ","更新":"Update",
"白色主題":"White","黑色主題":"Black","黃色主題":"Yellow","紅色主題":"Red",
"藍色主題":"Blue","綠色主題":"Green","語言":"Language ","製作":"Make",
"測試人員":"Testers","版本資訊":"Information","提示字元":"Prompt",
"靈敏度":"Sensitivity ","位置查詢":"Location Query","無效簽名":"Unsign ",
"註冊表":"Registry ","編輯器":"Editor","實時":"Real-Time ","退出":"Quit ",
"測試人員":"Testers","版本資訊":"Information","無效簽名":"Unsign ",
"註冊表":"Registry ","退出":"Quit ","檔案":"File ","當前":"Currently ",
"狀態":"State ","掃描":"Scan ","工具":"Tools ","防護":"Protect ",
"輸入的":"Input ","不是有效":"Is Not A Valid ","命令":"Command ",
"創建":"Create ","日期":"Date ","檔案":"File ","當前":"Currently ",
"失敗":"Failed ","請":"Please ","路徑":"Path ","方式":"Method ",
"需要":"Need ","病毒":"Virus ","選擇":"Select ","返回":"Back",
"找到":"Find ","受到":"Been ","錯誤":"Error","完成":"Complete ",
@@ -43,18 +40,14 @@ translations = {"zh_TW": {"已开启":"已開啟","已关闭":"已關閉","On":"
"分區":"Partition ","設定":"Settings","關於":"About ","模式":"Mode ",
"提高":"Improve ","安全":"Security ","顯色":"Color ","主題":"Themes ",
"風險":"Risk ","介面":"GUI ","核心":"Core ","服務":"Services ",
"隱私":"Privacy ","更多":"More ","開發":"Devs ","管理":"Manage",
"粉碎":"Shredding","自訂":"Customize ","分析":"Analyze ","函數":"Func",
"垃圾":"Junk ","輸出":"Output ","位元":"Bits","本機":"Computer ",
"變更":"Change ","總數":"Total","結束":"End ","文字":"Text",
"加密":"Encrypt ","解密":"Decrypt ","類型":"Type","資料":"Data",
"更新":"Update","規則":"Rules","密碼":"Password ","相關":"Related ",
"全盤":"Full ","日誌":"Log","停止":"Stop ","權限":"Permissions ",
"管理":"Manage","相關":"Related ","全盤":"Full ","日誌":"Log",
"垃圾":"Junk ","位元":"byte ","本機":"Computer ","停止":"Stop ",
"變更":"Change ","總數":"Total","結束":"End ","權限":"Permissions ",
"增加到":"Add File To ","白名單":"White List ","黑名單":"Black List ",
"增加":"Add","移除":"Delete","增強":"Enhanced ",
"增加":"Add","移除":"Delete","增強":"Enhanced ","項目":"Items ",
"前":"Before","後":"After","名":"Name","開啟":"Open ","您":"You ",
"值":"Value ","此":"This ","但":"But ","並":"And ","嗎":"",
"高":"High ","新":"New ","是":"Is ","和":"And ","會":"Can ",
"到":"For ","未":"Not ","已":"Has ","個":"","顯示":"","的":"",
"不正確":"Incorrect ","軟體":"Software ","密鑰":"Key ","立即":"",
"項目":"Items ","生成":"Create ","中":"","行":"","稱":""," ":" "}}
"生成":"Create ","中":"","了":"","行":"","稱":""," ":" "}}
+1 -1
View File
@@ -1 +1 @@
function_list = [['_CorExeMain'], ['GetProcessHeap', 'RtlUnwind', 'RaiseException', 'HeapSize', 'TerminateProcess', 'UnhandledExceptionFilter', 'SetUnhandledExceptionFilter', 'IsDebuggerPresent', 'HeapDestroy', 'HeapCreate', 'VirtualFree', 'Sleep', 'GetStdHandle', 'GetTimeZoneInformation', 'GetACP', 'SetHandleCount', 'GetFileType', 'GetStartupInfoA', 'GetCommandLineA', 'GetEnvironmentStrings', 'FreeEnvironmentStringsW', 'GetEnvironmentStringsW', 'QueryPerformanceCounter', 'GetSystemTimeAsFileTime', 'LCMapStringA', 'LCMapStringW', 'GetConsoleCP', 'GetConsoleMode', 'GetStringTypeA', 'GetStringTypeW', 'SetStdHandle', 'WriteConsoleA', 'GetConsoleOutputCP', 'WriteConsoleW', 'GetDateFormatA', 'GetTimeFormatA', 'GetDriveTypeA', 'SetEnvironmentVariableA', 'HeapReAlloc', 'VirtualAlloc', 'SetCurrentDirectoryA', 'HeapAlloc', 'HeapFree', 'GetTickCount', 'GetCurrentDirectoryA', 'LocalFileTimeToFileTime', 'CreateFileA', 'GetShortPathNameA', 'GetVolumeInformationA', 'GetCurrentProcess', 'DuplicateHandle', 'GetFileSize', 'SetEndOfFile', 'UnlockFile', 'LockFile', 'FlushFileBuffers', 'SetFilePointer', 'WriteFile', 'ReadFile', 'DeleteFileA', 'MoveFileA', 'GetOEMCP', 'GetCPInfo', 'InterlockedIncrement', 'SystemTimeToFileTime', 'GetThreadLocale', 'GlobalFlags', 'TlsFree', 'DeleteCriticalSection', 'LocalReAlloc', 'TlsSetValue', 'TlsAlloc', 'InitializeCriticalSection', 'GlobalHandle', 'GlobalReAlloc', 'EnterCriticalSection', 'TlsGetValue', 'LeaveCriticalSection', 'LocalAlloc', 'CloseHandle', 'GetPrivateProfileStringA', 'WritePrivateProfileStringA', 'GetPrivateProfileIntA', 'GetCurrentProcessId', 'GetCurrentThread', 'ConvertDefaultLocale', 'GetModuleFileNameA', 'EnumResourceLanguagesA', 'GetLocaleInfoA', 'lstrcmpA', 'GetDiskFreeSpaceA', 'GetFullPathNameA', 'GetTempFileNameA', 'GetFileTime', 'SetFileTime', 'GetFileAttributesA', 'FreeResource', 'GetCurrentThreadId', 'GlobalGetAtomNameA', 'GlobalAddAtomA', 'GlobalFindAtomA', 'GlobalDeleteAtom', 'lstrcmpW', 'GetVersionExA', 'GlobalFree', 'GlobalAlloc', 'FormatMessageA', 'LocalFree', 'GlobalLock', 'GlobalUnlock', 'MulDiv', 'FindFirstFileA', 'FileTimeToLocalFileTime', 'FileTimeToSystemTime', 'FindNextFileA', 'FindClose', 'FreeLibrary', 'InterlockedDecrement', 'LockResource', 'SizeofResource', 'LoadResource', 'FindResourceA', 'ExitProcess', 'GetVersion', 'CompareStringA', 'GetModuleHandleA', 'LoadLibraryA', 'GetProcAddress', 'lstrcmpiA', 'SetLastError', 'GetLastError', 'InterlockedExchange', 'GetStringTypeExA', 'MultiByteToWideChar', 'CompareStringW', 'WideCharToMultiByte', 'lstrlenA', 'FreeEnvironmentStringsA', 'GetComputerNameA', 'CopyAcceleratorTableA', 'CreateMenu', 'PostThreadMessageA', 'GetTabbedTextExtentA', 'RegisterClipboardFormatA', 'GetSysColorBrush', 'UnregisterClassA', 'LoadCursorA', 'DestroyCursor', 'SetCursorPos', 'SetCapture', 'RedrawWindow', 'InflateRect', 'UnpackDDElParam', 'ReuseDDElParam', 'LoadMenuA', 'DestroyMenu', 'ReleaseCapture', 'LoadAcceleratorsA', 'InsertMenuItemA', 'CreatePopupMenu', 'BringWindowToTop', 'SetMenu', 'TranslateAcceleratorA', 'IsZoomed', 'WindowFromPoint', 'KillTimer', 'SetTimer', 'SetRect', 'SetParent', 'GetSystemMenu', 'DeleteMenu', 'SetRectEmpty', 'IsRectEmpty', 'GetDesktopWindow', 'CreateDialogIndirectParamA', 'GetNextDlgTabItem', 'EndDialog', 'GetMessageA', 'TranslateMessage', 'GetActiveWindow', 'GetCursorPos', 'ValidateRect', 'GetWindowThreadProcessId', 'ShowOwnedPopups', 'SetCursor', 'PostQuitMessage', 'IsWindowEnabled', 'SetWindowTextA', 'IsDialogMessageA', 'SetDlgItemTextA', 'RegisterWindowMessageA', 'LoadIconA', 'SendDlgItemMessageA', 'WinHelpA', 'GetCapture', 'SetWindowsHookExA', 'CallNextHookEx', 'GetClassNameA', 'SetPropA', 'GetPropA', 'RemovePropA', 'SetFocus', 'GetWindowTextLengthA', 'GetWindowTextA', 'GetLastActivePopup', 'SetActiveWindow', 'DispatchMessageA', 'BeginDeferWindowPos', 'EndDeferWindowPos', 'GetDlgItem', 'GetTopWindow', 'DestroyWindow', 'GetMessageTime', 'GetMessagePos', 'PeekMessageA', 'MapWindowPoints', 'ScrollWindow', 'TrackPopupMenu', 'GetKeyState', 'SetScrollRange', 'GetScrollRange', 'SetScrollPos', 'GetScrollPos', 'SetForegroundWindow', 'ShowScrollBar', 'IsWindowVisible', 'GetMenu', 'PostMessageA', 'MessageBoxA', 'CreateWindowExA', 'GetClassInfoExA', 'GetClassInfoA', 'RegisterClassA', 'EqualRect', 'DeferWindowPos', 'GetScrollInfo', 'SetScrollInfo', 'PtInRect', 'DefWindowProcA', 'CallWindowProcA', 'SetWindowPos', 'OffsetRect', 'IntersectRect', 'SystemParametersInfoA', 'GetWindowPlacement', 'GetWindowRect', 'GetSystemMetrics', 'GetWindow', 'GetMenuStringA', 'AppendMenuA', 'GetMenuItemID', 'InsertMenuA', 'GetMenuItemCount', 'GetSubMenu', 'RemoveMenu', 'GetSysColor', 'EndPaint', 'BeginPaint', 'GetWindowDC', 'ClientToScreen', 'ScreenToClient', 'GrayStringA', 'DrawTextExA', 'DrawTextA', 'TabbedTextOutA', 'FillRect', 'SetWindowRgn', 'DrawIcon', 'FindWindowA', 'LockWindowUpdate', 'GetDCEx', 'DestroyIcon', 'GetClassLongA', 'GetMenuItemInfoA', 'GetDlgCtrlID', 'IsChild', 'InvalidateRect', 'IsIconic', 'AdjustWindowRectEx',Line truncated
function_list = [['_CorExeMain'], ['GetProcessHeap', 'RtlUnwind', 'RaiseException', 'HeapSize', 'TerminateProcess', 'UnhandledExceptionFilter', 'SetUnhandledExceptionFilter', 'IsDebuggerPresent', 'HeapDestroy', 'HeapCreate', 'VirtualFree', 'Sleep', 'GetStdHandle', 'GetTimeZoneInformation', 'GetACP', 'SetHandleCount', 'GetFileType', 'GetStartupInfoA', 'GetCommandLineA', 'GetEnvironmentStrings', 'FreeEnvironmentStringsW', 'GetEnvironmentStringsW', 'QueryPerformanceCounter', 'GetSystemTimeAsFileTime', 'LCMapStringA', 'LCMapStringW', 'GetConsoleCP', 'GetConsoleMode', 'GetStringTypeA', 'GetStringTypeW', 'SetStdHandle', 'WriteConsoleA', 'GetConsoleOutputCP', 'WriteConsoleW', 'GetDateFormatA', 'GetTimeFormatA', 'GetDriveTypeA', 'SetEnvironmentVariableA', 'HeapReAlloc', 'VirtualAlloc', 'SetCurrentDirectoryA', 'HeapAlloc', 'HeapFree', 'GetTickCount', 'GetCurrentDirectoryA', 'LocalFileTimeToFileTime', 'CreateFileA', 'GetShortPathNameA', 'GetVolumeInformationA', 'GetCurrentProcess', 'DuplicateHandle', 'GetFileSize', 'SetEndOfFile', 'UnlockFile', 'LockFile', 'FlushFileBuffers', 'SetFilePointer', 'WriteFile', 'ReadFile', 'DeleteFileA', 'MoveFileA', 'GetOEMCP', 'GetCPInfo', 'InterlockedIncrement', 'SystemTimeToFileTime', 'GetThreadLocale', 'GlobalFlags', 'TlsFree', 'DeleteCriticalSection', 'LocalReAlloc', 'TlsSetValue', 'TlsAlloc', 'InitializeCriticalSection', 'GlobalHandle', 'GlobalReAlloc', 'EnterCriticalSection', 'TlsGetValue', 'LeaveCriticalSection', 'LocalAlloc', 'CloseHandle', 'GetPrivateProfileStringA', 'WritePrivateProfileStringA', 'GetPrivateProfileIntA', 'GetCurrentProcessId', 'GetCurrentThread', 'ConvertDefaultLocale', 'GetModuleFileNameA', 'EnumResourceLanguagesA', 'GetLocaleInfoA', 'lstrcmpA', 'GetDiskFreeSpaceA', 'GetFullPathNameA', 'GetTempFileNameA', 'GetFileTime', 'SetFileTime', 'GetFileAttributesA', 'FreeResource', 'GetCurrentThreadId', 'GlobalGetAtomNameA', 'GlobalAddAtomA', 'GlobalFindAtomA', 'GlobalDeleteAtom', 'lstrcmpW', 'GetVersionExA', 'GlobalFree', 'GlobalAlloc', 'FormatMessageA', 'LocalFree', 'GlobalLock', 'GlobalUnlock', 'MulDiv', 'FindFirstFileA', 'FileTimeToLocalFileTime', 'FileTimeToSystemTime', 'FindNextFileA', 'FindClose', 'FreeLibrary', 'InterlockedDecrement', 'LockResource', 'SizeofResource', 'LoadResource', 'FindResourceA', 'ExitProcess', 'GetVersion', 'CompareStringA', 'GetModuleHandleA', 'LoadLibraryA', 'GetProcAddress', 'lstrcmpiA', 'SetLastError', 'GetLastError', 'InterlockedExchange', 'GetStringTypeExA', 'MultiByteToWideChar', 'CompareStringW', 'WideCharToMultiByte', 'lstrlenA', 'FreeEnvironmentStringsA', 'GetComputerNameA', 'CopyAcceleratorTableA', 'CreateMenu', 'PostThreadMessageA', 'GetTabbedTextExtentA', 'RegisterClipboardFormatA', 'GetSysColorBrush', 'UnregisterClassA', 'LoadCursorA', 'DestroyCursor', 'SetCursorPos', 'SetCapture', 'RedrawWindow', 'InflateRect', 'UnpackDDElParam', 'ReuseDDElParam', 'LoadMenuA', 'DestroyMenu', 'ReleaseCapture', 'LoadAcceleratorsA', 'InsertMenuItemA', 'CreatePopupMenu', 'BringWindowToTop', 'SetMenu', 'TranslateAcceleratorA', 'IsZoomed', 'WindowFromPoint', 'KillTimer', 'SetTimer', 'SetRect', 'SetParent', 'GetSystemMenu', 'DeleteMenu', 'SetRectEmpty', 'IsRectEmpty', 'GetDesktopWindow', 'CreateDialogIndirectParamA', 'GetNextDlgTabItem', 'EndDialog', 'GetMessageA', 'TranslateMessage', 'GetActiveWindow', 'GetCursorPos', 'ValidateRect', 'GetWindowThreadProcessId', 'ShowOwnedPopups', 'SetCursor', 'PostQuitMessage', 'IsWindowEnabled', 'SetWindowTextA', 'IsDialogMessageA', 'SetDlgItemTextA', 'RegisterWindowMessageA', 'LoadIconA', 'SendDlgItemMessageA', 'WinHelpA', 'GetCapture', 'SetWindowsHookExA', 'CallNextHookEx', 'GetClassNameA', 'SetPropA', 'GetPropA', 'RemovePropA', 'SetFocus', 'GetWindowTextLengthA', 'GetWindowTextA', 'GetLastActivePopup', 'SetActiveWindow', 'DispatchMessageA', 'BeginDeferWindowPos', 'EndDeferWindowPos', 'GetDlgItem', 'GetTopWindow', 'DestroyWindow', 'GetMessageTime', 'GetMessagePos', 'PeekMessageA', 'MapWindowPoints', 'ScrollWindow', 'TrackPopupMenu', 'GetKeyState', 'SetScrollRange', 'GetScrollRange', 'SetScrollPos', 'GetScrollPos', 'SetForegroundWindow', 'ShowScrollBar', 'IsWindowVisible', 'GetMenu', 'PostMessageA', 'MessageBoxA', 'CreateWindowExA', 'GetClassInfoExA', 'GetClassInfoA', 'RegisterClassA', 'EqualRect', 'DeferWindowPos', 'GetScrollInfo', 'SetScrollInfo', 'PtInRect', 'DefWindowProcA', 'CallWindowProcA', 'SetWindowPos', 'OffsetRect', 'IntersectRect', 'SystemParametersInfoA', 'GetWindowPlacement', 'GetWindowRect', 'GetSystemMetrics', 'GetWindow', 'GetMenuStringA', 'AppendMenuA', 'GetMenuItemID', 'InsertMenuA', 'GetMenuItemCount', 'GetSubMenu', 'RemoveMenu', 'GetSysColor', 'EndPaint', 'BeginPaint', 'GetWindowDC', 'ClientToScreen', 'ScreenToClient', 'GrayStringA', 'DrawTextExA', 'DrawTextA', 'TabbedTextOutA', 'FillRect', 'SetWindowRgn', 'DrawIcon', 'FindWindowA', 'LockWindowUpdate', 'GetDCEx', 'DestroyIcon', 'GetClassLongA', 'GetMenuItemInfoA', 'GetDlgCtrlID', 'IsChild', 'InvalidateRect', 'IsIconic', 'AdjustWindowRectEx',Line truncated
+1 -1
View File
@@ -1,7 +1,7 @@
import pyinstaller_versionfile
pyinstaller_versionfile.create_versionfile(
output_file="versionfile.txt",
version='2.7.0',
version='2.7.1',
company_name="PYAS Security",
file_description="Python Antivirus Software",
internal_name="PYAS",