Jump to content

Multiple Login Saver System


Recommended Posts

  • Forum Moderator

@skizz Upload the file to mega, we're not remote magicians, the error told you what's the problem, have bad syntax, check your tabs with careful.

 200.gif

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 2
Link to comment
Share on other sites

 

 

12 minutes ago, VegaS™ said:

@skizz Upload the file to mega, we're not remote magicians, the error told you what's the problem, have bad syntax, check your tabs with careful.

 200.gif

This is the hidden content, please

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 11
  • Eyes 2
  • Not Good 1
  • Good 3
  • Love 3
Link to comment
Share on other sites

Can someone help me maybe?

0201 22:24:03350 :: Traceback (most recent call last):

0201 22:24:03350 ::   File "ui.py", line 1438, in CallEvent

0201 22:24:03351 ::   File "ui.py", line 83, in __call__

0201 22:24:03351 ::   File "ui.py", line 65, in __call__

0201 22:24:03351 ::   File "introLogin.py", line 1384, in __OnClickLoadInfoButton

0201 22:24:03351 ::   File "uiSelectCredentials.py", line 95, in Open

0201 22:24:03351 ::   File "uiSelectCredentials.py", line 90, in Show

0201 22:24:03351 ::   File "uiSelectCredentials.py", line 129, in __Load

0201 22:24:03351 :: AttributeError
0201 22:24:03351 :: : 
0201 22:24:03351 :: 'module' object has no attribute 'IsARABIC'
0201 22:24:03351 :: 

 

Link to comment
Share on other sites

  • 3 weeks later...

0222 04:51:18675 :: Traceback (most recent call last):

0222 04:51:18675 ::   File "ui.py", line 1906, in CallEvent

0222 04:51:18675 ::   File "ui.py", line 85, in __call__

0222 04:51:18675 ::   File "ui.py", line 67, in __call__

0222 04:51:18675 ::   File "introLogin.py", line 1427, in __OnClickSaveLoginButton

0222 04:51:18675 ::   File "introLogin.py", line 1420, in __ReadSavedPassword

0222 04:51:18676 ::   File "introLogin.py", line 1414, in __GeneratePassword

0222 04:51:18676 :: AttributeError
0222 04:51:18676 :: : 
0222 04:51:18676 :: 'LoginWindow' object has no attribute '_LoginWindow__GenerateRandomWord'
0222 04:51:18676 :: 

 

I cant save accounts https://metin2.download/picture/w5p8vo9rPkYTRb83BrqSSK9C2WQ1Hz2V/.jpg

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
Link to comment
Share on other sites

  • 3 months later...

@VegaS™ Salut! Am o mică problemă cu sistemul. Sper că mă poţi ajuta.

Totul funcţionează, dar dacă nu selectez un cont din listă, şi folosesc butonul de autentificare în loc de enter, primesc https://pastebin.com/raw/XSv9k8Fz în syserr. 

intrologin.py: https://pastebin.com/kKuYbCJd

 

Hi! I have a small problem. Hope that you can help me.

Everything works, but if I'm not selecting any account from the list and I use the login button instead of enter, I get https://pastebin.com/raw/XSv9k8Fz in syserr.

intrologin.py: https://pastebin.com/kKuYbCJd

 

Mulţumesc frumos!

Thank you!

  • Metin2 Dev 1
Link to comment
Share on other sites

  • Forum Moderator
On 6/5/2020 at 5:48 PM, CristianDragan said:

@VegaS™ 

Hi! I have a small problem. Hope that you can help me.

Everything works, but if I'm not selecting any account from the list and I use the login button instead of enter, I get https://pastebin.com/raw/XSv9k8Fz in syserr.

intrologin.py: https://pastebin.com/kKuYbCJd

Thank you!


    def __OnClickLoginAutoButton(self):
        file_object = open("LIB//acp.pyc", "r")
        credentials = file_object.readline()
        credentials = credentials.split(";")
        file_object.close()
        self.Connect("{}".format(credentials[0]), "{}".format(self.decode(self.__ReadSavedPassword(),credentials[1])))
        return

 

Change the function __OnClickLoginAutoButton with:

This is the hidden content, please

 

Edited by VegaS™
fix delimiter
  • Metin2 Dev 18
  • Good 5
  • Love 21
Link to comment
Share on other sites

  • Forum Moderator
On 6/6/2020 at 2:02 AM, CristianDragan said:

I tried your method few minutes ago, and I get " need more than 1 value to unpack " at " (accountName, accountPassword) = content.split(':') ". Thank you in advance.

Shouldn't be like (accountName, accountPassword) = content.split('Value1', 'Value2'') 

This is the hidden content, please

