Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > .NET Framework > Forum > รบกวนช่วยแนะนำทีค่ะ ไปต่อไม่ได้แล้วจริงๆ T^T' ค่าจาก CE ลงใน VB



 

รบกวนช่วยแนะนำทีค่ะ ไปต่อไม่ได้แล้วจริงๆ T^T' ค่าจาก CE ลงใน VB

 



Topic : 106533



โพสกระทู้ ( 5 )
บทความ ( 0 )



สถานะออฟไลน์




ทำ Form ที่เหลือหมดแล้วแต่มันติดแหงก อยู่ตรงนี้ที่เดียวเลย

คือหนูกำลังทำค่าที่ได้จากการหา Cheat Engine มาใส่ลงใน VB
แต่ที่หนูทำได้คือแค่เปลี่ยนค่าตรง Value ได้แต่แบบ 4 Byte

หนูอยากให้ตรง Value สามารถใส่ค่าจาก 4Byte เป็น Arry of byte ได้หรือเปล่าค่ะ
(ใส่ ReadWritingMemory.vb ไปในโปรเจ็คแล้วค่ะ )

Code (VB.NET)
Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button18.Click
        WriteInteger("Project", &H957670, Value:=1063172178)
    End Sub

Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click
        WriteInteger("Project", &H957670, Value:=00 00 00 0F 00 00 00 1B 00 00 00 28 00 00 00 37 00 00 00 03 00 00 00 08 00 00 00 14)
    End Sub


หนูลองทำโดยการเอาค่า Arry of byte มาใส่ Textbox แล้วกดปุ่ม Botton มันเกิดผลอะไรเลยค่ะ TT

Code (VB.NET)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        My.Computer.Audio.Play(My.Resources.button_click_, AudioPlayMode.Background)
        Dim ammount As String = TextBox1.Text
        Try
            WriteInteger("Project", &H120C228, ammount)

        Catch ex As Exception

        End Try
    End Sub



CE
รูปของค่าที่อยู่ใน CE ค่ะ

วานช่วยหรือแนะนำแนวทางสารพัดวิธีให้หน่อยนะค่ะ T^T
มันเหลือแค่ตรงนี้ที่เดียวจริงๆ



Tag : .NET, VB.NET







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2014-03-04 16:34:23 By : Loonciferspear View : 2704 Reply : 2
 

 

No. 1

Guest


แฮกส์เกมส์ ?
เคยมีโปรแกรมเมอร์ท่านหนึ่งบอกผมว่าถึงเด็กมันจะเขียนโปรแกรมแฮกส์เกมส์แต่อย่างน้อยเขาก็ได้เรียนรู้
ที่จะได้เขียนโปรแกรมซึ่งดีกว่าเอาเวลาไปทำเรื่องไร้สาระอย่างอื่น
-------------------------------------------------------------------------------------------------------------------
ลองใช้ Memory Module นี้ดูครับทำได้หลายอย่างเลย
Code (VB.NET)
Option Strict On

Imports System.Runtime.InteropServices
Imports System.Text

