View previous topic :: View next topic |
Author |
Message |
majidemo Cheater
Reputation: 0
Joined: 17 Apr 2009 Posts: 28
|
Posted: Mon Jun 01, 2009 7:33 am Post subject: [VB2008&C++] Packet Sending Program |
|
|
2nd post-
anyways, i tried it but still, nothing happens..
ok let me explain it more clearly
0A 00 0A 19 5E BF F1 51 18 2E-> i got this packet using WPE.
When i resend it using WPE, my storage will really open..
but w/ my program it does not..
i need to know how to send a packet.
ill show you a screenshot of my program.
i seem to not yet be able to post URLs but heres the URL to my Programs Screenshot... ->
http
://i288.
photobucket
com/
albums/
ll181/
majidemo/
KhanToolzPreview.jpg
remove "www" before "i288" so you cn view it.
Code: | Option Explicit
Private Sub about_Click()
frmAbout.Show
End Sub
Private Sub Command1_Click()
winsock1.SendData "10 0 10 25 94 191 241 81 24 46"
End Sub
Private Sub credits_Click()
frmCredits.Show
End Sub
Private Sub Form_Load()
Command1.Enabled = False
winsock1.Connect "61.19.250.152", 2104
frmSplash.Show
End Sub
Private Sub Form_Unload(Cancel As Integer)
winsock1.Close
frmSplash.Hide
End Sub
Private Sub Winsock1_Connect()
Command1.Enabled = True
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim temp As String
temp = String(bytesTotal, Chr$(0))
winsock1.GetData temp, vbString, bytesTotal
MsgBox temp
End Sub
|
someone told me this...
Quote: | .... this would just send packet to their server not client to be able send packets to client you need hook winsocket send by making dll that does this then inject it to client and you will be able send packets to open client |
The point of this program is an alternative to packet editors specifically made for a game..
the game is Khan Online..
instead of going to WPE and recording and resending packets.
i'd like to get the packet and add it to my program so a person can just click a button and my program will send the packet to server from game client. thanks.
-i still dont get it.^_^
can anybody point me to a guide/ basic documents..
thanks..
-1st post
i currently am making a program that will send packets to a certain game called Khan Online..
Now i want to attach my program to the process named khanclient.exe..
i currently have this code
Code: | Option Explicit
Private Sub Command1_Click()
Winsock1.SendData "0A 00 0A 19 5E BF F1 51 18 2E"
End Sub
Private Sub Form_Load()
Command1.Enabled = False
Winsock1.Connect "61.19.250.152", 2104
End Sub
Private Sub Form_Unload(Cancel As Integer)
Winsock1.Close
End Sub
Private Sub Winsock1_Connect()
Command1.Enabled = True
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim temp As String
temp = String(bytesTotal, Chr$(0))
Winsock1.GetData temp, vbString, bytesTotal
MsgBox temp
End Sub
|
0A 00 0A 19 5E BF F1 51 18 2E -> the packet that opens storage.
when i use WPE/RPE w/ this packet and send it. i get results and it really opens my storage..
now i want to make a program that has a button, when clicked sends packet and opens my storage.. thanks..
By Clicking my command1 my program will send a packet to the game,
that packet opens the storage.
but when i send it i get no errors.. but i also dont get any result..
should i attach my program to the process 1st?
can someone help me on how to attach my program to that certain process? thanks..
anyways, if you can tell me something better / better code that would be great.
if somethings wrong w/ my code please dont hesitate to correct it.. thanks!
Last edited by majidemo on Thu Jun 04, 2009 5:43 am; edited 6 times in total |
|
Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Mon Jun 01, 2009 11:32 am Post subject: |
|
|
I dont get it.
Why would something happen if you send "0A 00 0A 19 5E BF F1 51 18 2E" to the server.
_________________
Intel over amd yes. |
|
Back to top |
|
 |
