Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 10:15

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

Advertisement



[HELP] Makeing a hax for a game useing packets/sockets

Discussion on [HELP] Makeing a hax for a game useing packets/sockets within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2008
Posts: 12
Received Thanks: 0
[HELP] Makeing a hax for a game useing packets/sockets

Hello you might have seen my other post, where i was trying to finde out how to use packets/sockets.
Anyways i think i'm almost there, and now i need some once help to fix a few errors. Please look at this peace of code =)

Imports:
Code:
Imports System.IO
Imports System.Net
Imports System.Net.Sockets
Imports System.Threading
Imports Microsoft.VisualBasic
Imports System.Text
Imports System.Runtime.InteropServices
Work space:
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Public Sub Connect( _
     ByVal host As String, _
     ByVal port As Integer _
 )

    End Sub

Public Function Send( _
        ByVal buffer As Byte(), _
        ByVal offset As Integer, _
        ByVal size As Integer, _
        ByVal socketFlags As SocketFlags, _
        <OutAttribute()> ByRef errorCode As SocketError _
    ) As Integer


    End Function
    Public Shared Function hotkeySend1(ByVal Pro As Socket) As Integer
        Dim msg As Byte() = Encoding.ASCII.GetBytes("00 0C 00 23 62 65 61 6D 20 6D 65 20 75 70")
        Dim bytes(4) As Byte
        Try
            Dim byteCount As Integer = Pro.Send(msg, 0, msg.Length, SocketFlags.None)
            byteCount = Pro.Receive(bytes, 0, Pro.Available, SocketFlags.None)
        Catch e As SocketException
            Return e.ErrorCode

        End Try
        Return 0
    End Function

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim Pro As Socket = 
        Dim host As String
        Dim port As Integer
        Dim msg As Byte() = Encoding.ASCII.GetBytes("00 0C 00 23 62 65 61 6D 20 6D 65 20 75 70")
        Dim bytes(4) As Byte
        Dim hotkey1 As Boolean
        Dim hotkey2 As Boolean
        Dim hotkey3 As Boolean
        Dim hotkey4 As Boolean

        hotkey1 = GetAsyncKeyState(Keys.NumPad1)
        hotkey2 = GetAsyncKeyState(Keys.NumPad2)
        hotkey3 = GetAsyncKeyState(Keys.NumPad3)
        hotkey4 = GetAsyncKeyState(Keys.NumPad5)
        host = ("213.152.3.5")
        port = 2000
        If hotkey1 = True Then
            Pro.Connect(host, port)
            Pro.Send(msg, 0, msg.Length, SocketFlags.None)

        End If
    End Sub
Error: (When "Timer1_Tick" don't have "ByVal Pro As Socket" is indicated)
Code:
Error    1    Expression expected.    C:\Documents and Settings\Qvintus\Skrivebord\VB\EL\EL Fruit Master\EL Fruit Master\Form1.vb    75    27    EL Fruit Master
Error    2    Name 'Pro' is not declared.    C:\Documents and Settings\Qvintus\Skrivebord\VB\EL\EL Fruit Master\EL Fruit Master\Form1.vb    92    13    EL Fruit Master
Error    3    Name 'Pro' is not declared.    C:\Documents and Settings\Qvintus\Skrivebord\VB\EL\EL Fruit Master\EL Fruit Master\Form1.vb    93    13    EL Fruit Master
Error: (When "Timer1_Tick" have "ByVal Pro As Socket" indicated, and deleted "Dim Pro As Socket")
Code:
Error    1    Method 'Private Sub Timer1_Tick(Pro As System.Net.Sockets.Socket, sender As Object, e As System.EventArgs)' cannot handle event 'Public Event Tick(sender As Object, e As System.EventArgs)' because they do not have a compatible signature.    C:\Documents and Settings\Qvintus\Skrivebord\VB\EL\EL Fruit Master\EL Fruit Master\Form1.vb    74    125    EL Fruit Master
Please help me out if you know what i'm doing wrong.
Qvintus is offline  
Old 10/23/2009, 23:15   #2
 
elite*gold: 0
Join Date: Jan 2008
Posts: 12
Received Thanks: 0
I remade the program, as it seemed to suck .. anyways i came up with some new code please look at it =)

The UDP Version

