Jump to content

Activate Hack Report Function System


Recommended Posts

  • Active Member

M2 Download Center

This is the hidden content, please
( Internal )

.gif

 
Tutorial:

PythonNetworkStreamModule.cpp

Search:

PyObject* netSendMessengerAddByNamePacket(PyObject* poSelf, PyObject* poArgs)

 

Add it upper:

PyObject* netSendHackPacket(PyObject* poSelf, PyObject* poArgs)
{
	char * szMsg;
	if (!PyTuple_GetString(poArgs, 0, &szMsg))
		return Py_BuildException();

	CPythonNetworkStream& rns=CPythonNetworkStream::Instance();
	rns.__SendHack(szMsg);
	
	return Py_BuildNone();
}

 

.gif

 

Search:

		{ "RegisterErrorLog",						netRegisterErrorLog,						METH_VARARGS },
		

Add it under:

		{ "HackReport",								netSendHackPacket,							METH_VARARGS },

 

.gif

 

PythonNetworkStream.h

 

Search:

bool __SendHack(const char* c_szMsg);

 

Add it upper:

public:

 

.gif

 

Usage:

Python:

net.HackReport("explanation_in_here")

C++:

Without Client Source:

void SendReport(char* why){
	PyObject* args = PyTuple_New(1);
	PyTuple_SetItem(args, 0, PyString_FromString(why));
	PyObject* ret = PyObject_Call(PyObject_GetAttrString(PyImport_ImportModule("net"), "HackReport"), args, NULL);

	Py_XDECREF(ret);
	Py_XDECREF(args);
}
SendReport("explanation_in_here");

Client Source:

#include "PythonNetworkStream.h"

CPythonNetworkStream netStream;
netStream.__SendHack("explanation_in_here");

 

  • Metin2 Dev 3
  • Good 1
  • Love 3
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Everything is ok but why are you try to call functions from external? It was a little bit strange. What ever thanks for share.

// Edit

I don't like part of serverside. I wait good things from ymir/webzen games. That's my function for this.

void CInputMain::Hack(LPCHARACTER ch, const char * c_pData)
{
        TPacketCGHack * p = (TPacketCGHack *)c_pData;
        
        if (ch && ch->GetDesc())
        {
                sys_log(0, "HACK REPORT SENT BY %s", ch->GetName());
                LogManager::instance().HackLog(p->szBuf, ch);
        }
}

Kind Regards

Ken

Edited by Ken

Do not be sorry, be better.

Link to comment
Share on other sites

  • Active Member

Everything is ok but why are you try to call functions from external? It was a little bit strange. What ever thanks for share.

// Edit

I don't like part of serverside. I wait good things from ymir/webzen games. That's my function for this.

void CInputMain::Hack(LPCHARACTER ch, const char * c_pData)
{
        TPacketCGHack * p = (TPacketCGHack *)c_pData;
        
        if (ch && ch->GetDesc())
        {
                sys_log(0, "HACK REPORT SENT BY %s", ch->GetName);
                LogManager::instance().HackLog(p->szBuf, ch);
        }
}

Kind Regards

Ken

D​irect log is dangerous so have potential sql injection risk

Link to comment
Share on other sites

Announcements



  • Similar Content

  • Similar Content

  • Similar Content

  • Tags

  • Activity

    1. 5

      Effect weapons

    2. 3

      Crystal Metinstone

    3. 3

      Feeding game source to LLM

    4. 113

      Ulthar SF V2 (TMP4 Base)

    5. 3

      Feeding game source to LLM

    6. 0

      Target Information System

    7. 3

      Feeding game source to LLM

    8. 2

      anti exp explanation pls

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