Jump to content

Recommended Posts

Hey,

 

Does anybody know, which magic number do a fresh compiled binary from the mainline_sg branch use? I looked for the python.dll, they py version is 2.7.3, so i downloaded python 2.7.3 and compiled the pyc files from the python source, but still the bad magic number error appears. Also i thought the SG libs could work, they didn't.

 

When i use the lib folder from the extern folder, the client does work, yes, but than the client load's the py files and not the pyc files, the pyc files from Extern also have a bad magic, and everyone should see that it isn't the best idea to use py files which get loaded by the binary, cause if the binary use the py files it's more than easy to execute python code, like pythonbots / python extractor etc.

  • Love 2
Link to comment
Share on other sites

  • Premium

The binary does not contains any magic number and the magic number is equal with the first 4 byte in the pyc files. If you want to change the magic number, then you just need to change in the python22.dll/python27.dll and of course in the pyc files.

 

DLL: 

 

7DfxS.png

 

PYC:

 

7Dfzr.png

 

 

the default magic number in 2.2:

2D ED 0D 0A

in 2.7:

03 F3 0D 0A
Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
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



×
×
  • 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.