|
You last visited: Today at 03:13
Advertisement
c++ Python.h und detours.h
Discussion on c++ Python.h und detours.h within the C/C++ forum part of the Coders Den category.
06/15/2011, 19:48
|
#1
|
elite*gold: 0
Join Date: Jan 2010
Posts: 120
Received Thanks: 26
|
c++ Python.h und detours.h
hi
ich benutze Microsoft visual c++ 2010
und wenn ich
#include "windows.h"
#include <Python.h>
#include "detours.h"
benutze wird nur windows.h gefunden
kann mir wer helfen
und die Python.h und so schicken
danke
|
|
|
06/15/2011, 20:22
|
#2
|
elite*gold: 0
Join Date: Jan 2010
Posts: 1,385
Received Thanks: 1,006
|
Quote:
benutze wird nur windows.h gefunden
kann mir wer helfen
und die Python.h und so schicken
|
du includierst die dateien obwohl du weißt , dass du sie nicht hast? -.-
google doch mal, wirst bestimmt fündig
|
|
|
06/15/2011, 20:27
|
#3
|
elite*gold: 0
Join Date: Jan 2010
Posts: 120
Received Thanks: 26
|
der source code ist nicht von mir
und wenn ich das google kommen nur seiten auf englisch und ein download link gibt es da auch nicht
hat von euch vllt einer die dateien??
|
|
|
06/15/2011, 21:14
|
#4
|
elite*gold: 0
Join Date: May 2009
Posts: 827
Received Thanks: 471
|
Was willst du überhaupt mit den Headern? Ohne Lib bringen dir die eh nichts. Lad dir erstmal die ganzen SDK's runter, linke sie, gebe die Pfade an und dann klappt das auch. Aber warum will man in C++ mit Python arbeiten? o,ô
|
|
|
06/15/2011, 21:22
|
#5
|
elite*gold: 0
Join Date: Jan 2010
Posts: 120
Received Thanks: 26
|
[Hack]MobPuller (Tapferkeitsumhang-Hack) + Source
von musicinstructor
Link
PHP Code:
#include "windows.h"
#include <Python.h>
#include "detours.h"
DWORD Offset1 = 0; //mainstream
DWORD Offset2 = 0; //AddPacketData Function
DWORD Offset3 = 0; //AddSignatureByte Function
DWORD Offset4 = 0; //Update Function (MainFunc)
DWORD Offset5 = 0; //RegisterVid Function
void (__stdcall* MainFunc)();
void (__stdcall* RegisterVid)();
bool Key1IsPressed = false;
bool pullmobs = true;
DWORD *vids = new DWORD[1000];
DWORD *nVID = new DWORD[1000];
int nVIDcount = 0;
int VIDcount = 0;
DWORD nhVID = 0;
bool ScanForOffsets();
DWORD dwFindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask);
bool bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask);
void* GetCallDest(void* addr);
void CatchKeystrokes();
void Hook_MainFunc();
void Hook_RegisterVid();
void SendPullPackets();
int GetInstanceType(long vid);
double GetCharacterDistance(long vid);
void AppendChat(const char *msg);
bool appIsPressed(long Key);
void RefreshVids();
void AddVID();
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
ScanForOffsets();
MainFunc = (void (__stdcall*)())DetourFunction((PBYTE)Offset4, (PBYTE)Hook_MainFunc); //0x00471F50
RegisterVid = (void (__stdcall*)())DetourFunction((PBYTE)Offset5, (PBYTE)Hook_RegisterVid); //0x004A0154
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
bool ScanForOffsets()
{
DWORD Base = 0x00400000;
DWORD SizeOfCode;
DWORD i = Base;
while ((memcmp((void *)i, "PE\0\0", 4)) && (i <= Base + 0x1000))
i++;
if (i <= Base + 0x1000)
SizeOfCode = *(DWORD *)(i + 0x1C);
BYTE Signature1[] = { 0x8B, 0x0D, 0xF4, 0x1C, 0x5F, 0x00, 0x52, 0x50, 0xE8, 0x67,
0x60, 0x00, 0x00, 0xE8, 0x12, 0x7B, 0x12, 0x00, 0x5E};
BYTE Signature2[] = { 0x8B, 0xC1, 0x8B, 0x50, 0x38, 0x8B, 0x48, 0x34, 0x53, 0x8B,
0x5C, 0x24, 0x08, 0x2B, 0xCA, 0x3B, 0xD9};
BYTE Signature3[] = { 0xC2, 0x04, 0x00, 0x8B, 0xCE, 0xE8, 0xB2, 0xCE, 0x0D, 0x00,
0x5E};
BYTE Signature4[] = { 0x83, 0xEC, 0x08, 0x56, 0x8B, 0xF1, 0x8D, 0x44, 0x24, 0x04,
0x50, 0x8D, 0x4C, 0x24, 0x0C, 0x51};
BYTE Signature5[] = { 0x8B, 0x44, 0x24, 0x04, 0x89, 0x81, 0x9C, 0x04, 0x00, 0x00,
0xC2, 0x04, 0x00};
Offset1 = *(DWORD *)(dwFindPattern(Base + 0x1000, SizeOfCode, Signature1, "xx????xxx????x????x") + 2);
Offset2 = dwFindPattern(Base + 0x1000, SizeOfCode, Signature2, "xxxxxxxxxxxxxxxxx");
DWORD Offset3_Address = (dwFindPattern(Base + 0x1000, SizeOfCode, Signature3, "xxxxxx????x") + 6);
Offset3 = reinterpret_cast<DWORD>(GetCallDest((DWORD *)(Offset3_Address - 1)));
Offset4 = dwFindPattern(Base + 0x1000, SizeOfCode, Signature4, "xxxxxxxxxxxxxxxx");
Offset5 = dwFindPattern(Base + 0x1000, SizeOfCode, Signature5, "xxxxxxxxxxxxx") + 4;
if ((Offset1))
return true;
else
return false;
}
void* GetCallDest(void* addr)
{
unsigned char* callDestAddr = reinterpret_cast<unsigned char*>(addr) + 1;
uintptr_t relativeDest = *reinterpret_cast<uintptr_t *>(callDestAddr);
return reinterpret_cast<void*>(uintptr_t(addr) + relativeDest + 5);
}
bool bDataCompare(const BYTE* pData, const BYTE* bMask, const char* szMask)
{
for(;*szMask;++szMask,++pData,++bMask)
if(*szMask=='x' && *pData!=*bMask )
return false;
return (*szMask) == NULL;
}
DWORD dwFindPattern(DWORD dwAddress,DWORD dwLen,BYTE *bMask,char * szMask)
{
for(DWORD i=0; i < dwLen; i++)
if( bDataCompare( (BYTE*)( dwAddress+i ),bMask,szMask) )
return (DWORD)(dwAddress+i);
return 0;
}
der sagt auch nicht woher man die bekommen soll....
ok ich google mal SDKs und downloade das mir
|
|
|
 |
