Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Winsock Send packet to server through Client

majidemo

New member
Joined
Jun 2, 2009
Messages
3
2nd post-

im doing this on VB2008

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.






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...

.... 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!
 

Atheist

Raging swede
Joined
Aug 19, 2005
Messages
8,020
Just a question - Does what you're trying to do now comply with the terms of service/license agreement of this game?

And also, what is this WPE you mention?
 

majidemo

New member
Joined
Jun 2, 2009
Messages
3
program is not against the game for im just using common used packets..

the title is exagerated for my friends to see..

i really need the help..^_^ im just a 16y.o kid.. trying to have my 1st program..
i hope you can help.. anyways..

WPE is Winstock Packet Editor from www.wpepro.net

it hooks to the process then records packets, then allows you to send packets again..

i need the code on sending a packet.. that all i really need.. please??
 
Last edited:

DigiRev

"Digital Revolution"
Joined
Mar 27, 2005
Messages
4,471
Your friend is right. You need to have a DLL injected inside the game. The DLL needs to intercept calls to the Winsock's sendto() and recvfrom() functions. That's if the game is using the UDP protocol, which most do. If it's using TCP, then you need to intercept the send() and recv() functions.

It intercepts them by overwriting the program's code at runtime using WriteProcessMemory. This makes the game call a function inside your DLL instead of the Winsock DLL.

The DLL would then forward these packets to your VB program, write them to a file, or something.

It's really not that hard. I'm actually already writing a tutorial on how to do this. In the meantime, you can look at this code:

http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=10265&lngWId=3

Edit: The DLL needs to be written in a language that can compile standard Windows DLLs. VB can only compile ActiveX DLLs. There is a modification to VB's linker that can create standard DLLs but it kind of sucks... better to just write the DLL in C++ or something.

Unless VB2008 can create standard DLLs, I just use VB6. :)
 

majidemo

New member
Joined
Jun 2, 2009
Messages
3
yeah.,.im using vb2008..

but cancelled the project..

i just cant hook it..

the only code i lack was the hook..

but still cant do it..
 

Zeuz

New member
Joined
May 23, 2008
Messages
413
Code:
Public Function ConvHEX2ByteArray(ByVal pStr As String) As Byte()
        Dim pByte As Byte() = New Byte(pStr.Length / 2 - 1) {}

        Dim i As Int32, j As Int32

        j = -1

        Dim pStrLength As Int32 = pStr.Length

        Try
            For i = 0 To pStrLength - 1 Step 2
                j += 1
                pByte(j) = Convert.ToByte(Convert.ToInt32("0x" + pStr.Substring(i, 2), 16))
            Next
        Catch ex As Exception
        End Try

        Return pByte
    End Function

Code:
Dim pStr AS String
Dim pByte As Byte

pStr = " Your Packet String"
pByte=ConvHEX2ByteArray(pStr)
SendPackets(pByte)

You ask packet sending in different mode but actually you want to know how you make code to send it, and you can make own macilious programs/bots to game then.
I got warned for asking it o_O
 
Last edited:

Zeuz

New member
Joined
May 23, 2008
Messages
413
program is not against the game for im just using common used packets..

the title is exagerated for my friends to see..

i really need the help..^_^ im just a 16y.o kid.. trying to have my 1st program..
i hope you can help.. anyways..

WPE is Winstock Packet Editor from www.wpepro.net

it hooks to the process then records packets, then allows you to send packets again..

i need the code on sending a packet.. that all i really need.. please??

Actually WPE is not allowed use in games.
It is illegal in games :]

If you think. All 3rd party programs are illegal in everygame.
3rd party program is program what game creators are not made and it is made by someone other than gaming team.


EDIT:
Read WPE website. Theres information about WPE...
_______________________________________________________
WPE Pro 0.9a (Windows XP, 2003, Vista), 1.3 (Windows 95, 98, ME, 2000)
Winsock Packet Editor (WPE) Pro is a packet sniffing/editing tool which is generally used to hack multiplayer games. WPE Pro allows modification of data at TCP level. Using WPE Pro one can select a running process from the memory and modify the data sent by it before it reaches the destination. It can record packets from specific processes, then analyze the information. You can setup filters to modify the packets or even send them when you want in different intervals. WPE Pro could also be a useful tool for testing thick client applications or web applications which use applets to establish socket connections on non http ports.

PermEdit 1.25 (Windows 95, 98, ME, 2000, XP, 2003, Vista)
PermEdit grants system access to any running process. Usually it's used for packet editors like WPE Pro and T-Search because sometimes they are unable to target a certain game or it does not appear in the list. It can be used for other programs though.

T-Search 1.6b (Windows 95, 98, ME, 2000, XP, 2003, Vista)
T-Search is a cheat tool designed to search for parameters in memory while a game is running. This is a primary tool used when making trainers. This program allows the use of breakpoints and disassembly for tracking down DMA locations. This program will also automatically generate the commands needed to plug into the Trainer Maker Kit.

This site was designed to help you easily find all the tools you need for modifying games. On the forums we have information for things such as hacking club penguin and hacking maple story. We hope you enjoy the programs and become active in the forum. If you enjoy the programs, please submit tutorials to the forums to help other users. We are now accepting donations, as this site costs money to run, and the bandwidth usage is becoming considerably higher.
 
Last edited:
Top