goldengold Grandmaster Cheater Supreme
Reputation: -1
Joined: 11 Nov 2006 Posts: 1841 Location: -.-
|
Posted: Mon Jun 01, 2009 2:01 pm Post subject: |
|
|
Beloved Hero wrote: | I dont get it.
Why would something happen if you send "0A 00 0A 19 5E BF F1 51 18 2E" to the server. |
Do you know how packet editing works?
_________________
|
|
Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Mon Jun 01, 2009 3:35 pm Post subject: |
|
|
goldengold wrote: | Beloved Hero wrote: | I dont get it.
Why would something happen if you send "0A 00 0A 19 5E BF F1 51 18 2E" to the server. |
Do you know how packet editing works? |
If it works the same way it does in wpe then yes.
_________________
Intel over amd yes. |
|
Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Mon Jun 01, 2009 3:40 pm Post subject: |
|
|
Beloved Hero wrote: | I dont get it.
Why would something happen if you send "0A 00 0A 19 5E BF F1 51 18 2E" to the server. |
As he said, this seems to be a packet that tells the server "Open storage"
_________________
|
|
Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Mon Jun 01, 2009 5:16 pm Post subject: |
|
|
I'm sorry, but that's NOT how byte packets work. You are sending a string packet. Its actually VERY VERY different.
I can't really explain very well so heres an example:
If I used Winsock.senddata "00 00 00"
what the server is receiving (if byte packet) will be: 30 30 20 30 30 20 30 30.
Because byte packets are basically the ascii of each of the characters. That's why byte packets are more efficient at transfering data because if I want to send the number 0xFFFFFFFF. Using string I would use: FFFFFFFF thats 8 bytes. If I used byte packets that would be 4 bytes and I can't really represent chr(255) here.
|
|
Back to top |
|
 |
Vexyl Newbie cheater
Reputation: 0
Joined: 25 Mar 2008 Posts: 19
|
Posted: Mon Jun 01, 2009 5:47 pm Post subject: |
|
|
Yes that would just send the stringed hexadecimal which would be converted from ASCII to the ASCII decimals.
Last edited by Vexyl on Mon Jun 01, 2009 5:52 pm; edited 2 times in total |
|
Back to top |
|
 |
Valex37 How do I cheat?
Reputation: 0
Joined: 22 May 2009 Posts: 9 Location: United States of America
|
Posted: Mon Jun 01, 2009 5:50 pm Post subject: |
|
|
"0A 00 0A 19 5E BF F1 51 18 2E" = 10 0 10 25 94 191 241 81 24 46
That is the decimal equivalent.
Try compressing that into a memory bank (packet) and sending the whole packet to the server.
_________________
Valex |
|
Back to top |
|
 |
majidemo Cheater
Reputation: 0
Joined: 17 Apr 2009 Posts: 28
|
Posted: Mon Jun 01, 2009 8:19 pm Post subject: |
|
|
Thanks for you replies..^_^
i have edited my 1st post for more information on my problem^_^
|
|
Back to top |
|
 |
Valex37 How do I cheat?
Reputation: 0
Joined: 22 May 2009 Posts: 9 Location: United States of America
|
Posted: Mon Jun 01, 2009 11:47 pm Post subject: |
|
|
I see what you are trying to do now. Research WINSOCK HOOKING & DLL INJECTION. Injecting a DLL is pretty easy. You need to do this because when you connect with that program you are connecting to the game server, it registers it as a new client, therefore it will for example check your Client version/Username/Password because it thinks you are a new player. But if you make a DLL to hook winsock, and inject it into the game (Using Winject or a custom injector) then the hooked winsock code will be in the original program, therefore the code is now sending packets to the server from the original client, and the client/server won't know the difference.
On a side note, you are still sending ASCII characters to the server. I don't know how there server works though, this could work.
_________________
Valex |
|
Back to top |
|
 |
majidemo Cheater
Reputation: 0
Joined: 17 Apr 2009 Posts: 28
|
Posted: Tue Jun 02, 2009 4:55 am Post subject: |
|
|
^_^ thanks for that clear explanation...
i was looking around for a packet editor source code..so i can see how the packet editor like WPE sends packets..
because im using WPE in resending packets to server.. thanks.. ill be back to ask more..if i cant find anything..hehehe..
im looking for the Hooking & DLL you said..
can i do this w/ VB2008? i guess NOT? so i should use C++? but my program is in VB... can i connect these together?
can u share me a sample code?
if you have the time.. a really simple code that may help w/ this..
|
|
Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Tue Jun 02, 2009 4:50 pm Post subject: |
|
|
majidemo wrote: | ^_^ thanks for that clear explanation...
i was looking around for a packet editor source code..so i can see how the packet editor like WPE sends packets..
because im using WPE in resending packets to server.. thanks.. ill be back to ask more..if i cant find anything..hehehe..
im looking for the Hooking & DLL you said..
can i do this w/ VB2008? i guess NOT? so i should use C++? but my program is in VB... can i connect these together?
can u share me a sample code?
if you have the time.. a really simple code that may help w/ this.. |
No you can't do this with vb. You need a lower leveled language like C or pascal. You hook by rewriting the first 5 bytes as a jump to your codecave and recieve the data taht comes from it. Tutorial? Google it:
http://lmgtfy.com/?q=How+to+hook+WS_32+Send
|
|
Back to top |
|
 |