Module MemoryModule
    <DllImport("kernel32.dll")> _
    Private Function OpenProcess(ByVal dwDesiredAccess As UInteger, <MarshalAs(UnmanagedType.Bool)> ByVal bInheritHandle As Boolean, ByVal dwProcessId As Integer) As IntPtr
    End Function

    <DllImport("kernel32.dll", SetLastError:=True)> _
    Private Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal lpBuffer As Byte(), ByVal nSize As IntPtr, <Out()> ByRef lpNumberOfBytesWritten As IntPtr) As Boolean
    End Function

    <DllImport("kernel32.dll", SetLastError:=True)> _
    Private Function ReadProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, <Out()> ByVal lpBuffer() As Byte, ByVal dwSize As IntPtr, ByRef lpNumberOfBytesRead As IntPtr) As Boolean
    End Function

    <DllImport("kernel32.dll", SetLastError:=True)>
    Private Function CloseHandle(ByVal hObject As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
    End Function

    Private Const PROCESS_VM_WRITE As UInteger = &H20
    Private Const PROCESS_VM_READ As UInteger = &H10
    Private Const PROCESS_VM_OPERATION As UInteger = &H8
    Private Const TargetProcess As String = "iw5sp"
    Private ProcessHandle As IntPtr = IntPtr.Zero
    Private LastKnownPID As Integer = -1

    Public Function ReadMemory(Of T)(ByVal address As Integer) As T
        Return ReadMemory(Of T)(address, 0, False)
    End Function

    Public Function ReadMemory(ByVal address As Integer, ByVal length As Integer) As Byte()
        Return ReadMemory(Of Byte())(address, length, False)
    End Function

    Private Function ProcessIDExists(ByVal pID As Integer) As Boolean
        For Each p As Process In Process.GetProcessesByName(TargetProcess)
            If p.ID = pID Then Return True
        Next
        Return False
    End Function

    Private Function UpdateProcessHandle() As Boolean
        If LastKnownPID = -1 OrElse Not ProcessIDExists(LastKnownPID) Then
            If ProcessHandle <> IntPtr.Zero Then CloseHandle(ProcessHandle)
            Dim p() As Process = Process.GetProcessesByName(TargetProcess)
            If p.Length = 0 Then Return False
            LastKnownPID = p(0).Id
            ProcessHandle = OpenProcess(PROCESS_VM_READ Or PROCESS_VM_WRITE Or PROCESS_VM_OPERATION, False, p(0).Id)
            If ProcessHandle = IntPtr.Zero Then Return False
        End If
        Return True
    End Function

    Public Function ReadMemory(Of T)(ByVal address As Integer, ByVal length As Integer, ByVal unicodeString As Boolean) As T
        Dim buffer() As Byte
        If GetType(T) Is GetType(String) Then
            If unicodeString Then buffer = New Byte(length * 2 - 1) {} Else buffer = New Byte(length - 1) {}
        ElseIf GetType(T) Is GetType(Byte()) Then
            buffer = New Byte(length - 1) {}
        Else
            buffer = New Byte(Marshal.SizeOf(GetType(T)) - 1) {}
        End If
        If Not UpdateProcessHandle() Then Return Nothing
        Dim success As Boolean = ReadProcessMemory(ProcessHandle, New IntPtr(address), buffer, New IntPtr(buffer.Length), IntPtr.Zero)
        If Not success Then Return Nothing
        If GetType(T) Is GetType(Byte()) Then Return CType(CType(buffer, Object), T)
        If GetType(T) Is GetType(String) Then
            If unicodeString Then Return CType(CType(Encoding.Unicode.GetString(buffer), Object), T)
            Return CType(CType(Encoding.ASCII.GetString(buffer), Object), T)
        End If
        Dim gcHandle As GCHandle = gcHandle.Alloc(buffer, GCHandleType.Pinned)
        Dim returnObject As T
        returnObject = CType(Marshal.PtrToStructure(gcHandle.AddrOfPinnedObject, GetType(T)), T)
        gcHandle.Free()
        Return returnObject
    End Function

    Private Function GetObjectBytes(ByVal value As Object) As Byte()
        If value.GetType() Is GetType(Byte()) Then Return CType(value, Byte())
        Dim buffer(Marshal.SizeOf(value) - 1) As Byte
        Dim ptr As IntPtr = Marshal.AllocHGlobal(buffer.Length)
        Marshal.StructureToPtr(value, ptr, True)
        Marshal.Copy(ptr, buffer, 0, buffer.Length)
        Marshal.FreeHGlobal(ptr)
        Return buffer
    End Function

    Public Function WriteMemory(ByVal address As Integer, ByVal value As Object) As Boolean
        Return WriteMemory(address, value, False)
    End Function

    Public Function WriteMemory(ByVal address As Integer, ByVal value As Object, ByVal unicode As Boolean) As Boolean
        If Not UpdateProcessHandle() Then Return False
        Dim buffer() As Byte
        If TypeOf value Is String Then
            If unicode Then buffer = Encoding.Unicode.GetBytes(value.ToString()) Else buffer = Encoding.ASCII.GetBytes(value.ToString())
        Else
            buffer = GetObjectBytes(value)
        End If
        Dim result As Boolean = WriteProcessMemory(ProcessHandle, New IntPtr(address), buffer, New IntPtr(buffer.Length), IntPtr.Zero)
        Return result
    End Function
End Module


ส่วนโค้ดเรียกใช้ก็จะประมาณนี้

Code (VB.NET)
Dim myIntValue As Integer = ReadMemory(Of Integer)(&H12345678) ' Reads the value from 0x12345678 as an Integer
Dim myFloatValue As Single = ReadMemory(Of Single)(&H12345678) ' Reads the value from 0x12345678 as a Single (remember that Single is the same as Float)
Dim myASCIIStringValue As String = ReadMemory(Of String)(&H12345678, 10, False) ' Reads 10 characters at 0x12345678 as a ASCII String
Dim myUnicodeStringValue As String = ReadMemory(Of String)(&H12345678, 10, True) ' Reads 10 characters at 0x12345678 as a Unicode String
Dim myByteData() As Byte = ReadMemory(&H12345678, 12) ' Reads 12 bytes from 0x12345678

WriteMemory(&H12345678, 10I) ' Writes 10 as an Integer to 0x12345678, take note of the I at the end (it's optional but you can put it there just incase)
WriteMemory(&H12345678, 0.5F) ' Writes 0.5 as a Single to 0x12345678, take note of the F at the end! (you MUST do this or it will assume it's a Double!)
WriteMemory(&H12345678, "Hello World", False) ' Writes Hello World as an ASCII string to 0x12345678
WriteMemory(&H12345678, "Hello World", True) ' Writes Hello World as a Unicode string to 0x12345678
WriteMemory(&H12345678, New Byte() { &H90, &H90, &H90, &H90 }) ' Writes '0x90, 0x90, 0x90, 0x90' as a byte array to 0x12345678


