Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
87owo authored Jul 21, 2023
1 parent a984be2 commit bc7d570
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
23 changes: 11 additions & 12 deletions PYAS.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def init_configs(self):
self.scan = False
self.block_window = True
self.pyas_opacity = 0
self.pyas_version = "2.7.7"
self.pyas_version = "2.7.8"
self.ui.Theme_White.setChecked(True)
self.pyas = str(sys.argv[0]).replace("\\", "/")
self.key = self.pyas_key()
Expand Down Expand Up @@ -818,10 +818,13 @@ def pe_scan(self,file):
pe.close()
for entry in pe.DIRECTORY_ENTRY_IMPORT:
for func in entry.imports:
fn.append(str(func.name, "utf-8"))
for vfl in function_list:
if len(set(fn) & set(vfl)) / len(set(fn) | set(vfl)) == 1.0:
return True
try:
fn.append(str(func.name, "utf-8"))
except:
pass
if fn in function_list:
print(fn)
return True
return False
except:
return False
Expand Down Expand Up @@ -1189,16 +1192,13 @@ def protect_system_processes(self):
continue
elif ":/Windows" in self.p_file or ":/Program" in self.p_file:
continue
elif self.high_sensitivity == 1 and self.sign_scan(self.p_file):
if self.protect_process_kill(self.p_name):
self.system_notification(self.text_Translate("無效簽名攔截: ")+self.p_name)
elif self.api_scan(self.p_file):
if self.protect_process_kill(self.p_name):
self.system_notification(self.text_Translate("惡意軟體攔截: ")+self.p_name)
elif self.pe_scan(self.p_file):
if self.protect_process_kill(self.p_name):
self.system_notification(self.text_Translate("可疑檔案攔截: ")+self.p_name)
else:
elif self.sign_scan(self.p_file):
self.p_check = self.p_name
gc.collect()
existing_proc = current_proc
Expand Down Expand Up @@ -1232,9 +1232,8 @@ def protect_system_file(self,path):
if file_type in slist and self.sign_scan(file) and self.api_scan(file):
os.remove(file)
self.system_notification(self.text_Translate("惡意軟體刪除: ")+file)
elif file_type in alist and self.last_file == file_name:
if self.protect_process_kill(self.p_check):
self.system_notification(self.text_Translate("勒索軟體攔截: ")+self.p_check)
elif self.last_file == file_name and self.protect_process_kill(self.p_check):
self.system_notification(self.text_Translate("勒索軟體攔截: ")+self.p_check)
self.last_file = file_name
gc.collect()
except:
Expand Down
2 changes: 1 addition & 1 deletion PYAS_Function.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion PYAS_Version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pyinstaller_versionfile
pyinstaller_versionfile.create_versionfile(
output_file="versionfile.txt",
version='2.7.7',
version='2.7.8',
company_name="PYAS Security",
file_description="Python Antivirus Software",
internal_name="PYAS",
Expand Down

0 comments on commit bc7d570

Please sign in to comment.