Code:
[COLOR="Blue"]Imports[/COLOR] System.Net.Sockets
[COLOR="Blue"]Imports[/COLOR] System.IO
[COLOR="Blue"]Imports[/COLOR] System.Threading
[COLOR="Blue"]Imports[/COLOR] System.Net
[COLOR="Blue"]Imports[/COLOR] System.Text
Code:
[COLOR="Blue"]Public Class[/COLOR] Form1
    [COLOR="Blue"]Private Declare Function[/COLOR] GetAsyncKeyState [COLOR="Blue"]Lib[/COLOR] "user32" ([COLOR="Blue"]ByVal[/COLOR] vkey [COLOR="Blue"]As[/COLOR] Long) [COLOR="Blue"]As[/COLOR] Integer
    [COLOR="Blue"]Dim[/COLOR] client [COLOR="Blue"]As[/COLOR] UdpClient
    [COLOR="Blue"]Dim[/COLOR] receivePoint [COLOR="Blue"]As[/COLOR] IPEndPoint

    [COLOR="Blue"]Private Sub[/COLOR] Form1_Load([COLOR="Blue"]ByVal[/COLOR] sender [COLOR="Blue"]As[/COLOR] System.Object, [COLOR="Blue"]ByVal[/COLOR] e [COLOR="Blue"]As[/COLOR] System.EventArgs) [COLOR="Blue"]Handles MyBase[/COLOR].Load
    [COLOR="Blue"]End Sub[/COLOR]

    [COLOR="Blue"]Private Sub[/COLOR] Timer1_Tick([COLOR="Blue"]ByVal[/COLOR] sender [COLOR="Blue"]As[/COLOR] System.Object, [COLOR="Blue"]ByVal[/COLOR] e [COLOR="Blue"]As[/COLOR] System.EventArgs) [COLOR="Blue"]Handles[/COLOR] Timer1.Tick
        [COLOR="Blue"]Dim[/COLOR] hotkey1 [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Boolean[/COLOR] = GetAsyncKeyState(Keys.NumPad1)
        [COLOR="Blue"]Dim[/COLOR] hotkey2 [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Boolean[/COLOR] = GetAsyncKeyState(Keys.NumPad2)
        [COLOR="Blue"]Dim[/COLOR] hotkey3 [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Boolean[/COLOR] = GetAsyncKeyState(Keys.NumPad3)
        [COLOR="Blue"]Dim[/COLOR] hotkey4 [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Boolean[/COLOR] = GetAsyncKeyState(Keys.NumPad5)
        [COLOR="Blue"]If [/COLOR]hotkey1 = [COLOR="Blue"]True Then[/COLOR]
            [COLOR="Blue"]Dim[/COLOR] data [COLOR="Blue"]As[/COLOR] Byte() = System.Text.Encoding.ASCII.GetBytes([COLOR="DarkRed"]"...#beam me up"[/COLOR])
            client.Send(data, data.Length, "213.152.3.5", 2000)
      [COLOR="Blue"]End If
    End Sub[/COLOR]

    [COLOR="Blue"]Private Sub[/COLOR] Button1_Click([COLOR="Blue"]ByVal[/COLOR] sender [COLOR="Blue"]As[/COLOR] System.Object, [COLOR="Blue"]ByVal[/COLOR] e [COLOR="Blue"]As[/COLOR] System.EventArgs) [COLOR="Blue"]Handles[/COLOR] Button1.Click
        [COLOR="Blue"]Dim[/COLOR] data [COLOR="Blue"]As[/COLOR] Byte() = System.Text.Encoding.ASCII.GetBytes([COLOR="DarkRed"]"...#beam me up"[/COLOR])
        client.Send(data, data.Length, "213.152.3.5", 2000)
    [COLOR="Blue"]End Sub
End Class[/COLOR]
The TCP Version

Code:
[COLOR="Blue"]Imports[/COLOR] System.Net.Sockets
[COLOR="Blue"]Imports[/COLOR] System.IO
[COLOR="Blue"]Imports[/COLOR] System.Net
[COLOR="Blue"]Imports[/COLOR] System.Text
Code:
[COLOR="Blue"]Public Class[/COLOR] Form1
    [COLOR="Blue"]Private Declare Function[/COLOR] GetAsyncKeyState [COLOR="Blue"]Lib[/COLOR] "user32" ([COLOR="Blue"]ByVal[/COLOR] vkey [COLOR="Blue"]As[/COLOR] Long) [COLOR="Blue"]As Integer[/COLOR]
    [COLOR="Blue"]Dim[/COLOR] clientSocket [COLOR="Blue"]As[/COLOR] New System.Net.Sockets.TcpClient()
   [COLOR="Blue"]Dim[/COLOR] serverStream [COLOR="Blue"]As[/COLOR] NetworkStream
    [COLOR="Blue"]Private Sub[/COLOR] Form1_Load([COLOR="Blue"]ByVal[/COLOR] sender [COLOR="Blue"]As[/COLOR] System.Object, [COLOR="Blue"]ByVal[/COLOR] e [COLOR="Blue"]As[/COLOR] System.EventArgs) [COLOR="Blue"]Handles MyBase[/COLOR].Load
        clientSocket.Connect("213.152.3.5", 2000)
   [COLOR="Blue"]End Sub[/COLOR]

    [COLOR="Blue"]Private Sub[/COLOR] Timer1_Tick([COLOR="Blue"]ByVal[/COLOR] sender [COLOR="Blue"]As[/COLOR] System.Object, [COLOR="Blue"]ByVal[/COLOR] e [COLOR="Blue"]As[/COLOR] System.EventArgs) [COLOR="Blue"]Handles[/COLOR] Timer1.Tick
        [COLOR="Blue"]Dim[/COLOR] hotkey1 [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Boolean[/COLOR] = GetAsyncKeyState(Keys.NumPad1)
        [COLOR="Blue"]Dim[/COLOR] hotkey2 [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Boolean[/COLOR] = GetAsyncKeyState(Keys.NumPad2)
        [COLOR="Blue"]Dim[/COLOR] hotkey3 [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Boolean[/COLOR] = GetAsyncKeyState(Keys.NumPad3)
        [COLOR="Blue"]Dim[/COLOR] hotkey4 [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Boolean[/COLOR] = GetAsyncKeyState(Keys.NumPad5)
        [COLOR="Blue"]Dim[/COLOR] serverStream [COLOR="Blue"]As[/COLOR] NetworkStream = clientSocket.GetStream()
        [COLOR="Blue"]Dim[/COLOR] outStream [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Byte[/COLOR]()

        [COLOR="Blue"]If[/COLOR] hotkey1 = [COLOR="Blue"]True Then[/COLOR]
            outStream = System.Text.Encoding.ASCII.GetBytes([COLOR="DarkRed"]"...#beam me up"[/COLOR])
            serverStream.Write(outStream, 0, outStream.Length)
            serverStream.Flush()
        [COLOR="Blue"]End If
    End Sub[/COLOR]

    [COLOR="Blue"]Private Sub[/COLOR] Button1_Click([COLOR="Blue"]ByVal[/COLOR] sender [COLOR="Blue"]As[/COLOR] System.Object, [COLOR="Blue"]ByVal[/COLOR] e [COLOR="Blue"]As[/COLOR] System.EventArgs) [COLOR="Blue"]Handles[/COLOR] Button1.Click
       [COLOR="Blue"]Dim[/COLOR] serverStream [COLOR="Blue"]As[/COLOR] NetworkStream = clientSocket.GetStream()
        [COLOR="Blue"]Dim[/COLOR] outStream [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Byte[/COLOR]()
        outStream = System.Text.Encoding.ASCII.GetBytes([COLOR="DarkRed"]"...#beam me up"[/COLOR])
        serverStream.Write(outStream, 0, outStream.Length)
        serverStream.Flush()
   [COLOR="Blue"]End Sub
End Class[/COLOR]
Problem ain't errors anymore, but... :S It just won't work please help me out.

Is my problem that i haven't injected the program to the game i won't to use this program on?
Qvintus is offline  
Reply


Similar Threads Similar Threads
Game packets blowfish only?
06/06/2010 - CO2 Programming - 13 Replies
Does anyone know if in-game packets (like move or magic) are encrypted with blowfish only or if there is also a DHkeyexchange? Thanks.
WTB 90+FF chinese char for in game gold server Eos or greece only USEING middleman
04/27/2010 - Silkroad Online Trading - 1 Replies
[email protected] ty^^ i offer good
[Question] Reading Game Server Packets
08/16/2009 - CO2 Programming - 12 Replies
What is the packet structure of the FIRST packet sent from the game server to the client? I'm referring to the packet that is sent before receiving the client's handshake and that includes a random key used by the client to decrypt future packets. Ultimately this information will be used to find out the structure of the individual packets that the server sends. Any help is appreciated.
all game net Packets are encrypted
06/27/2008 - Perfect World - 3 Replies
do you know how? or mb how to debug and turn encryption off?
Help for useing Hacks
10/27/2006 - GunZ - 11 Replies
This is for the people who still dont get how to use the put the hack _________________________________________________ ___________________ Step for how to use hacks Step 1: Open Up the Gunz launcher (Do Not Start Game) Step 2: Open ur Gunz folder and make sure u put ur Clean System somewhere safe Step 3: Put the Hacked file in the main folder



All times are GMT +1. The time now is 10:16.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.