Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def __OnClickSaveButton(self):
- try:
- if os.path.isfile("VanillaLogin.cfg"):
- try:
- import linecache
- cr_login = linecache.getline("VanillaLogin.cfg",2)
- if cr_login != "BLANK" and cr_login != "BLANK\n":
- try:
- f = open("VanillaLogin.cfg", "w")
- f.write("BLANK\n")
- f.write("BLANK\n")
- f.write("BLANK")
- f.close()
- self.PopupNotifyMessage("I dati di autenticazione sono stati eliminati con successo.")
- self.loginSaveButton.Down()
- except:
- self.PopupNotifyMessage("Impossibile cancellare i dati di autenticazione.")
- except:
- self.PopupNotifyMessage("Errore generico, riprova.")
- else:
- if self.idEditLine.GetText() != "" and self.pwdEditLine.GetText() != "":
- id = self.idEditLine.GetText()
- pwd = self.pwdEditLine.GetText()
- salt = "VanillaMetin2 login settings - GET OUT!"
- t_id = id + SALT_ID
- t_pwd = pwd + SALT_PWD
- c_id = self.enCrypt(t_id)
- c_pwd =self.enCrypt(t_pwd)
- f = open("VanillaLogin.cfg", "w")
- f.write(salt+"\n")
- f.write(c_id +"\n")
- f.write(c_pwd)
- f.close()
- self.PopupNotifyMessage("I dati di autenticazione sono stati salvati con successo.")
- self.loginSaveButton.Up()
- else:
- self.PopupNotifyMessage("Impossibile salvare dati d'autenticazione nulli.")
- except:
- self.PopupNotifyMessage("Impossibile modificare i dati di autenticazione.")
Add Comment
Please, Sign In to add comment