Similar Threads
|
[Tutorial] Microsoft Detours
07/24/2013 - Coding Tutorials - 74 Replies
Eine kleine .dll wird geschrieben, die mithilfe der Microsoft Detours Library die MessageBoxA Funktion detourt, und den Text ersetzt, sobald sie in einen Prozess injeziert wird. Ich hoffe ich konnte es einigermaßen verständlich erklären (mein Gedankenfluss ist manchmal etwas wirr).
Es ist auf Deutsch.
Detours Video Tutorial
|
Microsoft Detours 2.1
02/28/2012 - CO2 Programming - 26 Replies
When I was working on a proxy a while ago I needed a way redirect the connections from conquer client to my proxy. There is a couple of ways to achieve this but I choose detours (2.1). However I noticed that there was a lack of tutorials on how to actually start using Microsoft detours (or I couldn't use Google properly, which is also possible :D). So here's a little step-by-step tutorial how to start using them and I will also show how to detour Connect and ShellExecute functions.
Step 1 -...
|
[C++] Eigene Detours Teil2
06/21/2011 - Coding Tutorials - 25 Replies
Ein zweites dickes Hallo an Alle,
Nachdem wir uns in Teil 1 des Tutorials darum gekümmert haben, die Detour Funktion zu programmieren, geht’s in Teil 2 darum, diese Funktion richtig anzuwenden. Dazu schreiben wir uns zuerst ein „Opfer“-Programm:
#include <iostream>
#include <windows.h>
using namespace std;
|
MS Detours 1.5
07/16/2010 - Kal Online - 10 Replies
hi,
i'm having problem trying to compile my dll using ms detours 2.1 (not 1.5, sorry)
detours.lib(detours.obj) : error LNK2001: unresolved external symbol "struct HINSTANCE__ * __stdcall Detoured(void)" (?Detoured@@YGPAUHINSTANCE__@@XZ)
G:\KalOnline\d3dx9_29.dll : fatal error LNK1120: 1 unresolved externals
could someone tell me how to solve it?
could not google it.
|
Can EDX Detours be used for multibotting
06/19/2010 - SRO Private Server - 12 Replies
After editing source code can this be done? In EDX Detours thread he wrote this app can be used for another programs after tweaking the source. But i don't have any programming skills,so anyone who knows c++ please take a look at it http://www.elitepvpers.com/forum/sro-guides-templat es/308740-guide-using-windows-detours-redirect-sil kroad-proxy.html
|
All times are GMT +1. The time now is 03:13.
|
|