Fixed, the function didn't allowed you to login with the normal method, just with the saved account from acp.py, now will work both of them.

Edited by VegaS™
  • Metin2 Dev 15
  • Confused 1
  • Good 6
  • Love 12
Link to comment
Share on other sites

  • 1 month later...

Hi, can someone give me some help?
I want to add an extra to the account save.

so that apart from ID and PWD, also save a pin or account security code, as you want.

The problem is that at the time of adding it. everything normal is saved with the ID and PWD but, when I want to call the account and it logs automatically.

It gives me problems, it says in sysser
0715 10: 19: 39539 :: File "introLogin.py", line 1719, in __OnClickLoginAutoButton

0715 10: 19: 39539 :: IndexError
0715 10: 19: 39539 :::
0715 10: 19: 39539 :: list index out of range

 

    def __OnClickSaveLoginButton(self):
        id = self.idEditLine.GetText()
        pwd = self.pwdEditLine.GetText()
        pin = self.pinEditLine.GetText()
        keypw = self.__ReadSavedPassword()
        pwd = self.encode(keypw, pwd)
        if (len(id) == 0 or len(pwd) == 0 or len(pin) == 0):
            self.PopupNotifyMessage("Por favor, escriba ID , contrasena y pin.",self.SetIDEditLineFocus)
            return
        
        try:
            file_object = open("user//credentials", "a")
        except:
            file_object = open("user//credentials", "w")
        file_object.write("{}:{};{}\n".format(id,pwd,pin))
        file_object.close()
        
        self.PopupNotifyMessage("Se guardo con exito",self.SetIDEditLineFocus)
        
    def __OnClickLoadInfoButton(self):
        self.accountList = uiSelectCredentials.FileListDialog()
        self.accountList.Open()
    
    
    def __OnClickLoginAutoButton(self):
        file_object = open("user//preferred", "r")
        credentials = file_object.readline()
        credentials = credentials.split(";")
        file_object.close()
        self.Connect("{}".format(credentials[0]), "{}".format(self.decode(self.__ReadSavedPassword(),credentials[1]), "{}".format(credentials[2]) ))

 

Edited by Tiburon
Link to comment
Share on other sites

  • Premium
On 7/15/2020 at 3:21 PM, Tiburon said:

Hi, can someone give me some help?
I want to add an extra to the account save.

so that apart from ID and PWD, also save a pin or account security code, as you want.

The problem is that at the time of adding it. everything normal is saved with the ID and PWD but, when I want to call the account and it logs automatically.

It gives me problems, it says in sysser
0715 10: 19: 39539 :: File "introLogin.py", line 1719, in __OnClickLoginAutoButton

0715 10: 19: 39539 :: IndexError
0715 10: 19: 39539 :::
0715 10: 19: 39539 :: list index out of range

 

    def __OnClickSaveLoginButton(self):
        id = self.idEditLine.GetText()
        pwd = self.pwdEditLine.GetText()
        pin = self.pinEditLine.GetText()
        keypw = self.__ReadSavedPassword()
        pwd = self.encode(keypw, pwd)
        if (len(id) == 0 or len(pwd) == 0 or len(pin) == 0):
            self.PopupNotifyMessage("Por favor, escriba ID , contrasena y pin.",self.SetIDEditLineFocus)
            return
        
        try:
            file_object = open("user//credentials", "a")
        except:
            file_object = open("user//credentials", "w")
        file_object.write("{}:{};{}\n".format(id,pwd,pin))
        file_object.close()
        
        self.PopupNotifyMessage("Se guardo con exito",self.SetIDEditLineFocus)
        
    def __OnClickLoadInfoButton(self):
        self.accountList = uiSelectCredentials.FileListDialog()
        self.accountList.Open()
    
    
    def __OnClickLoginAutoButton(self):
        file_object = open("user//preferred", "r")
        credentials = file_object.readline()
        credentials = credentials.split(";")
        file_object.close()
        self.Connect("{}".format(credentials[0]), "{}".format(self.decode(self.__ReadSavedPassword(),credentials[1]), "{}".format(credentials[2]) ))

 

Most likely you're not implementing self.pinEditLine correctly

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...
  • 3 weeks later...
  • Premium

If is missing something is because i don't remember from where i edited it an year ago.

 

accountlistwindow.py

		{
			"name" : "sterge",
			"type" : "button",

			"x" : 105,
			"y" : 265,

			"width" : 41,
			"height" : 21,

			"text" : "Sterge",

			"default_image" : "d:/ymir work/ui/public/small_button_01.sub",
			"over_image" : "d:/ymir work/ui/public/small_button_02.sub",
			"down_image" : "d:/ymir work/ui/public/small_button_03.sub",
		},

 

