Results 1 to 11 of 11
  1. #1
    NitroSmily's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    101
    Reputation
    10
    Thanks
    1,066
    My Mood
    Tired

    Exclamation Visual Basic "Open" in class is not possible! Help!

    Hello, I'm making a hack now, but I couldn't write this in my class!

    Error 1 'Open' is not declared. File I/O functionality is available in the 'Microsoft.VisualBasic' namespace.


    __________________________________________________ ____________________


    This is My_Class:
    Code:
    Imports System****
    Imports System.Text
    Imports System.Runtime.InteropServices
    
    Public Class My_Class
    #Region "Basic Stuff"
    
        Dim ReadProcess As Process
    
        <DllImport("kernel32.dll")> _
        Private Shared Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
        End Function
        <DllImport("kernel32.dll")> _
        Private Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <[In](), Out()> ByVal buffer As Byte(), ByVal size As UInt32, ByRef lpNumberOfBytesWritten As IntPtr) As Int32
        End Function
        <DllImport("user32.dll", CharSet:=CharSet.Auto, ExactSpelling:=True)> _
        Public Shared Function GetKeyState(ByVal virtualKeyCode As Keys) As Short
        End Function
        Private pHandel As IntPtr
        Public Function Process_Handle(ByVal ProcessName As String) As Boolean
            Try
                Dim ProcList As Process() = Process.GetProcessesByName(ProcessName)
                If ProcList.Length = 0 Then
                    Return False
                Else
                    pHandel = ProcList(0).Handle
                    Return True
                End If
            Catch ex As Exception
                Console.Beep()
                Console.WriteLine("Process_Handle - " + ex.Message)
                Return False
            End Try
        End Function
        Private Function Read(ByVal Address As Integer, ByVal Length As Integer) As Byte()
            Dim Buffer As Byte() = New Byte(Length - 1) {}
            Dim Zero As IntPtr = IntPtr.Zero
            ReadProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
            Return Buffer
        End Function
        Private Sub Write(ByVal Address As Integer, ByVal Value As Integer)
            Dim Buffer As Byte() = BitConverter.GetBytes(Value)
            Dim Zero As IntPtr = IntPtr.Zero
            WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
        End Sub
    #End Region
    
        'This is the part you want to edit
    #Region "Write Functions (Integer & String)"
        Public Sub WriteInteger(ByVal Address As Integer, ByVal Value As Integer)
            Write(Address, Value)
        End Sub
        Public Sub WriteString(ByVal Address As Integer, ByVal Text As String)
            Dim Buffer As Byte() = New ASCIIEncoding().GetBytes(Text)
            Dim Zero As IntPtr = IntPtr.Zero
            WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
        End Sub
        Public Sub WriteBytes(ByVal Address As Integer, ByVal Bytes As Byte())
            Dim Zero As IntPtr = IntPtr.Zero
            WriteProcessMemory(pHandel, New IntPtr(Address), Bytes, CUInt(Bytes.Length), Zero)
        End Sub
        Public Sub WriteNOP(ByVal Address As Integer)
            Dim Buffer As Byte() = New Byte() {&H90, &H90, &H90, &H90, &H90}
            Dim Zero As IntPtr = IntPtr.Zero
            WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
        End Sub
    Public Function Hack(ByVal Application As String) As Boolean
            Dim pArray As Process() = Process.GetProcessesByName(Application)
            If pArray.Length = 0 Then
                Return True
            End If
            ReadProcess = pArray(0)
            Open()                        <----------------------------- Here is the problem
            Return False
        End Function
    
    #End Region
    #Region "Read Functions (Integer & String)"
        Public Function ReadInteger(ByVal Address As Integer, Optional ByVal Length As Integer = 4) As Integer
            Return BitConverter.ToInt32(Read(Address, Length), 0)
        End Function
        Public Function ReadString(ByVal Address As Integer, Optional ByVal Length As Integer = 4) As String
            Return New ASCIIEncoding().GetString(Read(Address, Length))
        End Function
        Public Function ReadBytes(ByVal Address As Integer, ByVal Length As Integer) As Byte()
            Return Read(Address, Length)
        End Function
    #End Region
    #Region "Extra"
        Public Function HotKey(ByVal Key As Keys) As Boolean
            Return Convert.ToBoolean(GetKeyState(Key))
        End Function
        Private Check_res As Boolean = True
        Public Function Check_Value(ByVal Value As String) As Integer
            For Each a As Char In Value
                If Char.IsNumber(a, 0) Then
                    Check_res = True
                Else
                    Check_res = False
                    Return 0
                    Exit For
                End If
            Next
            Return Convert.ToInt32(Value)
        End Function
    #End Region
    
        Sub SetByte(ByVal p1 As Integer, ByVal p2 As Integer)
            Throw New NotImplementedException
        End Sub
    
        Sub SetByte(ByVal p1 As Integer, ByVal Accolades As Byte())
            Throw New NotImplementedException
        End Sub
    
    End Class
    __________________________________________________ ___________________________


    Please if you can help me, reply
    Last edited by NitroSmily; 09-26-2012 at 02:10 PM.

  2. #2
    Horror's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    51,4.
    Posts
    6,935
    Reputation
    574
    Thanks
    5,023
    My Mood
    Twisted
    You might wanan highlight the error in the code ...
     

    Minion+ : February 2014 - January 2015
    Counter Strike: Global Offensive Minion : November 2014 - January 2015
    Alliance of Valiant Arms Minion : August 2014 - January 2015
    Need For Speed World Minion : January 2014 - January 2015
    Rust Minion : January 2014 - January 2015
    Call of Duty Minion : January 2013 - January 2015
    Editor : December 2012 - April 2013
    Donator : March 2014 - Current
    Member : October 2010 - Current

    Previously known as "Isaakske".

  3. #3
    -InSaNe-[Backup]'s Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    6
    My Mood
    Bored
    @Nachos This belongs to the Coding Section

    Use [code] tags for gods sake... Also, I don't know VB.. but I think the error says that you've to Import Microsoft.VisualBasic to use the Open() Method...

  4. #4
    Horror's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    51,4.
    Posts
    6,935
    Reputation
    574
    Thanks
    5,023
    My Mood
    Twisted
    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Diagnostics;
    using System.Runtime.InteropServices;
    using System****;
    using System.Threading;
    These are the ones i use (they include starting and stopping a process) so it should work ... Not sure doh
     

    Minion+ : February 2014 - January 2015
    Counter Strike: Global Offensive Minion : November 2014 - January 2015
    Alliance of Valiant Arms Minion : August 2014 - January 2015
    Need For Speed World Minion : January 2014 - January 2015
    Rust Minion : January 2014 - January 2015
    Call of Duty Minion : January 2013 - January 2015
    Editor : December 2012 - April 2013
    Donator : March 2014 - Current
    Member : October 2010 - Current

    Previously known as "Isaakske".

  5. #5
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,681
    Reputation
    905
    Thanks
    18,802
    My Mood
    Angelic
    Well, you maybe want to use this class instead:
    https://www.mpgh.net/forum/604-call-d...n-jorndel.html

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  6. #6
    NitroSmily's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    101
    Reputation
    10
    Thanks
    1,066
    My Mood
    Tired
    Didn't work
    Still can't Open()

    ---------- Post added at 01:32 PM ---------- Previous post was at 01:31 PM ----------

    Quote Originally Posted by Jorndel View Post
    Well, you maybe want to use this class instead:
    https://www.mpgh.net/forum/604-call-d...n-jorndel.html
    That's the one I used

  7. #7
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,681
    Reputation
    905
    Thanks
    18,802
    My Mood
    Angelic
    Quote Originally Posted by NitroSmily View Post
    Didn't work
    Still can't Open()

    ---------- Post added at 01:32 PM ---------- Previous post was at 01:31 PM ----------

    That's the one I used
    How can you?
    There is no Open there :S

    It's a total different.
    Here you use: Process_Handle.

    You use: Hack.

    So it's NOT the same.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  8. #8
    NitroSmily's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    101
    Reputation
    10
    Thanks
    1,066
    My Mood
    Tired
    Quote Originally Posted by Jorndel View Post


    How can you?
    There is no Open there :S

    It's a total different.
    Here you use: Process_Handle.

    You use: Hack.

    So it's NOT the same.
    I changed it, but now no one works or I guess never worked with the Process_Handle (No offence)
    When I click the button, it open visual basic and shows a yellow background at the Process_Handle.
    Also it comes a message that the object has no Object occurrence
    Last edited by NitroSmily; 09-26-2012 at 02:50 PM.

  9. #9
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,681
    Reputation
    905
    Thanks
    18,802
    My Mood
    Angelic
    Quote Originally Posted by NitroSmily View Post
    I changed it, but now no one works or I guess never worked with the Process_Handle (No offence)
    When I click the button, it open visual basic and shows a yellow background at the Process_Handle.
    Also it comes a message that the object has no Object occurrence
    :|

    You just have to re-write all your writing funtions or just re-name the methods in the class for the old you used.

    Process_Handle is the same as: Hack("iw5mp")

    Means you do:

    Process_Handle("iw5mp")


    ---------- Post added at 09:57 PM ---------- Previous post was at 09:55 PM ----------

    Also, why not just add me to skype and I will give you your answers withing 2 min :|

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  10. #10
    NitroSmily's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    101
    Reputation
    10
    Thanks
    1,066
    My Mood
    Tired
    Quote Originally Posted by Jorndel View Post


    :|

    You just have to re-write all your writing funtions or just re-name the methods in the class for the old you used.

    Process_Handle is the same as: Hack("iw5mp")

    Means you do:

    Process_Handle("iw5mp")


    ---------- Post added at 09:57 PM ---------- Previous post was at 09:55 PM ----------

    Also, why not just add me to skype and I will give you your answers withing 2 min :|
    Didn't work

  11. #11
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,681
    Reputation
    905
    Thanks
    18,802
    My Mood
    Angelic
    Problem is now solved and this can be closed.
    @ @Nachos

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

Similar Threads

  1. Visual Basic [Live] Classes
    By kunal1212 in forum Visual Basic Programming
    Replies: 3
    Last Post: 02-14-2011, 10:40 PM
  2. Possible? Visual Basic CA bypass
    By CoderNever in forum Combat Arms Discussions
    Replies: 13
    Last Post: 11-25-2009, 03:53 AM
  3. Error In Visual Basic 2008 Express Edition ( Thanking People Who Help )
    By Gunner03 in forum Visual Basic Programming
    Replies: 4
    Last Post: 02-14-2008, 02:45 PM
  4. Replies: 6
    Last Post: 11-26-2007, 08:46 PM
  5. Packets & Visual Basic
    By BadBob in forum Hack Requests
    Replies: 5
    Last Post: 07-20-2006, 10:28 PM