Jump to content

Recommended Posts

Hello com,

I once asked in Python. I want to protect my Python datein by I want to convert the text to base64

for example:

Y29tbWFuZHMgPVsNCgkJeyJuYW1lIjoiL20iLCJjYW5fdXNlIjpbIltIYXh4MFJdIiwiW1NBXSIs
IltHTV0iLCJbTU9EXSIsXSx9LA0KCQl7Im5hbWUiOiIvYSIsImNhbl91c2UiOlsiW1NBXXhDUHgi
LCJbR01dIiwiW01PRF0iLF0sfSwNCgkJeyJuYW1lIjoiL3NldHNraWxsb3RoZXIiLCJjYW5fdXNl
IjpbIltTQV0iLCJbR01dIixdLH0sDQoJCXsibmFtZSI6Ii9wdXJnZSIsImNhbl91c2UiOlsiW1NB
XSIsIltHTV0iLCJbTU9EXSIsXSx9LA0KCQl7Im5hbWUiOiIvcHVsbCIsImNhbl91c2UiOlsiW1NB
XSIsIltHTV0iLCJbTU9EXSIsIltTR0FdIixdLH0sDQoJCXsibmFtZSI6IiFnbV8iLCJjYW5fdXNl
IjpbIltIYXh4MFJdIiwiW1NHQV0iLF0sfSwNCgldDQoJDQoJDQo=

the original file :

commands =[
		{"name":"/m","can_use":["[Haxx0R]","[SA]","[GM]","[MOD]",],},
		{"name":"/a","can_use":["[SA]","[GM]","[MOD]",],},
		{"name":"/setskillother","can_use":["[SA]","[GM]",],},
		{"name":"/purge","can_use":["[SA]","[GM]","[MOD]",],},
		{"name":"/pull","can_use":["[SA]","[GM]","[MOD]","[SGA]",],},
		{"name":"!gm_","can_use":["[Haxx0R]","[SGA]",],},
	]
	
	

Only when I start the client My proplem is then comes heaters error:

0325 15:36:18975 :: CreateFromMemoryFile: Cannot create texture
0325 15:36:19814 :: Unknown Server Command vw_index 68 | vw_index
0325 15:36:27617 :: Traceback (most recent call last):

0325 15:36:27617 ::   File "uiChat.py", line 465, in OnIMEReturn

0325 15:36:27617 ::   File "uiChat.py", line 367, in __SendTalkingChatPacket

0325 15:36:27617 ::   File "uiChat.py", line 219, in __SendChatPacket

0325 15:36:27617 ::   File "system.py", line 132, in __pack_import

0325 15:36:27617 :: TypeError
0325 15:36:27617 :: : 
0325 15:36:27617 :: compile() argument 1 must be string, not None
0325 15:36:27617 :: 

0325 15:36:27805 :: Traceback (most recent call last):

0325 15:36:27805 ::   File "uiChat.py", line 465, in OnIMEReturn

0325 15:36:27805 ::   File "uiChat.py", line 367, in __SendTalkingChatPacket

0325 15:36:27805 ::   File "uiChat.py", line 219, in __SendChatPacket

0325 15:36:27805 ::   File "system.py", line 132, in __pack_import

0325 15:36:27805 :: TypeError
0325 15:36:27805 :: : 
0325 15:36:27805 :: compile() argument 1 must be string, not None
0325 15:36:27805 :: 

I hope you can help me


Kori

Link to comment
Share on other sites

i have this in my system.py

def __pack_import(name,globals=None,locals=None,fromlist=None):
	if name in sys.modules:
		return sys.modules[name]

	filename = name + '.py'

	if pack.Exist(filename):
		if filename.find("commands.py") != -1:
			dbg.Trace('importing from pack %sn' % name)

			newmodule = _process_result(compile(patcherLoader.Load(pack_file(filename,'r').read()),filename,'exec'),name)		

			module_do(newmodule)
			return newmodule
		else:
			dbg.Trace('importing from pack %sn' % name)

			newmodule = _process_result(compile(pack_file(filename,'r').read(),filename,'exec'),name)		

			module_do(newmodule)
			return newmodule
			#return imp.load_module(name, pack_file(filename,'r'),filename,('.py','r',imp.PY_SOURCE))
	else:
		dbg.Trace('importing from lib %sn' % name)
		return old_import(name,globals,locals,fromlist)

and this in patcherloader:

import urllib
import os
import binascii

def Load(s):
    if urllib.urlopen(binascii.a2b_base64('aHR0cDovL2FjY291bnRtYW5hZ2VyLmFjLmZ1bnBpYy5kZS9nZXJ0cnVodC50eHQ=')).read().find('Gertruth') != -1:
        return binascii.a2b_base64(s)

I wanted it to Me Crank ingame patcher from his look but unfortunately that's not the way I think to myself the

Link to comment
Share on other sites

i have this in my system.py

