i was using visual c++ but i have seen that dll codes recently :
Code:
#include "stdafx.h"
using namespace std;
void (__stdcall* MainFunc)();
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 Main();
void SendPacket(const unsigned char* packetdata, unsigned long len);
void Hook_MainFunc();
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
int wahl;
int potbomby;
void potbomb();
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
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Main, hModule, 0, NULL);
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;
}
void SendPacket(const unsigned char* packetdata, unsigned long len)
{
DWORD dwSendFunc = Offset2;
DWORD dwAddSignatureByte = Offset3;
__asm
{
PUSH packetdata
PUSH len
MOV EAX, Offset1
MOV ECX, DWORD PTR DS:[EAX]
CALL dwSendFunc
MOV EAX, Offset1
MOV ECX, DWORD PTR DS:[EAX]
CALL dwAddSignatureByte
}
}
void Hook_MainFunc()
{
_asm pushad
potbomb();
__asm popad
return (*MainFunc)();
}
void OpenConsole()
{
int hCrtIn, hCrtOut;
FILE *conIn, *conOut;
AllocConsole();
hCrtIn = _open_osfhandle ((intptr_t) GetStdHandle(STD_INPUT_HANDLE), _O_TEXT);
hCrtOut = _open_osfhandle ((intptr_t) GetStdHandle(STD_OUTPUT_HANDLE), _O_TEXT);
conIn = _fdopen( hCrtIn, "r" );
conOut = _fdopen( hCrtOut, "w" );
*stdin = *conIn;
*stdout = *conOut;
system("mode 85,35");
system("title Potbomber by .Infinity");
system("color A");
}
void Main()
{
OpenConsole();
cout << "1 - Start" << endl;
cout << "2 - Stop" << endl << endl;
cin >> wahl;
system("cls");
if(wahl == 1){
potbomby = TRUE;
Main();
}
if(wahl == 2){
potbomby = FALSE;
Main();
}
if(wahl != 1 || 2){
Main();
}
}
void potbomb()
{
if(potbomby == TRUE){
if(TRUE){
unsigned char buf[] = {0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x05, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x07, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x09, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x11, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x12, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x13, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x15, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x16, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x17, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x18, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x19, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x21, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x22, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x23, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x24, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x25, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x26, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x27, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x28, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x29, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x31, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x32, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x33, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x34, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x35, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x36, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x37, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x38, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x39, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x41, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x42, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x43, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x44, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x45, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x46, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x47, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x48, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x49, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x50, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x51, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x52, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x53, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x55, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x56, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x57, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x58, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x59, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
if(TRUE){
unsigned char buf[] = {0x14, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x01};
int size = sizeof(buf);
SendPacket(buf, size);
delete [] buf;
}
}
}
am i wrong or what should i do ?