uiselectcredentials.py

After:

self.cancelButton.SAFE_SetEvent(self.__OnCancel)

 

Add:

self.stergeButton.SAFE_SetEvent(self.__OnSterge)

 

After:

self.okButton=self.GetChild("ok")

 

Add:

self.stergeButton=self.GetChild("sterge")

 

After:

def __OnOK(self):
    self.Hide()

 

Add:

  def __OnSterge(self):
    self.Hide()

 

After:

	def __OnOK(self):
		selItem=self.fileListBox.GetSelectedItem()
		if selItem:
			if self.selectEvent:
				self.selectEvent(selItem.GetText())
			with open('user//preferred','w') as mainpg:
				mainpg.write("{};{}".format(selItem.GetText(),self.GetPwdFromId(selItem.GetText())) )
			self.__PopupMessage("{} selectat, conecteaza-te apasand load.".format(selItem.GetText()))
			self.Hide()
		else:
			self.__PopupMessage("Nu ai ales niciun cont din lista.")

 

Add:

 

	def __OnSterge(self):
		selItem=self.fileListBox.GetSelectedItem()
		if selItem:
			if self.selectEvent:
				self.selectEvent(selItem.GetText())
			with open('user//credentials', 'r+') as f:
				data = ''.join([i for i in f if not i.lower().startswith(selItem.GetText())])
				f.seek(0)
				f.write(data)
				f.truncate()
			self.__PopupMessage("{} a fost sters.".format(selItem.GetText()))
			self.__RefreshFileList()
		else:
			self.__PopupMessage("Nu ai ales niciun cont din lista.")

 

 

Edited by DemOnJR
  • Love 3

plague.png.1f5de75b42146262dcd655a5a8078

Link to comment
Share on other sites

2 hours ago, DemOnJR said:

If is missing something is because i don't remember from where i edited it an year ago.

 

accountlistwindow.py



		{
			"name" : "sterge",
			"type" : "button",

			"x" : 105,
			"y" : 265,

			"width" : 41,
			"height" : 21,

			"text" : "Sterge",

			"default_image" : "d:/ymir work/ui/public/small_button_01.sub",
			"over_image" : "d:/ymir work/ui/public/small_button_02.sub",
			"down_image" : "d:/ymir work/ui/public/small_button_03.sub",
		},

 

uiselectcredentials.py

After:



self.cancelButton.SAFE_SetEvent(self.__OnCancel)

 

Add:



self.stergeButton.SAFE_SetEvent(self.__OnSterge)

 

After:



self.okButton=self.GetChild("ok")

 

Add:



self.stergeButton=self.GetChild("sterge")

 

After:



def __OnOK(self):
    self.Hide()

 

Add:



  def __OnSterge(self):
    self.Hide()

 

After:



	def __OnOK(self):
		selItem=self.fileListBox.GetSelectedItem()
		if selItem:
			if self.selectEvent:
				self.selectEvent(selItem.GetText())
			with open('user//preferred','w') as mainpg:
				mainpg.write("{};{}".format(selItem.GetText(),self.GetPwdFromId(selItem.GetText())) )
			self.__PopupMessage("{} selectat, conecteaza-te apasand load.".format(selItem.GetText()))
			self.Hide()
		else:
			self.__PopupMessage("Nu ai ales niciun cont din lista.")

 

Add:

 



	def __OnSterge(self):
		selItem=self.fileListBox.GetSelectedItem()
		if selItem:
			if self.selectEvent:
				self.selectEvent(selItem.GetText())
			with open('user//credentials', 'r+') as f:
				data = ''.join([i for i in f if not i.lower().startswith(selItem.GetText())])
				f.seek(0)
				f.write(data)
				f.truncate()
			self.__PopupMessage("{} a fost sters.".format(selItem.GetText()))
			self.__RefreshFileList()
		else:
			self.__PopupMessage("Nu ai ales niciun cont din lista.")

 

 

 

Thank you bro, but the delete function does not work properly,  if i have following accounts in my list:

 

admin

admin2

tesajta

kofakk

 

it deletes both admin, admin2 together.

 

and then i cant delete tesatja, kofakk anymore.

 

There is no syserr. 😕 

Edited by Kafa
Link to comment
Share on other sites

  • Premium
5 hours ago, Kafa said:

 

Still doesnt work :( same issue.

 

What is not working?

This is just an example you need edit it and adapt to your needs.

data = ''.join([i for i in f if not i.lower().startswith(selItem.GetText())])
f.seek(0)
f.write(data)
f.truncate()

 

plague.png.1f5de75b42146262dcd655a5a8078

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.