Results 1 to 9 of 9
  1. #1
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh

    little help (more a question of "is it possible" again) [vb question]

    i have an injector loader made for connecting to FTP (with VB) for DLL files, i wanna know if i can make it work and replace a rez file instead

    here is code (idc if you use it, go ahead, its a really simple loader)

    Code:
    Public Class Form1
        Private HACK As String = My.Computer.FileSystem.GetTempFileName & Rnd() * 99999 & ".dll"
        Private TargetProcessHandle As Integer
        Private pfnStartAddr As Integer
        Private pszLibFileRemote As String
        Private TargetBufferSize As Integer
    
        Public Const PROCESS_VM_READ = &H10
        Public Const TH32CS_SNAPPROCESS = &H2
        Public Const MEM_COMMIT = 4096
        Public Const PAGE_READWRITE = 4
        Public Const PROCESS_CREATE_THREAD = (&H2)
        Public Const PROCESS_VM_OPERATION = (&H8)
        Public Const PROCESS_VM_WRITE = (&H20)
    
        Public Declare Function ReadProcessMemory Lib "kernel32" ( _
        ByVal hProcess As Integer, _
        ByVal lpBaseAddress As Integer, _
        ByVal lpBuffer As String, _
        ByVal nSize As Integer, _
        ByRef lpNumberOfBytesWritten As Integer) As Integer
    
        Public Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( _
        ByVal lpLibFileName As String) As Integer
    
        Public Declare Function VirtualAllocEx Lib "kernel32" ( _
        ByVal hProcess As Integer, _
        ByVal lpAddress As Integer, _
        ByVal dwSize As Integer, _
        ByVal flAllocationType As Integer, _
        ByVal flProtect As Integer) As Integer
    
        Public Declare Function WriteProcessMemory Lib "kernel32" ( _
        ByVal hProcess As Integer, _
        ByVal lpBaseAddress As Integer, _
        ByVal lpBuffer As String, _
        ByVal nSize As Integer, _
        ByRef lpNumberOfBytesWritten As Integer) As Integer
    
        Public Declare Function GetProcAddress Lib "kernel32" ( _
        ByVal hModule As Integer, ByVal lpProcName As String) As Integer
    
        Private Declare Function GetModuleHandle Lib "Kernel32" Alias "GetModuleHandleA" ( _
        ByVal lpModuleName As String) As Integer
    
        Public Declare Function CreateRemoteThread Lib "kernel32" ( _
        ByVal hProcess As Integer, _
        ByVal lpThreadAttributes As Integer, _
        ByVal dwStackSize As Integer, _
        ByVal lpStartAddress As Integer, _
        ByVal lpParameter As Integer, _
        ByVal dwCreationFlags As Integer, _
        ByRef lpThreadId As Integer) As Integer
    
        Public Declare Function OpenProcess Lib "kernel32" ( _
        ByVal dwDesiredAccess As Integer, _
        ByVal bInheritHandle As Integer, _
        ByVal dwProcessId As Integer) As Integer
    
        Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
        ByVal lpClassName As String, _
        ByVal lpWindowName As String) As Integer
    
        Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandleA" ( _
        ByVal hObject As Integer) As Integer
    
    
        Dim ExeName As String = IO.Path.GetFileNameWithoutExtension(Application.ExecutablePath)
    
        Private Sub Inject()
            On Error GoTo 1
            Timer1.Stop()
            Dim TargetProcess As Process() = Process.GetProcessesByName("PROCESS NAME HERE")
            TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id)
            pszLibFileRemote = HACK
            pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
            TargetBufferSize = 1 + Len(pszLibFileRemote)
            Dim Rtn As Integer
            Dim LoadLibParamAdr As Integer
            LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
            Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
            CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
            CloseHandle(TargetProcessHandle)
    1:      Me.Close()
        End Sub
    
        Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            If IO.File.Exists(HACK) Then
                Dim TargetProcess As Process() = Process.GetProcessesByName("PROCESS NAME HERE")
                If TargetProcess.Length = 0 Then
                    Me.TextBox1.Text = ("Waiting for PROCESS.exe")
                Else
                    Me.TextBox1.Text = ("Downloading...")
                    Try
                        Dim httpclient = New Net.WebClient
                        httpclient.Credentials = New Net.NetworkCredential("ftp_username", "ftp_password")
                        httpclient.DownloadFile("ftp://yoursite.com/hack.dll", Application.StartupPath & "\hack.dll")
                        IO.File.Move(Application.StartupPath & "\hack.dll", HACK)
                        Dim TargetProcess As Process() = Process.GetProcessesByName("PROCESS NAME")
                        If TargetProcess.Length = 0 Then
                            Me.TextBox1.Text = ("Waiting for GAME.exe")
                        Else
                            Timer1.Stop()
                            Me.TextBox1.Text = "Done..."
                            Call Inject()
                        End If
                    Catch
                        MsgBox("Error: " + ErrorToString(), MsgBoxStyle.Critical, "Error")
                    End Try
                End If
            End If
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Timer1.Interval = 50
            Timer1.Start()
        End Sub
    End Class
    any help will be thanked!

    commando: You're probably the best non-coder coder I know LOL


  2. #2
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,409
    My Mood
    In Love
    Dude, you didn't make that loader.
    My.computer.Network.Downloadfile?
    No I do not make game hacks anymore, please stop asking.

  3. #3
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh
    Did I say I did? No, I simply asked ifit was modifiable for my super mods purpose

  4. #4
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,409
    My Mood
    In Love
    Quote Originally Posted by supercarz1991 View Post
    Did I say I did? No, I simply asked ifit was modifiable for my super mods purpose
    This is for injecting a dll into a .exe
    Injecting mods into a file is completely different. It opens the file, overwrites the files needed then closes it.
    No I do not make game hacks anymore, please stop asking.

  5. #5
    Grim's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    5,359
    Reputation
    112
    Thanks
    3,786
    My Mood
    Cynical
    what flames is trying to say is yes, it is possible. remove the injection method, and change the download to the combat arms/game folder

    of course you need a list of the rez files, and permission from mpgh staff to post that sort of program.

    we didnt use to let people put automatic updating programs and shit because of the possibility of a virus. even if you wouldn't do that now, there's no guarantee you wont get pissed off at the site and do it later
    Last edited by Grim; 03-08-2011 at 03:25 AM.
    Want to see my programs?
    \/ CLICK IT BITCHES \/

  6. The Following User Says Thank You to Grim For This Useful Post:

    flameswor10 (03-08-2011)

  7. #6
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh
    I hate auto update, I've been hit by viruses through em, so I either turn em off or fund a different program...anyway I wanna make a hack loader where it will inject a dll have for hacks like no recoil, no spread and other things mods fall short with..then it will auto load rez chams since I cant do dip chams. And long range instant pick up.

    It would make an overall 1 of a kind hack

  8. The Following User Says Thank You to supercarz1991 For This Useful Post:

    giza123 (03-08-2011)

  9. #7
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    web clients does it also.. Can you tell me why you are moving the file from one location.... To the same location..


    this question is for the VB section
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  10. #8
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh
    Quote Originally Posted by topblast View Post
    web clients does it also.. Can you tell me why you are moving the file from one location.... To the same location..


    this question is for the VB section
    its ca coding related, so thats why its here

    and i just found the source through google, i didn't feel like editing it

    commando: You're probably the best non-coder coder I know LOL


  11. #9
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,409
    My Mood
    In Love
    How bout learn to build the exe with the .rez files inside and then dump it to the CA folder. (like I did with rezchams loaders)
    No I do not make game hacks anymore, please stop asking.