Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 02:31

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

Advertisement



(Winsock hook) replace/filter packet bytes

Discussion on (Winsock hook) replace/filter packet bytes within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2010
Posts: 2
Received Thanks: 0
(Winsock hook) replace/filter packet bytes

Hi guys

Please, can someone explain me or help me about my winsock hook?!

I need to change the first and second bytes of the packet I've received...
example:


I'm receiving the packet:

00 01 02 03 04 05 06 07 08 09

I need to change only the first and second byte to:

03 04 02 03 04 05 06 07 08 09

How can I do?
please help me
dream19 is offline  
Old 11/17/2010, 19:18   #2
 
elite*gold: 0
Join Date: Jul 2010
Posts: 388
Received Thanks: 196
Code:
*packet = 3;
*(packet+1) = 4;
SmackJew is offline  
Old 11/17/2010, 19:21   #3
 
elite*gold: 0
Join Date: Nov 2010
Posts: 2
Received Thanks: 0
Quote:
Originally Posted by SmackJew View Post
Code:
*packet = 3;
*(packet+1) = 4;

Hi,
it's my code in delphi:


Code:
function recvCallBack(s: TSocket; Buf: Pointer; len, flags: Integer): Integer; stdcall;
var
 DataBuffer: pchar;
begin
   GetMem(DataBuffer, len);
   CopyMemory(DataBuffer, @Buf,  len);
   DataBuffer[0] := chr(3); //$03
   DataBuffer[1] := chr(4); //$04
   CopyMemory(@Buf, DataBuffer,  len);

  Result := recvNext(s, Buf, len, flags);
end;
But it's changing ALL bytes of the packet...

What's wrong?



PS: you can post the code in C / C++... then I convert to delphi...
dream19 is offline  
Old 11/18/2010, 18:10   #4
 
elite*gold: 0
Join Date: Jan 2008
Posts: 113
Received Thanks: 31
He already did post the code in C
hallamasch is offline  
Reply


Similar Threads Similar Threads
[B] Packet Filter C++ Source Code
07/25/2010 - Flyff Trading - 5 Replies
Hey Leute, ich habe vor ein paar Tagen die Basis eines Packet-Filters in C++ gecodet. Das Ganze ist API-Only geschrieben, also .NET Framework wird nicht benötigt. Der Source ist recht sauber und simpel geschrieben, aber dennoch sehr effektiv. Beim Test lief alles ohne Lags ab und das Programm(Konsole), verbrauchte bei 2 Aktiven Verbindungen(Clients) nur 444kb RAM. Die Funktion zum parsen der Packets ist schon vorhanden. Es müssen nurnoch If Abfragen, etc hinzugefügt werden, um die...
Need Help about (Winsock Packet Editor (WPE) Pro 0.9a)
09/26/2009 - CO2 Programming - 18 Replies
Hey All I need help to know some thing about ( Winsock Packet Editor (WPE) Pro 0.9a in Network Monitors ) need to know.. How Can i open one Sv in different User account at One Pc How is it work..? Thankz any way i w8 Replies Plz don't avoid me
[VB6]Winsock Packet Sending Program & [C++] ws_32 Hook&DLL
06/07/2009 - C/C++ - 1 Replies
Hi.. im trying to create a program that send packet to the server.. someone told me to hook my program using the ws_32 hook and dll can someone give me or teach me how to do these codes? the client i need to attach to is "KhanClient.exe" i hope you can help me..
[C++] winsock ws_32.dll hook
06/05/2009 - C/C++ - 5 Replies
i am trying to make a hack for a online game. but i don't know how to hook my program to the process name : khanclient.exe can someone help me? this is my current code in VB2008 the point in this is i want to click a button and send a packet to server from client. i hope you get what i mean. here is a screenshot:
Interlude 11 bytes init packet wtf??
02/07/2008 - Lineage 2 - 0 Replies
Hello! in some interlude servers, first packet(init) length is about 11 bytes, when im expecting a more huge packet(about 186 bytes) containing: protocolVersion (Integer) sessionId(Integer) rsaPublicKey (byte) blowfishKey (byte) gg1 (byte) gg2 (byte) gg3 (byte)



All times are GMT +1. The time now is 02:32.


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.