PyLoader (Python 2.7)

05/24/2016 23:21 MasterGamer1#16
0524 23:21:19252 :: Traceback (most recent call last):

0524 23:21:19252 :: File "<string>", line 1, in <module>

0524 23:21:19252 :: File "system.py", line 163, in __hybrid_import

0524 23:21:19252 :: ImportError
0524 23:21:19252 :: :
0524 23:21:19252 :: Bad magic number in C:\Users\User\Downloads\Tsuyoshi2.0 - Client 1.2\m2kmod\__init__.pyc
0524 23:21:19252 ::
05/25/2016 09:01 maximus780#17
Quote:
Originally Posted by MasterGamer1 View Post
0524 23:21:19252 :: Traceback (most recent call last):

0524 23:21:19252 :: File "<string>", line 1, in <module>

0524 23:21:19252 :: File "system.py", line 163, in __hybrid_import

0524 23:21:19252 :: ImportError
0524 23:21:19252 :: :
0524 23:21:19252 :: Bad magic number in C:\Users\User\Downloads\Tsuyoshi2.0 - Client 1.2\m2kmod\__init__.pyc
0524 23:21:19252 ::
There is a problem with decompiling this file because as klo says it was compiled with different version of python (2.2) [Only registered and activated users can see links. Click Here To Register...] so I guess you have to wait till he releases updated version of his mod.
05/30/2016 15:17 schmifi96#18
Quote:
Originally Posted by 123klo View Post
try to open the file "syser.txt" of your metin2 client and post the content here. Anyway the latest m2kmod version wont work for 2.7 clients at the moment because they are only compiled for 2.2 client. But on 01.06 I will release an update for 2.7 and some other features.

the latest version of maximus780 works with m2kmod now (wait for the update next week)
Would be really nice want to start cheat at .sg
05/30/2016 20:02 _asm#19
Quote:
Originally Posted by 123klo View Post
it works with small scripts but when I try to execute longer scripts the client crashes. Any idea for a solution? the other public pyloader (v2.7) have the same problem.
hook mainthread in game routine (onupdate or onrender) and execute python code from there
05/30/2016 21:09 noahrmal#20
Quote:
Originally Posted by _asm View Post
hook mainthread in game routine (onupdate or onrender) and execute python code from there
first I have no idea how to implement it and secondly it is more difficult to make it work for every pserver client.
05/30/2016 22:48 _asm#21
will this community ever turn their brains on and finally do something right?
like seriously, this method of accessing the mainthread of the game routine is known for 6 years now and yet no one except some users who already left this board (probably because of it's stupidity) have contributed something to this section.

I'm not salty or directly saying this to you, everyone is meant and I'm not saying that because I'm any better than you guys. In fact, I just took the advice from the previous members.
it's just sad coming back here after 4 months and seeing that there's still no change in this section.
05/31/2016 10:44 KaMeR1337#22
Quote:
Originally Posted by _asm View Post
will this community ever turn their brains on and finally do something right?
like seriously, this method of accessing the mainthread of the game routine is known for 6 years now and yet no one except some users who already left this board (probably because of it's stupidity) have contributed something to this section.

I'm not salty or directly saying this to you, everyone is meant and I'm not saying that because I'm any better than you guys. In fact, I just took the advice from the previous members.
it's just sad coming back here after 4 months and seeing that there's still no change in this section.
the hook method is even public in this forum
i dont remember where but his name is infinity something and released multihack with source
05/31/2016 11:04 Computerfreek#23
Quote:
Originally Posted by KaMeR1337 View Post
the hook method is even public in this forum
i dont remember where but his name is infinity something and released multihack with source
Yep, here: [Only registered and activated users can see links. Click Here To Register...]

It's just important to use inline-asm hooks, since it will crash otherwise if you don't call some specific python functions.
Basically:


Code:
void hook_main()
{
     _asm pushad
     // do stuff
     _asm popad

      return (*original_main_func)();
}
Oh, and @[Only registered and activated users can see links. Click Here To Register...]:
It's way easier to make it work on every private servers since those functions stood the same since like ever.
05/31/2016 18:35 _asm#24
Quote:
Originally Posted by Computerfreek View Post
Yep, here: [Only registered and activated users can see links. Click Here To Register...]

It's just important to use inline-asm hooks, since it will crash otherwise if you don't call some specific python functions.
Basically:


Code:
void hook_main()
{
     _asm pushad
     // do stuff
     _asm popad

      return (*original_main_func)();
}
Oh, and @[Only registered and activated users can see links. Click Here To Register...]:
It's way easier to make it work on every private servers since those functions stood the same since like ever.
actually the method has been released [Only registered and activated users can see links. Click Here To Register...].

and for god's sake, use function pointers and an actual hook library like [Only registered and activated users can see links. Click Here To Register...] instead of those ugly inline assembler hooks.
I literally can't repeat myself with the ugliness of code that is still used on this board. for fuck's sake learn c++ before reversing a game
05/29/2017 18:01 mizozaki#25
For some reason, when I try to load m2kmod using your pyloader, it crashes (Metin 2 Singapore) so I'd like someone to please help me.

Bear in mind, I don't know anything with python and these codes, thanks :)
05/30/2017 04:10 stunthacker#26
Quote:
Originally Posted by mizozaki View Post
For some reason, when I try to load m2kmod using your pyloader, it crashes (Metin 2 Singapore) so I'd like someone to please help me.

Bear in mind, I don't know anything with python and these codes, thanks :)


You just gave your self the Answer: " I don't know anything with python and these codes"
05/31/2017 20:42 MagicJunkY#27
Any python scripts for Send attack to target (called Hidden or Autoattack- ProDamage however)
if there are some... let me know pls
06/03/2017 08:32 dex73r#28
I have a little server which still uses python2.2 and it seems that either PyGILState_Ensure doesn't exist in 2.2 or the function is wrong, where did you find parameters and actual implementation of your version's GIL?
06/03/2017 18:13 maximus780#29
Quote:
Originally Posted by dex73r View Post
I have a little server which still uses python2.2 and it seems that either PyGILState_Ensure doesn't exist in 2.2 or the function is wrong, where did you find parameters and actual implementation of your version's GIL?
Hi GIL exists in Python since version 2.3 you can re-implement PyGILState_Ensure on your own: [Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

This is how you'd do it in pre 2.3
Code:
PyThreadState* currentstate = PyThreadState_Get()
PyThreadState* tstate = PyThreadState_New(currentstate->interp);
PyEval_AcquireThread(tstate);

// Call python here

PyEval_ReleaseThread(tstate);
PyThreadState_Delete(tstate);
06/03/2017 19:13 stunthacker#30
Quote:
Originally Posted by MagicJunkY View Post
Any python scripts for Send attack to target (called Hidden or Autoattack- ProDamage however)
if there are some... let me know pls

Not Possible in python alone