Valex37 How do I cheat?
Reputation: 0
Joined: 22 May 2009 Posts: 9 Location: United States of America
|
Posted: Tue Jun 02, 2009 8:09 pm Post subject: |
|
|
dnsi0 wrote: | majidemo wrote: | ^_^ thanks for that clear explanation...
i was looking around for a packet editor source code..so i can see how the packet editor like WPE sends packets..
because im using WPE in resending packets to server.. thanks.. ill be back to ask more..if i cant find anything..hehehe..
im looking for the Hooking & DLL you said..
can i do this w/ VB2008? i guess NOT? so i should use C++? but my program is in VB... can i connect these together?
can u share me a sample code?
if you have the time.. a really simple code that may help w/ this.. |
No you can't do this with vb. You need a lower leveled language like C or pascal. You hook by rewriting the first 5 bytes as a jump to your codecave and recieve the data taht comes from it. Tutorial? Google it:
|
Why wouldn't VB be able to do this? It can use the Windows API can't it? It can make DLLs, and it can use WinSock...I don't see the problem.
I still suggest using C++, but VB should be able to do it if you aren't comfortable with C++.
_________________
Valex |
|
Back to top |
|
 |
majidemo Cheater
Reputation: 0
Joined: 17 Apr 2009 Posts: 28
|
Posted: Tue Jun 02, 2009 8:30 pm Post subject: |
|
|
i just thought it isnt posible in VB because i cant see any tutorial or sample code that does this in VB.. all in other language like C++...
Sir? i found alot.. but ill try this one?
is this correct?
if ever it is..
if i have compiled my DLL how to i add it to my VB program?
i found this code.. looks promising..
is this all i need?
can someone help me configure this?
the process i need to attach to is khanclient.exe
is this all that i need? or is there more code i need to add?
i compile this w/ V C++?
Code: | SDLLHook D3DHook =
{
"DDRAW.DLL",
false, NULL, // Default hook disabled, NULL function pointer.
{
{ "DirectDrawCreate", MyDirectDrawCreate },
{ NULL, NULL }
}
};
BOOL APIENTRY DllMain( HINSTANCE hModule, DWORD fdwReason, LPVOID lpReserved)
{
if ( fdwReason == DLL_PROCESS_ATTACH ) // When initializing....
{
hDLL = hModule;
// We don't need thread notifications for what we're doing. Thus,
// get rid of them, thereby eliminating some of the overhead of
// this DLL
DisableThreadLibraryCalls( hModule );
// Only hook the APIs if this is the right process.
GetModuleFileName( GetModuleHandle( NULL ), Work, sizeof(Work) );
PathStripPath( Work );
if ( stricmp( Work, "myhooktarget.exe" ) == 0 )
HookAPICalls( &D3DHook );
}
return TRUE;
}
|
i think this is the answer to my question how to add my dll to my vb project .. right?
Quote: | How to call a C++ dll in VB (DLL file name supplied at runtime)
In VB we can call a function from C++ dll using "Declare".
Declare function Test Lib "MyFileName.dll" Alias "TestA" (ByVal nVal As Long)
Is it possible to supply the dll filename at runtime ? |
|
|
Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Wed Jun 03, 2009 5:05 pm Post subject: |
|
|
Valex37 wrote: | dnsi0 wrote: | majidemo wrote: | ^_^ thanks for that clear explanation...
i was looking around for a packet editor source code..so i can see how the packet editor like WPE sends packets..
because im using WPE in resending packets to server.. thanks.. ill be back to ask more..if i cant find anything..hehehe..
im looking for the Hooking & DLL you said..
can i do this w/ VB2008? i guess NOT? so i should use C++? but my program is in VB... can i connect these together?
can u share me a sample code?
if you have the time.. a really simple code that may help w/ this.. |
No you can't do this with vb. You need a lower leveled language like C or pascal. You hook by rewriting the first 5 bytes as a jump to your codecave and recieve the data taht comes from it. Tutorial? Google it:
|
Why wouldn't VB be able to do this? It can use the Windows API can't it? It can make DLLs, and it can use WinSock...I don't see the problem.
I still suggest using C++, but VB should be able to do it if you aren't comfortable with C++. |
The reason that you can't hook it is because you can't actually directly access memory (Pointers) and it can't make dlls (only activeX which are not what you want). The only way to do it is using WPM which is VERY VERY diffcult since you will need to write the entire codecave from assembly (including the processing and sending parts) which is probably beyond 95% of the people on this forum (including me). However, in C++ you can just write a codecave in C and hook it to that cave instead of writting it in assembly.
|
|
Back to top |
|
 |
|