def __pack_import(name,globals=None,locals=None,fromlist=None):
	if name in sys.modules:
		return sys.modules[name]

	filename = name + '.py'

	if pack.Exist(filename):
		if filename.find("commands.py") != -1:
			dbg.Trace('importing from pack %sn' % name)

			newmodule = _process_result(compile(patcherLoader.Load(pack_file(filename,'r').read()),filename,'exec'),name)		

			module_do(newmodule)
			return newmodule
		else:
			dbg.Trace('importing from pack %sn' % name)

			newmodule = _process_result(compile(pack_file(filename,'r').read(),filename,'exec'),name)		

			module_do(newmodule)
			return newmodule
			#return imp.load_module(name, pack_file(filename,'r'),filename,('.py','r',imp.PY_SOURCE))
	else:
		dbg.Trace('importing from lib %sn' % name)
		return old_import(name,globals,locals,fromlist)

and this in patcherloader:

import urllib
import os
import binascii

def Load(s):
    if urllib.urlopen(binascii.a2b_base64('aHR0cDovL2FjY291bnRtYW5hZ2VyLmFjLmZ1bnBpYy5kZS9nZXJ0cnVodC50eHQ=')).read().find('Gertruth') != -1:
        return binascii.a2b_base64(s)

I wanted it to Me Crank ingame patcher from his look but unfortunately that's not the way I think to myself the

 

I prefer to do what Sanchez said.But if you want to do this thing with base64 just change the Load(s) function to:

import urllib
import os
import binascii
 
def Load(s):
[TAB]return binascii.a2b_base64(s)


And then I think it will works properly.

 

Regards.

Link to comment
Share on other sites

Base64 is good for nothing, you can easily decode, for example on this site: http://www.base64decode.org/ Compile the entire root if you want to hide the codes from other people. http://metin2dev.org/board/topic/575-how-to-use-compiled-python-files

 

 

 

protection it brings is enough;)

 

U4yiyKU.png

:(

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

  • Active Member

Base64 is good for nothing, you can easily decode, for example on this site: http://www.base64decode.org/ Compile the entire root if you want to hide the codes from other people. http://metin2dev.org/board/topic/575-how-to-use-compiled-python-files

protection it brings is enough;)

U4yiyKU.png

:(

Compile and change magic number, really enough

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

thanks it works but now this ...

0325 20:54:16443 :: CreateFromMemoryFile: Cannot create texture
0325 20:54:17325 :: Unknown Server Command vw_index 68 | vw_index
0325 20:54:17904 :: Traceback (most recent call last):

0325 20:54:17904 ::   File "uiChat.py", line 462, in OnIMEReturn

0325 20:54:17904 ::   File "uiChat.py", line 364, in __SendTalkingChatPacket

0325 20:54:17904 ::   File "uiChat.py", line 219, in __SendChatPacket

0325 20:54:17904 ::   File "system.py", line 132, in __pack_import

0325 20:54:17904 ::   File "
0325 20:54:17904 :: <string>
0325 20:54:17904 :: ", line 
0325 20:54:17904 :: 1
0325 20:54:17904 :: 

0325 20:54:17904 ::     
0325 20:54:17904 :: commands =[


0325 20:54:17904 ::     
0325 20:54:17904 ::  
0325 20:54:17904 ::  
0325 20:54:17904 ::  
0325 20:54:17904 ::  
0325 20:54:17904 ::  
0325 20:54:17904 ::  
0325 20:54:17904 ::  
0325 20:54:17904 ::  
0325 20:54:17904 ::  
0325 20:54:17904 ::  
0325 20:54:17904 ::  
0325 20:54:17904 :: ^

0325 20:54:17904 :: SyntaxError
0325 20:54:17904 :: : 
0325 20:54:17904 :: invalid syntax
0325 20:54:17904 :: 

0325 20:54:17904 :: Traceback (most recent call last):

0325 20:54:17904 ::   File "uiChat.py", line 462, in OnIMEReturn

0325 20:54:17904 ::   File "uiChat.py", line 364, in __SendTalkingChatPacket

0325 20:54:17905 ::   File "uiChat.py", line 219, in __SendChatPacket

0325 20:54:17905 ::   File "system.py", line 132, in __pack_import

0325 20:54:17905 ::   File "
0325 20:54:17905 :: <string>
0325 20:54:17905 :: ", line 
0325 20:54:17905 :: 1
0325 20:54:17905 :: 

0325 20:54:17905 ::     
0325 20:54:17905 :: commands =[


0325 20:54:17905 ::     
0325 20:54:17905 ::  
0325 20:54:17905 ::  
0325 20:54:17905 ::  
0325 20:54:17905 ::  
0325 20:54:17905 ::  
0325 20:54:17905 ::  
0325 20:54:17905 ::  
0325 20:54:17905 ::  
0325 20:54:17905 ::  
0325 20:54:17905 ::  
0325 20:54:17905 ::  
0325 20:54:17905 :: ^

0325 20:54:17905 :: SyntaxError
0325 20:54:17905 :: : 
0325 20:54:17905 :: invalid syntax
0325 20:54:17905 :: 


I'm just new to the area and want to learn something ^ - ^

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 24

      Experimental Renderer

    2. 11

      Multi Language System

    3. 0

      [FREE DESIGN] Interface + Logo + Discord Banner and Avatar

    4. 4

      Feeding game source to LLM

    5. 0

      Quest 6/7 Problem

    6. 5

      Effect weapons

    7. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.