Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 09:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Metin2 Hook Socket Send Function Err

Discussion on Metin2 Hook Socket Send Function Err within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2012
Posts: 5
Received Thanks: 1
Metin2 Hook Socket Send Function Err

Ich brauche die Hilfe dieser Codes funktionieren nicht


Code:
#include "stdafx.h"
#include <stdio.h>
#include <Winsock2.h>
#include <windows.h>
 
#include <iostream>
#include <fstream>
#include <string>
 
#pragma comment(lib,"detours.lib")
#include "detours.h"
#pragma comment(lib, "ws2_32.lib")



static int(WINAPI *orig_send)(SOCKET s,const char*buf,int len,int flags)=send;



int WINAPI my_send(SOCKET s,const char*buf,int len,int flags)
{
        printf("Paket gesendet..\n");
        return orig_send(s, buf,len, flags);
}
 
int WINAPI konsol()
{
	AllocConsole();
	AttachConsole(GetCurrentProcessId());
	freopen("con","w",stdout);
	return 0;
}




BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					 )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
				MessageBoxA(0,"Haken Injected",0,0);
				konsol();
				DetourTransactionBegin();
                DetourUpdateThread(GetCurrentThread());
                DetourAttach(&(PVOID&)orig_send, my_send);
                DetourTransactionCommit();

	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	return TRUE;
}
TheTompa is offline  
Old 05/09/2014, 00:07   #2
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
1. Was funktioniert nicht?
2. Was hat das mit Metin2 zu tun?
3. Mit Copy&Paste kommst du nicht weit. Lern Programmieren.

#Moverequest -> Coders Den -> C++
Mi4uric3 is offline  
Old 05/09/2014, 15:12   #3
 
elite*gold: 0
Join Date: Mar 2014
Posts: 618
Received Thanks: 133
Gehört nicht in den Metin2 Main Bereich.

#report

PS: falls das was mit p servern zu tun hat, dann schreibs da rein.
OsamaFlow is offline  
Reply


Similar Threads Similar Threads
[C++]Metin2 How to Hook Game Function(Basic)
08/28/2013 - Metin2 PServer Guides & Strategies - 6 Replies
Here is a video : Metin2 How to Hook Game Function - YouTube Source : // dllmain.cpp : Defines the entry point for the DLL application. #include "stdafx.h" #include <detours.h>
socket_read() [function.socket-read]: unable to read from socket [0] - Problem
03/10/2012 - Web Development - 0 Replies
Thema gelöst ; )
Hshield send function hook
10/11/2008 - Kal Online - 12 Replies
ey kann mir wer nen tipp geben wie man die addressen rauskriegt von int vom hshield für recv und send funktion damit die gehooked wird??



All times are GMT +1. The time now is 09:08.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.