Nice work! thx
man kann so nicht nur funktionen callen, sondern auch neue für die client modder definieren :)Quote:
His tool only dumps the metin2 python-api function addresses.
In my last post I've shown, how you can call these functions without knowing their addresses.
Kind Regards Tim
Könntest du oder jemand mir diese Methode mit dem zugriff auf die python api genauer erklären?? :)Quote:
man kann so nicht nur funktionen callen, sondern auch neue für die client modder definieren :)
da man auch vollen zugriff auf die python api hat, kann man auch eigene scripts aus eigenen pack formaten laden ;) mit ein paar tricks kann man das format auch komplett einbinden.
def get_addresses(module_name):
addresses_dict = {}
module = __import__(module_name)
for name in dir(module):
obj = getattr(module, name)
if callable(obj):
addresses_dict[name] = id(obj)
return addresses_dict
No the id returns the address of the pythonobject, not the cfunctionQuote:
Wouldn't it be easier to do it by Python? As in CPython builtin funcion "id(obj)" return the address of given object.
So for example:
Code:def get_addresses(module_name): addresses_dict = {} module = __import__(module_name) for name in dir(module): obj = getattr(module, name) if callable(obj): addresses_dict[name] = id(obj) return addresses_dict