You must be logged in to post Login Register
Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Visual Basic 6 ile trainer yapmak

UserPost

01:06
12/03/2010


iboo48

Member

posts 6

Post edited 22:16 – 11/03/2010 by iboo48


Merhaba arkadaÅŸlar,

trainer yapımını videolu olarak bir oyun üzerinde anlatmıştım ama videoda problem çıktı(oyun ekranı gözükmüyo), o yüzden moderatörümüz caliber'in Cheat Engine Tutorial'de pointer bulma videosundaki verilere dayalı olarak bir trainer yaptım…

Zaten yazdığım kodların yanlarına anlayabilmeniz ve düzenleyebilmeniz açısından notlar aldım…

Cheat Engine Tutorial Step 6 için hazırladım, caliber'in anlatımında(http://www.trgct.com/users/cal…../Step%206/) ki iÅŸlemleri yaparak aÅŸağıdaki verileri elde ettik;

pencere adı = Cheat Engine Tutorial

pointer = 00460C34

ofset = 0

bu değerleri 16′lık sistemde yazmamız gerekiyor, bunun için başına "&H" koymamız yeterli…

Aşağıda verdiğim kodları Visual Basicde Formu sağ tıklıyarak "view code" ye yapıştırın… Forma 1 textbox ve 1 buton ekleyin…

Kodların yanına eklediğim notlarla rahatlıkla düzenleyebileceğinizi düşünüyorum…

 

 

 

 

'Formumuza 1 Textbox, 1 Command Buton 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

'Cheat Engine Tutorial Step6 password = 098712

Private Sub Command1_Click()

On Error Resume Next

Dim hWnd As Long, pID As Long, hProcess As Long

hWnd = FindWindow(vbNullString, "Cheat Engine Tutorial") 'pencere adını giriyoruz (Cheat Engine Tutorial)

GetWindowThreadProcessId hWnd, pID

hProcess = OpenProcess(PROCESS_ALL_ACCESS, False, pID)

Dim pointer As Long

pointer = &H460C34   'buraya pointerimizi önüne "&H" koyarak yazıyoruz. (00460C34)

Dim buffer As Long

Dim adres As Long

Dim offset As Long

offset = &H0 'buraya ofset degerimizi önüne "&H" koyarak girecez. (Burada ofset = 0)

'assemble kodumuz "mov [eax],edx" , eger "mov [eax+4c],edx" olsaydı ofset degerimiz "4c" olacaktı.

If ReadProcessMemory(hProcess, ByVal pointer, buffer, 4, 0) <> 0 Then

adres = CLng(buffer) + offset

End If

'birden fazla ofset bulduysak aşağıya yazdığım kodların başlarındaki kesme işaretini silip her ofset değeri için tekrar tekrar ekleyebiliriz.

'offset = &H 'buraya ofset degerimizi girecez

'If ReadProcessMemory(hProcess, ByVal adres, buffer, 4, 0) <> 0 Then

'adres = CLng(buffer) + offset

'End If

buffer = CLng(Text1.Text)

If (WriteProcessMemory(hProcess, ByVal adres, buffer, 4, 0&)) = 1 Then

MsgBox "İşlem başarıyla tamamlandı", vbInformation

End If

CloseHandle (hProcess)

End Sub

Bişeyler paylaşmak istedim, belki işinize yarar… Cool

14:00
12/03/2010


Caliber

Reggio Emilia

Moderator

posts 64

Güzel döküman olmuş, tebrikler. Trainer hakkında türkçe döküman bulmak neredeyse mümkün değildi ki bu sorunu hallediyoruz gibi görünüyor.

21:09
12/03/2010


iboo48

Member

posts 6

teÅŸekkür ederim… Cool

Step 8 için de anlatayım;
gene caliber'in anlatımlarından (http://www.trgct.com/users/cal…../Step%209/) faydalanacağız…

Elde ettiÄŸimiz veriler;
pencere adı = Cheat Engine Tutorial
pointer = 00460C34
offset4= 0C
offset3= 14
offset2= 0
offset1= 18

AÅŸağıdaki kodları "view code" kısmına ekleyin ve forma 1 timer, 1 textbox, 1 checkbox ekleyin…
Kodları kendinize göre düzenleyebilirsiniz…

 

 

 

 

 

'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" + "4" + "60C20" 'aradaki 4 deÄŸeri deÄŸiÅŸebilir ama genelde 4 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 :P
 
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

Birazcık faydam dokunduysa ne mutlu bana… Wink

11:46
13/03/2010


b1u3D4rK

Admin

posts 159

gerçekten hoş bir örnek olmuş iboo, bunu bir tutorial formatında hazırlayıp bana gönderebilirsen senin için sitede yayınlayabilirim..

iyi çalışmalar..

04:18
15/11/2011


By_Altair

New Member

posts 2

Teşekkürler Şimdi Deniyorum Emeği Geçen Herkezin Ellerine SağlıkSmile


About the GencliQ CT Forum

Forum Timezone: Etc/GMT-3

Most Users Ever Online: 12

Currently Online:
3 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 3
Forums: 9
Topics: 94
Posts: 542

Membership:

There are 408 Members

There is 1 Admin
There are 5 Moderators

Top Posters:

jaglerx – 35
BiOS – 24
noqaj – 21
Hello EMO – 20
Hiaxi – 11
alewi_boy – 11

Recent New Members: asusserkan, mahmut, ayhans, carteltolga, vagabond, spanda

Administrators: b1u3D4rK (159 Posts)

Moderators: Caliber (64 Posts), zugo (29 Posts), GIRGIR (8 Posts), darkshade (6 Posts), _CC_ (3 Posts)