หนูอยากให้ตรง Value สามารถใส่ค่าจาก 4Byte เป็น Arry of byte ได้หรือเปล่าค่ะ
Code (VB.NET)
WriteMemory(&H12345678, New Byte() { &H90, &H90, &H90, &H90 }) ' Writes '0x90, 0x90, 0x90, 0x90' as a byte array to 0x12345678







แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-04-26 22:10:48 By : Thekill
 


 

No. 2



โพสกระทู้ ( 160 )
บทความ ( 0 )



สถานะออฟไลน์
Twitter

เสริมตรง
"หนูลองทำโดยการเอาค่า Arry of byte มาใส่ Textbox แล้วกดปุ่ม Botton มันเกิดผลอะไรเลยค่ะ TT"
Code (VB.NET)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        My.Computer.Audio.Play(My.Resources.button_click_, AudioPlayMode.Background)
        Dim ammount As String = TextBox1.Text
        Try
            WriteInteger("Project", &H120C228, ammount)

        Catch ex As Exception

        End Try
    End Sub



ไม่เกิดผลนี่คือมันเกิด error ตก exception แล้วไม่ได้ดัก debug ไว้รึเปล่าครับ
ถ้าจะใส่ try catch ว่างๆ แบบนี่ควรจะดัก debug ไว้ หรือเขียน log ซะหน่อย จะได้รู้ว่ามันมี exception นะครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2014-04-26 23:58:43 By : natt_han
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : รบกวนช่วยแนะนำทีค่ะ ไปต่อไม่ได้แล้วจริงๆ T^T' ค่าจาก CE ลงใน VB
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่