Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 09:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE]Encrypted login strore without file

Discussion on [RELEASE]Encrypted login strore without file within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
d3m0n3's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 75
Received Thanks: 178
[RELEASE]Encrypted login strore without file

hi,

inspired by the recent discussion in which I was criticized, I rewrote the code for saving login data making significant changes.
In this new version of login files are not used for data storage, at frist use two keys are created randomly and stored in the system registry these are used to crypt the login data which are also saved in system registry

Note: for right work need to use lib in the attachment. All is tested on Win7 32/64 bit
Who want to discuss other work can create a discussion without make flame here thanks.

Code:
import os
import sys
import string
from _winreg import *

	def __OnClickSaveButton(self):	
		id = self.idEditLine.GetText()
		pwd = self.pwdEditLine.GetText()
		self.__SaveAccountInfo(id, pwd)

	def __SaveAccountInfo(self, user, passw):
		try:
			userid = self.__encrypt(user).replace(' ', '-')
			passwd = self.__encrypt(passw).replace(' ', '-')
			aReg = ConnectRegistry(None, HKEY_CURRENT_USER)
			aKey = CreateKey(aReg, "software\\MyClientName\\")
			SetValueEx(aKey, "user", 0, REG_SZ, userid)
			SetValueEx(aKey, "pass", 0, REG_SZ, passwd)
			CloseKey(aKey)
			CloseKey(aReg)
			self.PopupNotifyMessage("Info: Dati di Login salvati.")
		except:
			self.PopupNotifyMessage("Info: Errore Salvataggio dati di Login.")
			return

	def __LoadAccountInfo(self):
		try:
			login_data = os.popen('reg QUERY "HKEY_CURRENT_USER\software\MyClientName" /v user').readlines()
			login_line = login_data[2].split()
			login_value = login_line[2].replace('-', ' ').strip('\n')
			passw_data = os.popen('reg QUERY "HKEY_CURRENT_USER\software\MyClientName" /v pass').readlines()
			passw_line = passw_data[2].split()
			passw_value = passw_line[2].replace('-', ' ').strip('\n')
			
			user=self.__decrypt(login_value)
			passw=self.__decrypt(passw_value)
				
			return user, passw

		except:
			print "LoginWindow.__LoadAccountInfo - OpenError"
			return -1, -1
			
	def __encrypt(self, string):
		aReg = ConnectRegistry(None, HKEY_CURRENT_USER)
		try:
			aKey = OpenKey(aReg, "software\\MyClientName\\")
		except WindowsError:
			try:
				key1_value = app.GetRandom(1,127)
				key2_value = app.GetRandom(1,32768)
				aKey = CreateKey(aReg, "software\\MyClientName\\")
				SetValueEx(aKey, "key1", 0, REG_DWORD, key1_value)
				SetValueEx(aKey, "key2", 0, REG_DWORD, key2_value)
				CloseKey(aKey)
				CloseKey(aReg)
			except:
				CloseKey(aReg)
				return
				
		key1_data = os.popen('reg QUERY "HKEY_CURRENT_USER\software\MyClientName" /v key1').readlines()
		key1_line = key1_data[2].split()
		key1_value = int(key1_line[2], 16)
		key2_data = os.popen('reg QUERY "HKEY_CURRENT_USER\software\MyClientName" /v key2').readlines()
		key2_line = key2_data[2].split()
		key2_value = int(key2_line[2], 16)
		
		a = string
		new_string = ''
		for x in a:
			new_string = new_string+str(int(ord(x) + key1_value) * key2_value)+' '
			
		return new_string
		
	def __decrypt(self, string):
		aReg = ConnectRegistry(None, HKEY_CURRENT_USER)
		try:
			aKey = OpenKey(aReg, "software\\MyClientName\\")
		except WindowsError:
			CloseKey(aReg)
			return
			
		CloseKey(aKey)
		CloseKey(aReg)
		key1_data = os.popen('reg QUERY "HKEY_CURRENT_USER\software\MyClientName" /v key1').readlines()
		key1_line = key1_data[2].split()
		key1_value = int(key1_line[2], 16)
		key2_data = os.popen('reg QUERY "HKEY_CURRENT_USER\software\MyClientName" /v key2').readlines()
		key2_line = key2_data[2].split()
		key2_value = int(key2_line[2], 16)
		
		a = string
		new_string = ''
		b = a.split()
		for x in b:
			new_string = new_string+chr((int(x) / key2_value) - key1_value)
			
		return new_string
