PDA

View Full Version : Vb help.



aE[master]
08-20-2005, 06:45 PM
I'd like to start off this forum by thanking the people on the staff who activated my account at long last.

I am making a very simple hack. infact my 1st. so if the coding doesnt seem 100%, then thats why i am here.

My program is spose to change the letters on the score board in the pinball game of "3D Pinball for Windows - Space Cadet".

Directions: type in the players name you would like to change. Enter a new name. Click "Change".

I have provided the source code files that you would need. i have a good idea whats wronge. i think its the offset. To search for the adress i used Art$$$. But i am not sure if the offset is spsoe to be in decimal or in hex.
i found the adress was 01025578 in artmoney. i tryed to use just that as an offset didnt work. so i converted that to hex. didnt work. i tryed to put &H01025578 as in offset didnt work.
That is just one of the area's i would like some help in. If theres any other errors. Please correct me. Thanks for your time.

http://www.savefile.com/files/9320297

LCS
08-20-2005, 06:48 PM
You can post your source code right into a post, just put code tags around it.

aE[master]
08-21-2005, 08:10 AM
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, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal 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 Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
Dim check_game As Long
Private phandle As Long
Private off_set As Long

Private Sub getphandle()
Dim pid As Long
Dim GameHwnd As Long
GameHwnd = FindWindow(vbNullString, "3D Pinball for Windows - Space Cadet")
If (GameHwnd = 0) Then
Game_Id.Caption = "Error"
check_game = 1
End If
GetWindowThreadProcessId GameHwnd, pid
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle = 0) Then
Game_Id.Caption = "Error"
check_game = 1
End If
If (phandle = 0) Then
Game_Id.Caption = "3D Pinball Isn't loaded "
check_game = 1
End If
If (phandle <> 0) Then
Game_Id.Caption = "3D Pinball Is loaded "
check_game = 0
End If
End Sub

Private Sub Command1_Click()
Change
change_it_up
End Sub

Private Sub Form_Load()
getphandle
End Sub

Private Sub Timer_Timer()
getphandle
If GetAsyncKeyState(119) Then Change
If check_game = 1 Then Command1.Enabled = False
If check_game = 0 Then Command1.Enabled = True
End Sub
Private Sub Change()
Dim txt As String * 60
Dim addr As Long
PlyrName.Text = ddd
txt = ddd
ReadProcessMemory phandle, &HFA62A, txt, 60, 60

End Sub
Private Sub change_it_up()
Dim msg As String
Dim mony As String
Dim s As Long
New_Name.Text = mony
WriteProcessMemory phandle, &HFA62A, mony, 60, 60
End Sub

aE[master]
08-22-2005, 09:31 AM
this maybe a programming post but i think it should be in hacking related area. can some1 move this fourm back there.

xixor
08-22-2005, 09:43 AM
']Please correct me. Thanks for your time.
YOU STOLE THAT FROM ME!!!!!...o well,mine is still better...

Thank you for your time and cooperation

aE[master]
08-22-2005, 04:51 PM
at least someone posted. but i still need help

aE[master]
08-24-2005, 08:50 AM
anyone?

nickolay
08-24-2005, 11:38 AM
Help yourself.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/debugging_functions.asp

Uniquely_Defined
08-24-2005, 12:38 PM
Ah common nicko...It's VB for christ sakes.


Option Explicit
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByVal lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Public Const PROCESS_ALL_ACCESS As Long = &H1F0FFF

Private Sub cmdChange_Click()
Dim hwnd As Long
Dim pid As Long
Dim pHandle As Long
Dim hProcess as Long

hwnd = FindWindow(vbNullString, "Brood War")
If (hwnd = 0) Then
MsgBox "Window not found!"
Exit sub
End If
GetWindowThreadProcessId hwnd, pid
pHandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (pHandle = 0) Then
MsgBox "Couldn't get a process handle!"
Exit Sub
End If
WriteProcessMemory phandle, &HFA62A, mony, 60, 60

End Sub

There ya go if you haven't already figured it out. Enjoy.

nickolay
08-24-2005, 12:39 PM
Your point? I provided a link which contained more than enough information to help him accomplish his goal.

Uniquely_Defined
08-24-2005, 12:46 PM
Your point? I provided a link which contained more than enough information to help him accomplish his goal.
Yes, I know, google.com would also suffice. The point remains however, that if he had enough sense to actually use any search engine he wouldn't need to post. So, rather then try to explain it to him forever and ever...why not just give him the source. This way he can learn from it.

I'm just in a good mood today, so I thought I'd help is the bottom line. Whatever, what's done is done.

punture
08-25-2005, 11:44 AM
ok .. you are doing it way complicated than it should be... Just make a timer for the hotkey, and just use Uni's code for the offset..
edit: also.. since there are more than one name in the score board.. isn't there suppose to be more than one offset??

Edit: I was right.. there should be 5 offsets and I got 3 of them

First Place :01025578
Second Place: 0102559C
Third Place : 010255C0
Fourth Place : 010255E4
Fifth place : 01025608

aE[master]
08-26-2005, 07:12 AM
i knew about those 2 sites. its just whatever i did to the code never worked. so i "thought" Bwhacks was nice enough to help.

at anyrate How come i cant get the offsets for the numbers. it just doesnt show up in my searches.