Visual Basic 6 Trainer Yapımı

vb logo‘Formumuza 1 textbox, 1 checkbox, 1 timer ekliyoruz.
Private Declare Function FindWindow Lib “user32” Alias “FindWindowA” (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib “user32” (ByVal hWnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib “kernel32” (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WriteProcessMemory Lib “kernel32” (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function ReadProcessMemory Lib “kernel32” (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function CloseHandle Lib “kernel32” (ByVal hObject As Long) As Long
Private Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
Private Sub Check1_Click() ‘timer komutunu kontrol eder
Timer1.Interval = 10 ‘timerın ne kadar süre ile tekrar edileceğini ayarlar.(1000 intervel = 1 saniye)
If Check1.Value = 1 Then
Timer1.Enabled = True
Else
Timer1.Enabled = False
End If
End Sub
Private Sub Timer1_Timer() ‘freeze işlemini gerçekleştirebilmek için timer kullanıyoruz.
On Error Resume Next
Dim hWnd As Long, pID As Long, hProcess As Long
hWnd = FindWindow(vbNullString, ” “) ‘pencere adı
GetWindowThreadProcessId hWnd, pID
hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, pID)
Dim pointer As Long
pointer = &H ‘bulduğumuz pointer
Dim buffer As Long
Dim adres As Long
Dim offset As Long
offset = &H ‘offset değeri
If ReadProcessMemory(hProcess, ByVal pointer, buffer, 4, 0) <> 0 Then
adres = CLng(buffer) + offset
End If
offset = &H ‘nekadar offset değeri bulduysak aşağıdaki işlemi okadar tekrarlamalıyız.
If ReadProcessMemory(hProcess, ByVal adres, buffer, 4, 0) <> 0 Then
adres = CLng(buffer) + offset
End If
buffer = CLng(Text1.Text) ‘Valueyi textboxdaki değerle değiştirir.
If (WriteProcessMemory(hProcess, ByVal adres, buffer, 4, 0&)) = 1 Then
End If
CloseHandle (hProcess)
End Sub
____________________________________
Ben trainerımı Cheat Engine Tutorial Step 8 için yapacam
öncelikle bize pencere adı pointer ve offset değerleri lazım, onları bulmak için caliber arkadaşımızın anlatımından faydalanıyoruz;
<center><a href=http://www.trgct.com/users/caliber/tutorials/Step%209/>”cheat engin tutorial step 8 pointer bulma” anlatım için tıklayınız</a></center>
pencere adı = Cheat Engine Tutorial
pointer = 00460C20
offset4= 0C
offset3= 14
offset2= 0
offset1= 18
bu değerlerimizi başına &H koyarak yazmalıyız… &H onaltılık sisteme çevirmemize yarayacaktır…
bulduğumuz offset sayısına göre;
offset = &H ‘nekadar offset değeri bulduysak aşağıdaki işlemi okadar tekrarlamalıyız.
If ReadProcessMemory(hProcess, ByVal adres, buffer, 4, 0) <> 0 Then
adres = CLng(buffer) + offset
End If
bu kısım tekrarlanır. kopyala/yapıştır…
aşağıda kodları yazarken ne işe yaradıklarını yanlarında anlatacağım, 1 textbox, 1 checkbox, 1 timer ekliyoruz…
____________________________________
‘Formumuza 1 textbox, 1 checkbox, 1 timer ekliyoruz.
Private Declare Function FindWindow Lib “user32” Alias “FindWindowA” (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib “user32” (ByVal hWnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib “kernel32” (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WriteProcessMemory Lib “kernel32” (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function ReadProcessMemory Lib “kernel32” (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function CloseHandle Lib “kernel32” (ByVal hObject As Long) As Long
Private Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
Private Sub Check1_Click() ‘checkbox a tick koyduğumuzda timerın çalışmasını sağlıyacak
Timer1.Interval = 10 ’10 milisaniyede bir timerın içerisindeki işlemi yapar. Freeze işlemini yapmak için kullanacağız. (1000=1sn)
If Check1.Value = 1 Then
Timer1.Enabled = True
Else
Timer1.Enabled = False
End If
End Sub
‘Cheat Engine Tutorial Step8 password = 525927
Private Sub Timer1_Timer()
On Error Resume Next
Dim hWnd As Long, pID As Long, hProcess As Long
hWnd = FindWindow(vbNullString, “Cheat Engine Tutorial“) ‘pencere adı
GetWindowThreadProcessId hWnd, pID
hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, pID)
Dim pointer As Long
pointer = “&H” + “004” + “60C20 ‘(00460C20) aradaki 004 değeri değişebilir ama genelde 004 olur?
‘Tutorial.exe nin açılma adresine göre değişir? Aslında şöyledir;
‘pointer = Tutorial.exe+60c20
‘ama daha tutorial.exe nin adres kodunu bulmayı bilmiyom 😛
Dim buffer As Long
Dim adres As Long
Dim offset As Long
offset = &HC ‘buraya offset değerlerimizi sondan başa doğru girecez (offset4)
If ReadProcessMemory(hProcess, ByVal pointer, buffer, 4, 0) <> 0 Then
adres = CLng(buffer) + offset
End If
offset = &H14 ‘buraya offset degerimizi girecez (offset3)
If ReadProcessMemory(hProcess, ByVal adres, buffer, 4, 0) <> 0 Then
adres = CLng(buffer) + offset
End If
offset = &H0 ‘buraya offset degerimizi girecez (offset2)
If ReadProcessMemory(hProcess, ByVal adres, buffer, 4, 0) <> 0 Then
adres = CLng(buffer) + offset
End If
offset = &H18 ‘buraya ofset degerimizi girecez. (offset1) Bulduğunuz offset sayısına göre burayı tekrarlayabilirsiniz.
If ReadProcessMemory(hProcess, ByVal adres, buffer, 4, 0) <> 0 Then
adres = CLng(buffer) + offset
End If
buffer = CLng(Text1.Text) ‘bu kısım valueyi textboxdaki değerle değiştirir.
If (WriteProcessMemory(hProcess, ByVal adres, buffer, 4, 0&)) = 1 Then
End If
CloseHandle (hProcess)
End Sub

1 Yorum var
  1. online

    ilginc bilgiler icin tesekkurler

Cevap Gönder

E-posta adresiniz yorumunuzda yayınlanmayacaktır.