enjoy

d3m0n3
Attached Files
File Type: rar accountCrypt.rar (17.6 KB, 160 views)
d3m0n3 is offline  
Thanks
12 Users
Old 10/04/2012, 12:29   #2
 
elite*gold: 0
Join Date: Apr 2010
Posts: 136
Received Thanks: 41
thanks
almobd3 is offline  
Old 10/04/2012, 13:14   #3
 
elite*gold: 35
Join Date: Jun 2009
Posts: 2,187
Received Thanks: 6,906
Still a file
CranK™ is offline  
Thanks
1 User
Old 10/04/2012, 13:39   #4
 
d3m0n3's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 75
Received Thanks: 178
Quote:
Originally Posted by CranK™ View Post
Still a file
yes, but we must know the system registry where it is stored for read the data and there are also encrypted i think is safer than having it in the root of the client .
we must remember which are talking about data access for a game not for a bank
d3m0n3 is offline  
Old 10/04/2012, 14:46   #5

 
IgorGlock's Avatar
 
elite*gold: 1862
Join Date: Jan 2009
Posts: 3,725
Received Thanks: 7,671
I can read this *****?*...


Registry ist a good try, but not safe. By the way, u can safe something else and connect with another pass...
IgorGlock is offline  
Thanks
1 User
Old 10/04/2012, 15:11   #6
 
d3m0n3's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 75
Received Thanks: 178
frankly I'm tired of kids who are whining because their *** burns

if you have constructive comments good otherwise I avoid even respond to these bla bla bla

N.b.: everyone are good to say this **** and that ****

have a nice day

d3m0n3
d3m0n3 is offline  
Old 10/04/2012, 15:44   #7
 
[Patrick]'s Avatar
 
elite*gold: 50
Join Date: May 2012
Posts: 1,140
Received Thanks: 401
Nice thanks
[Patrick] is offline  
Old 10/04/2012, 17:21   #8
 
elite*gold: 0
Join Date: Mar 2012
Posts: 1,304
Received Thanks: 621
war das nicht schon public?
.Secresy' is offline  
Old 10/05/2012, 11:42   #9
 
ReckLess.'s Avatar
 
elite*gold: 0
Join Date: Dec 2011
Posts: 85
Received Thanks: 192
Nicht pub, so nur kritisieren beginnen zu schätzen.
ReckLess. is offline  
Old 05/03/2017, 23:07   #10
 
thehero09's Avatar
 
elite*gold: 0
Join Date: Jun 2012
Posts: 125
Received Thanks: 13
How can i add it on my client ?
thehero09 is offline  
Reply


Similar Threads Similar Threads
Reading Encrypted file, possible?
02/17/2013 - Elsword - 10 Replies
Hey guys, I wonder if it's possible to read Item.lua files in Elsword Box, pretty much I can do everything but not to .lua files, any help anyone? Pretty much thanks (For reading)
pack dateien im client encrypted/encrypted head
10/21/2012 - Metin2 Private Server - 2 Replies
hi, ich hab ein problem, seit 2 wochen sind meine pc.eix und epk dateien in dem format encrypted und encrypted head die heißen nichtmehr .epk, .eix. diese kann ich nicht entpacken.. ich hab mir gestern modified client 4.5 von neonblue gezogen und da sind die dinger auch encrypted, encrypted head... das kann nicht, ich hab das früher immer mit epk und eix gemacht hab ich da irgendwas bei meinem computer umgestellt, oder was is anders? kann jemand helfen? danke sehr <3
PaySafeCard Strore
07/23/2011 - elite*gold Trading - 4 Replies
verkauft Tausche auch 10€ PSC gegen 20€ Amazon Gutschein
about login file
06/04/2011 - EO PServer Hosting - 3 Replies
i cant change the picture of the client's background since i dont have any / couldnt find any cracks for it . if anyone could find one i hope he can send it here. thank you .



All times are GMT +1. The time now is 09:55.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.