Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Create a random packet

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Sharel972
Newbie cheater
Reputation: 0

Joined: 02 Nov 2009
Posts: 24
Location: israel

PostPosted: Mon Jan 24, 2011 5:07 am    Post subject: Create a random packet Reply with quote

Hello , i have a packet sender sorce:
Code:
#include <stdio.h>
#include <Windows.h>
#include "mspackets.h"
#include "aobscan.h"

SENDPACKET SendPacket;

char* Buffer = NULL;
//----------------------------------------------------------
//-------------Defining Some Addys and Other Stuff----------

DWORD SendAddy = 0x00429B80;
DWORD PESendJmp = SendAddy + 5;

//----------------------------------------------------------

inline char* atohx(char* dst, const char * src)
{   
   char *ret = dst;
   for(int lsb, msb; *src; src += 2)
   {   
      msb = tolower(*src);
      lsb = tolower(*(src + 1));
      msb -= isdigit(msb) ? 0x30 : 0x57;
      lsb -= isdigit(lsb) ? 0x30 : 0x57;
      if((msb < 0x0 || msb > 0xf) || (lsb < 0x0 || lsb > 0xf))
      {
         *ret = 0;
         return NULL;
      }
      *dst++ = (char)(lsb | (msb << 4)); 
   }
   *dst = 0;
   return ret;
}

//-------------Sending Packet Functions --------------------
void WINAPI msSendPacketA(__in LPCSTR lpPacketStr)
{
   SIZE_T stLen = strlen( lpPacketStr );
   SendPacket = (SENDPACKET)PESendJmp;
   PACKET Packet;
   Packet.Null = 0;
   Packet.Null2 = 0;   
   Packet.nSize = stLen/2;
   byte bPacket[150];
   Packet.lpData = atohx((char*)bPacket, lpPacketStr);

__asm
{
    lea    eax,[Packet]
    push eax
    call   dword ptr [SendAddy]
    add  esp,4
}
}

void WINAPI msSendBuffer(__inout LPVOID lpPacket, __in SIZE_T cb)
{
   SendPacket = (SENDPACKET)PESendJmp;
   PACKET Packet;
   ZeroMemory(&Packet, sizeof(PACKET));
   Packet.nSize = cb;
   Packet.lpData = lpPacket;
   /*_asm
   {
      mov ecx, PEClass
      mov ecx, [ecx]
   }*/
   SendPacket( &Packet );
}

BOOL WINAPI IsPacketSniffed()
{
   HMODULE      hWS2_32 = GetModuleHandleA("WS2_32.dll");
   if (!hWS2_32)
      return FALSE;
   byte*      f_send = (byte*)GetProcAddress(hWS2_32, "send");
   if (!f_send)
      return FALSE;
   if (*f_send == 0xE9)
      return TRUE;
   byte*      f_mssend = (byte*)SendAddy;
   if (!f_mssend)
      return FALSE;
   if (*f_mssend == 0xE9)
      return TRUE;
}


Now i want to send the same packet every time but there is a few bytes that change every time for example:
Code:
25 00 00 9B 61 2B 04

25 00 00 9B 61 * 04



the star is random packet that allways chaged.

to send packet:


Code:

     if(wParam == IDC_BUTTON10) // Send Packet
{
CHAR buffer[5000];
GetDlgItemText(hWnd,IDC_COMBO1,buffer,5000);
eraseAllBlanks(buffer);
 msSendPacketA(buffer);
}



thanks for helping.
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Mon Jan 24, 2011 6:24 am    Post subject: Reply with quote

Uh, you asked a very indirect question. You said you want to send a packet but things change and that's it. Nothing we can do to help you without more information or better explanations.

Edit -- Google'd your code, found out its for MapleStory. Locked.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites