Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5700039d42 | ||
|
|
22445c79d4 | ||
|
|
2be05ac76c | ||
|
|
84e397aeed | ||
|
|
bb513b9115 | ||
|
|
01b680e278 | ||
|
|
ef7c1cba2e | ||
|
|
40bbc57c82 | ||
|
|
457e5bebbb | ||
|
|
99abc56177 | ||
|
|
9eeb0b6376 | ||
|
|
0b2da187ee | ||
|
|
06f5410a4d | ||
|
|
2551ada3b7 | ||
|
|
56df08879e | ||
|
|
d41685c86e | ||
|
|
14b942970e | ||
|
|
b6103c845d |
No files matched your search
@@ -1 +1 @@
|
||||
{"Unknown": [38413146381396798812836662586219087594480760119241756145287379993031670453973, 96759775057307603829199050115151442660431386536877578909394799687553144825391], "White": [92860071170291586757870565976957954052649178883790647665503983139114277816413, 50625869624179221836524636484722091669820057030729734765256925026245308185143, 79303266820014134748061006437377483029320717142203104125806969476209010566146, 50391760446499089493384482654016917630509060287507523223191455177998253781572, 34733894651460458125941968926483828168477919119649839915356573816494375383659, 16447578251589668808184123721615810667991570306415913809506896532563163557975, 18668853151306203943053249777678854424409647574074706653144503993068509738028, 16447129799599854768187525514242197965987640167415805965954293039200573272151, 42965648781535883376480003940402366467478625051031283341289116138472520399484, 45637511530246203537935382208327538642024163565740899790237852717178844340385, 100662025713257198141308144602569453810226448934776598411982222249289646045820, 2813878798545665948450767843887867208740292941021073849284371582085785669685, 54695748401254225125045716155327877471149349614359435230254611073117412307518, 27428665293760567560050957450577436769403462770366418052177943137905489504373, 32018095881556959863902669246154132691484124511748151111295836576906027842532, 82735669648112373508385530969898006750362429118827185652448450648454052106395, 27853809242729492000984914092533936796891917926358854729439436487683423285261, 20030429995379197455160031864140436552884002299333955332088108013764717533796, 82338140557728967648601024370995428985866052631101882076231147335348455671038, 71339449324799277130427957011381342555145697382104653874846579353871764366968, 2432232479351500614611699169184443988440809841079862157291791071419485606436, 9463527399566410848087352636323112952591923803840644609432039785310381355253, 17287926889345790925003722717807755244540044472850272987265624141065166747251, 31507509644511868166890345905396462199402122513677304280568315890707028374136, 92802443753971611323223428952970105040389824130209263287070763891097867755624, 60491018752293550079699763462944244393253888103551546202593483014975813742967, 45133408084728538869955951560598604064861024543940290379768365214821771604584, 6759146298068049614085390992799666053918974602489525613718797088468975708017, 43161770374046173333870752071317153674965637163816017117315179871715332666383, 55200886519442939000007636174371797768786544863806926514781108850256791225983, 102124766481586899841647737641698083212305154684644839980199278690335383712492, 52992286898317605666180786036367620316269750824654214415314225077986227890804, 96307454545313440124283308270263825589093792315386382296096934270155352236733, 36073459579994433898643313577597321150634749356791285363958792075031385371364, 5354562433688861244299028006341553420425390015040147574513776499404802540118, 2671602537216404752611755689384448521170725107261295121211275163689399347529, 31174448189678483951801405655647041557287598300853213718404097030076935043252, 817984956081990458969224676381868506770627801582748844000835755782736667191, 6997953573828232905847825866256444005094471443450029313008738013465446666864, 41288968033780608769032189481784193916730262129846893330891418484950645535282, 56724589038911745751056508177185337741291265472470897077742981563488398484126, 3353938097938067320481103667469354721822387389147415219233498938990215839034, 21195721951654457114265478558602466514207347021822959737607658828495062116920, 2916561284514958799877078174216081002558870786437593202464334407456915288119, 93137488384582768487662730765406914258099784103320160609442537879778117334700, 21195721951654457114265478558602377311225888285332501136798116331518898022972, 85036278951571446667616241901438186945472743486751871120301019617002115253240, 14623491695050192413097067629676318500123044497134202517578785087180871258165, 2022308710750553104057453378681448926020203033444470910346149752954363011822, 16435447118324352510213480738895714506136417806014749563314727656196027207884, 20110908101408861236178371339075650317185505287106087252378028881915405550816, 97262306467112548995108413358594977802790545321935863056096364390382492643957, 96614497885586867524036482497010189662872359368622249290846422070379022959337, 1895288773648887609359329471072769468085207279473521707976899919066265183340, 2651591106060448314208209841614702280337184080195391257416359882876000875095, 114619913163036058498985801603082782363327281628924544162718017899237779173997, 2481883953883130814217575190747389944608730963897863224598923997640828351014, 45000300637061336566799421885334051647634671537987073940268834014403441552901, 79047998258892679051555952202178856054614923426747250310189496005785954516966, 92887093185298651693450115442544102614083847612212241647641096093293220418098, 7140769773119319253009453104401896171570019200295580355390762162793695491644, 17012496707Line truncated
|
||||
{"Unknown": [38413146381396798812836662586219087594480760119241756145287379993031670453973, 96759775057307603829199050115151442660431386536877578909394799687553144825391], "White": [92860071170291586757870565976957954052649178883790647665503983139114277816413, 50625869624179221836524636484722091669820057030729734765256925026245308185143, 79303266820014134748061006437377483029320717142203104125806969476209010566146, 50391760446499089493384482654016917630509060287507523223191455177998253781572, 34733894651460458125941968926483828168477919119649839915356573816494375383659, 16447578251589668808184123721615810667991570306415913809506896532563163557975, 18668853151306203943053249777678854424409647574074706653144503993068509738028, 16447129799599854768187525514242197965987640167415805965954293039200573272151, 42965648781535883376480003940402366467478625051031283341289116138472520399484, 45637511530246203537935382208327538642024163565740899790237852717178844340385, 100662025713257198141308144602569453810226448934776598411982222249289646045820, 2813878798545665948450767843887867208740292941021073849284371582085785669685, 54695748401254225125045716155327877471149349614359435230254611073117412307518, 27428665293760567560050957450577436769403462770366418052177943137905489504373, 32018095881556959863902669246154132691484124511748151111295836576906027842532, 82735669648112373508385530969898006750362429118827185652448450648454052106395, 27853809242729492000984914092533936796891917926358854729439436487683423285261, 20030429995379197455160031864140436552884002299333955332088108013764717533796, 82338140557728967648601024370995428985866052631101882076231147335348455671038, 71339449324799277130427957011381342555145697382104653874846579353871764366968, 2432232479351500614611699169184443988440809841079862157291791071419485606436, 9463527399566410848087352636323112952591923803840644609432039785310381355253, 17287926889345790925003722717807755244540044472850272987265624141065166747251, 31507509644511868166890345905396462199402122513677304280568315890707028374136, 92802443753971611323223428952970105040389824130209263287070763891097867755624, 60491018752293550079699763462944244393253888103551546202593483014975813742967, 45133408084728538869955951560598604064861024543940290379768365214821771604584, 6759146298068049614085390992799666053918974602489525613718797088468975708017, 43161770374046173333870752071317153674965637163816017117315179871715332666383, 55200886519442939000007636174371797768786544863806926514781108850256791225983, 102124766481586899841647737641698083212305154684644839980199278690335383712492, 52992286898317605666180786036367620316269750824654214415314225077986227890804, 96307454545313440124283308270263825589093792315386382296096934270155352236733, 36073459579994433898643313577597321150634749356791285363958792075031385371364, 5354562433688861244299028006341553420425390015040147574513776499404802540118, 2671602537216404752611755689384448521170725107261295121211275163689399347529, 31174448189678483951801405655647041557287598300853213718404097030076935043252, 817984956081990458969224676381868506770627801582748844000835755782736667191, 6997953573828232905847825866256444005094471443450029313008738013465446666864, 41288968033780608769032189481784193916730262129846893330891418484950645535282, 56724589038911745751056508177185337741291265472470897077742981563488398484126, 3353938097938067320481103667469354721822387389147415219233498938990215839034, 21195721951654457114265478558602466514207347021822959737607658828495062116920, 2916561284514958799877078174216081002558870786437593202464334407456915288119, 93137488384582768487662730765406914258099784103320160609442537879778117334700, 21195721951654457114265478558602377311225888285332501136798116331518898022972, 85036278951571446667616241901438186945472743486751871120301019617002115253240, 14623491695050192413097067629676318500123044497134202517578785087180871258165, 2022308710750553104057453378681448926020203033444470910346149752954363011822, 16435447118324352510213480738895714506136417806014749563314727656196027207884, 20110908101408861236178371339075650317185505287106087252378028881915405550816, 97262306467112548995108413358594977802790545321935863056096364390382492643957, 96614497885586867524036482497010189662872359368622249290846422070379022959337, 1895288773648887609359329471072769468085207279473521707976899919066265183340, 2651591106060448314208209841614702280337184080195391257416359882876000875095, 114619913163036058498985801603082782363327281628924544162718017899237779173997, 2481883953883130814217575190747389944608730963897863224598923997640828351014, 45000300637061336566799421885334051647634671537987073940268834014403441552901, 79047998258892679051555952202178856054614923426747250310189496005785954516966, 92887093185298651693450115442544102614083847612212241647641096093293220418098, 7140769773119319253009453104401896171570019200295580355390762162793695491644, 17012496707Line truncated
|
||||
@@ -20,10 +20,9 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.pyas = sys.argv[0].replace("\\", "/")
|
||||
self.dir = os.path.dirname(self.pyas)
|
||||
self.pyae_version = "Fusion Engine"
|
||||
self.pyas_version = "3.1.2"
|
||||
self.pyas_version = "3.1.3"
|
||||
self.ui = Ui_MainWindow()
|
||||
self.ui.setupUi(self)
|
||||
self.init_startup()
|
||||
self.init_sys_drive()
|
||||
self.init_rule_dict()
|
||||
self.init_data_base()
|
||||
@@ -33,10 +32,9 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.init_config_json()
|
||||
self.init_config_list()
|
||||
self.init_config_qtui()
|
||||
self.init_change_lang()
|
||||
self.init_theme_color()
|
||||
self.init_control()
|
||||
self.init_threads()
|
||||
self.init_startup()
|
||||
|
||||
def init_threads(self):
|
||||
self.protect_proc_init()
|
||||
@@ -136,22 +134,21 @@ class MainWindow_Controller(QMainWindow):
|
||||
if not os.path.exists("C:/ProgramData/PYAS"):
|
||||
os.makedirs("C:/ProgramData/PYAS")
|
||||
if not os.path.exists("C:/ProgramData/PYAS/PYAS.json"):
|
||||
self.write_config({"high_sensitive":0,"cloud_services":"http://127.0.0.1/",
|
||||
"language":"en_US","theme_color":"White","theme_custom":""})
|
||||
self.write_config({"language":"en_US","theme_color":"White",
|
||||
"high_sensitive":0,"cloud_services":"http://127.0.0.1/"})
|
||||
with open("C:/ProgramData/PYAS/PYAS.json", "r") as f:
|
||||
self.json = json.load(f)
|
||||
except:
|
||||
self.write_config({"high_sensitive":0,"cloud_services":"http://127.0.0.1/",
|
||||
"language":"en_US","theme_color":"White","theme_custom":""})
|
||||
self.write_config({"language":"en_US","theme_color":"White",
|
||||
"high_sensitive":0,"cloud_services":"http://127.0.0.1/"})
|
||||
with open("C:/ProgramData/PYAS/PYAS.json", "r") as f:
|
||||
self.json = json.load(f)
|
||||
|
||||
def init_config_json(self):
|
||||
self.json["high_sensitive"] = self.json.get("high_sensitive", 0)
|
||||
self.json["cloud_services"] = self.json.get("cloud_services", "http://127.0.0.1/")
|
||||
self.json["language"] = self.json.get("language", "en_US")
|
||||
self.json["theme_color"] = self.json.get("theme_color", "White")
|
||||
self.json["theme_custom"] = self.json.get("theme_custom", "")
|
||||
self.json["high_sensitive"] = self.json.get("high_sensitive", 0)
|
||||
self.json["cloud_services"] = self.json.get("cloud_services", "http://127.0.0.1/")
|
||||
if self.json["high_sensitive"] == 1:
|
||||
self.ui.high_sensitivity_switch_Button.setText(self.trans("已開啟"))
|
||||
self.ui.high_sensitivity_switch_Button.setStyleSheet("""
|
||||
@@ -173,7 +170,7 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.ui.Theme_Yellow.setChecked(True)
|
||||
elif self.json["theme_color"] == "Blue":
|
||||
self.ui.Theme_Blue.setChecked(True)
|
||||
elif self.json["theme_color"] == "Custom":
|
||||
elif os.path.exists(self.json["theme_color"]):
|
||||
self.ui.Theme_Customize.setChecked(True)
|
||||
|
||||
def init_control(self):
|
||||
@@ -213,12 +210,12 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.ui.Language_Traditional_Chinese.clicked.connect(self.init_change_lang)
|
||||
self.ui.Language_Simplified_Chinese.clicked.connect(self.init_change_lang)
|
||||
self.ui.Language_English.clicked.connect(self.init_change_lang)
|
||||
self.ui.Theme_White.clicked.connect(self.change_theme)
|
||||
self.ui.Theme_Customize.clicked.connect(self.change_theme)
|
||||
self.ui.Theme_Green.clicked.connect(self.change_theme)
|
||||
self.ui.Theme_Yellow.clicked.connect(self.change_theme)
|
||||
self.ui.Theme_Blue.clicked.connect(self.change_theme)
|
||||
self.ui.Theme_Red.clicked.connect(self.change_theme)
|
||||
self.ui.Theme_White.clicked.connect(self.init_theme_color)
|
||||
self.ui.Theme_Customize.clicked.connect(self.init_theme_color)
|
||||
self.ui.Theme_Green.clicked.connect(self.init_theme_color)
|
||||
self.ui.Theme_Yellow.clicked.connect(self.init_theme_color)
|
||||
self.ui.Theme_Blue.clicked.connect(self.init_theme_color)
|
||||
self.ui.Theme_Red.clicked.connect(self.init_theme_color)
|
||||
|
||||
def init_config_qtui(self):
|
||||
self.ui.widget_2.lower()
|
||||
@@ -352,64 +349,50 @@ class MainWindow_Controller(QMainWindow):
|
||||
|
||||
def init_theme_color(self):
|
||||
try:
|
||||
if self.json["theme_color"] == "White":
|
||||
if self.ui.Theme_White.isChecked():
|
||||
self.json["theme_color"] = "White"
|
||||
self.ui.State_icon.setPixmap(QPixmap(":/icon/Check.png"))
|
||||
self.ui.Window_widget.setStyleSheet("QWidget#Window_widget {background-color:rgb(240,240,240);}")
|
||||
self.ui.Navigation_Bar.setStyleSheet("QWidget#Navigation_Bar {background-color:rgb(230,230,230);}")
|
||||
elif self.json["theme_color"] == "Red":
|
||||
elif self.ui.Theme_Red.isChecked():
|
||||
self.json["theme_color"] = "Red"
|
||||
self.ui.State_icon.setPixmap(QPixmap(":/icon/Check.png"))
|
||||
self.ui.Window_widget.setStyleSheet("QWidget#Window_widget {background-color:rgb(250,230,230);}")
|
||||
self.ui.Navigation_Bar.setStyleSheet("QWidget#Navigation_Bar {background-color:rgb(250,220,220);}")
|
||||
elif self.json["theme_color"] == "Yellow":
|
||||
self.ui.State_icon.setPixmap(QPixmap(":/icon/Check.png"))
|
||||
self.ui.Window_widget.setStyleSheet("QWidget#Window_widget {background-color:rgb(250,250,230);}")
|
||||
self.ui.Navigation_Bar.setStyleSheet("QWidget#Navigation_Bar {background-color:rgb(250,250,220);}")
|
||||
elif self.json["theme_color"] == "Green":
|
||||
elif self.ui.Theme_Green.isChecked():
|
||||
self.json["theme_color"] = "Green"
|
||||
self.ui.State_icon.setPixmap(QPixmap(":/icon/Check.png"))
|
||||
self.ui.Window_widget.setStyleSheet("QWidget#Window_widget {background-color:rgb(230,250,230);}")
|
||||
self.ui.Navigation_Bar.setStyleSheet("QWidget#Navigation_Bar {background-color:rgb(220,250,220);}")
|
||||
elif self.json["theme_color"] == "Blue":
|
||||
elif self.ui.Theme_Blue.isChecked():
|
||||
self.json["theme_color"] = "Blue"
|
||||
self.ui.State_icon.setPixmap(QPixmap(":/icon/Check.png"))
|
||||
self.ui.Window_widget.setStyleSheet("QWidget#Window_widget {background-color:rgb(230,250,250);}")
|
||||
self.ui.Navigation_Bar.setStyleSheet("QWidget#Navigation_Bar {background-color:rgb(220,250,250);}")
|
||||
elif self.json["theme_color"] == "Custom":
|
||||
with open(os.path.join(self.json["theme_custom"],"Color.ini"), "r") as f:
|
||||
elif self.ui.Theme_Yellow.isChecked():
|
||||
self.json["theme_color"] = "Yellow"
|
||||
self.ui.State_icon.setPixmap(QPixmap(":/icon/Check.png"))
|
||||
self.ui.Window_widget.setStyleSheet("QWidget#Window_widget {background-color:rgb(250,250,230);}")
|
||||
self.ui.Navigation_Bar.setStyleSheet("QWidget#Navigation_Bar {background-color:rgb(250,250,220);}")
|
||||
elif self.ui.Theme_Customize.isChecked():
|
||||
if not os.path.exists(os.path.join(self.json["theme_color"],"Color.ini")):
|
||||
path = str(QFileDialog.getExistingDirectory(self,self.trans("自定主題"),"C:/"))
|
||||
if path and os.path.exists(os.path.join(path,"Color.ini")):
|
||||
self.json["theme_color"] = path
|
||||
with open(os.path.join(self.json["theme_color"],"Color.ini"), "r") as f:
|
||||
self.themecolor = [line.strip() for line in f.readlines()]
|
||||
self.ui.Window_widget.setStyleSheet(self.themecolor[0])
|
||||
self.ui.Navigation_Bar.setStyleSheet(self.themecolor[1])
|
||||
file = os.path.join(self.json["theme_custom"],"Check.png")
|
||||
file = os.path.join(self.json["theme_color"],"Check.png")
|
||||
self.ui.State_icon.setPixmap(QPixmap(file))
|
||||
self.write_config(self.json)
|
||||
except:
|
||||
self.ui.Theme_White.setChecked(True)
|
||||
self.json["theme_color"] = "White"
|
||||
self.ui.State_icon.setPixmap(QPixmap(":/icon/Check.png"))
|
||||
self.ui.Window_widget.setStyleSheet("QWidget#Window_widget {background-color:rgb(240,240,240);}")
|
||||
self.ui.Navigation_Bar.setStyleSheet("QWidget#Navigation_Bar {background-color:rgb(230,230,230);}")
|
||||
|
||||
def read_custom_theme(self):
|
||||
try:
|
||||
path = str(QFileDialog.getExistingDirectory(self,self.trans("自定主題"),"C:/"))
|
||||
if os.path.exists(os.path.join(path,"Color.ini")):
|
||||
self.json["theme_custom"] = path
|
||||
except:
|
||||
pass
|
||||
|
||||
def change_theme(self):
|
||||
if self.ui.Theme_White.isChecked():
|
||||
self.json["theme_color"] = "White"
|
||||
elif self.ui.Theme_Red.isChecked():
|
||||
self.json["theme_color"] = "Red"
|
||||
elif self.ui.Theme_Green.isChecked():
|
||||
self.json["theme_color"] = "Green"
|
||||
elif self.ui.Theme_Yellow.isChecked():
|
||||
self.json["theme_color"] = "Yellow"
|
||||
elif self.ui.Theme_Blue.isChecked():
|
||||
self.json["theme_color"] = "Blue"
|
||||
elif self.ui.Theme_Customize.isChecked():
|
||||
self.read_custom_theme()
|
||||
self.json["theme_color"] = "Custom"
|
||||
self.write_config(self.json)
|
||||
self.init_theme_color()
|
||||
|
||||
def change_animation(self,widget):
|
||||
x, y = 170, widget.pos().y()
|
||||
self.anim = QPropertyAnimation(widget, b"geometry")
|
||||
@@ -607,6 +590,8 @@ class MainWindow_Controller(QMainWindow):
|
||||
self.timer = QTimer()
|
||||
self.timer.timeout.connect(update_opacity)
|
||||
self.timer.start(2)
|
||||
self.init_change_lang()
|
||||
self.init_theme_color()
|
||||
|
||||
def init_hide_pyas(self):
|
||||
def update_opacity():
|
||||
@@ -904,8 +889,10 @@ class MainWindow_Controller(QMainWindow):
|
||||
elif label and "White" not in label:
|
||||
if self.json["high_sensitive"]:
|
||||
return label
|
||||
elif level and level >= 0.9:
|
||||
elif level and level >= 1.0:
|
||||
return label
|
||||
elif self.rule_scan(file):
|
||||
return "Rules"
|
||||
elif self.json["high_sensitive"]:
|
||||
if self.rule_scan(file):
|
||||
return "Rules"
|
||||
@@ -916,15 +903,19 @@ class MainWindow_Controller(QMainWindow):
|
||||
def pe_scan(self, file):
|
||||
try:
|
||||
fn = []
|
||||
with pefile.PE(file) as pe:
|
||||
with pefile.PE(file, fast_load=True) as pe:
|
||||
pe.parse_data_directories(directories=[pefile.DIRECTORY_ENTRY['IMAGE_DIRECTORY_ENTRY_IMPORT']])
|
||||
for entry in pe.DIRECTORY_ENTRY_IMPORT:
|
||||
for func in entry.imports:
|
||||
try:
|
||||
fn.append(str(func.name, "utf-8"))
|
||||
except:
|
||||
pass
|
||||
QApplication.processEvents()
|
||||
return self.pe.predict(fn)
|
||||
if func.name:
|
||||
try:
|
||||
fn.append(str(func.name, "utf-8"))
|
||||
except:
|
||||
pass
|
||||
if fn:
|
||||
QApplication.processEvents()
|
||||
return self.pe.predict(fn)
|
||||
return False, False
|
||||
except:
|
||||
return False, False
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import pyinstaller_versionfile
|
||||
|
||||
pyinstaller_versionfile.create_versionfile(
|
||||
output_file="versionfile.txt",
|
||||
version='3.1.2',
|
||||
version='3.1.3',
|
||||
company_name="PYAS Security",
|
||||
file_description="Python Antivirus Software",
|
||||
internal_name="PYAS",
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user