Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help with the correct source code
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
synapsehome
How do I cheat?
Reputation: 0

Joined: 13 Jul 2011
Posts: 7

PostPosted: Wed Jul 13, 2011 12:19 pm    Post subject: Help with the correct source code Reply with quote

Hi all! Before that I was doing simple cheats, addresses the necessary parameters were in the form 01000549 and problems with writing to memory does not arise, but now I'm faced with this problem - the address of parameter is material.dll + EB459 (static). How i can write to this adress (source pls Razz)
PS. Sry about my bad English, im from far Russia Very Happy


Last edited by synapsehome on Wed Jul 13, 2011 12:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
AhMunRa
Grandmaster Cheater Supreme
Reputation: 27

Joined: 06 Aug 2010
Posts: 1117

PostPosted: Wed Jul 13, 2011 12:25 pm    Post subject: Reply with quote

You could try Winject

http://www.cheat-project.com/cheats-hacks/1382/WinJect-1.7/

_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.>
Back to top
View user's profile Send private message
synapsehome
How do I cheat?
Reputation: 0

Joined: 13 Jul 2011
Posts: 7

PostPosted: Wed Jul 13, 2011 12:35 pm    Post subject: Reply with quote

I dont need winject 1.7, i need source to inject.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Jul 13, 2011 12:38 pm    Post subject: Reply with quote

synapsehome wrote:
I dont need winject 1.7, i need source to inject.


There are plenty of sites that have tons of injector examples, sources, and explanations. Rather then getting spoon-fed try searching before you beg next time.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Acubra
Advanced Cheater
Reputation: 0

Joined: 19 Jun 2011
Posts: 64
Location: C:\Windows\System32\HoG

PostPosted: Wed Jul 13, 2011 12:57 pm    Post subject: Reply with quote

You need to receive the ModuleBase of the material.dll. To achieve this you need to use the API CreateToolhelp32Snapshot and then loop through the moduls via Module32Next. If you found the correct module, you just have to add the offset (in your case it's EB459) to the moduleaddress and you are at the correct address to write your codeinjection or whatever you want to do there.
Back to top
View user's profile Send private message
synapsehome
How do I cheat?
Reputation: 0

Joined: 13 Jul 2011
Posts: 7

PostPosted: Wed Jul 13, 2011 1:08 pm    Post subject: Reply with quote

Thx, but i know about it. I cant write a code, there are a lot of errors. Do you have any examples? I cant find them in google, wtf.
Back to top
View user's profile Send private message
Acubra
Advanced Cheater
Reputation: 0

Joined: 19 Jun 2011
Posts: 64
Location: C:\Windows\System32\HoG

PostPosted: Wed Jul 13, 2011 1:37 pm    Post subject: Reply with quote

Just google "CreateToolhelp32Snapshot your programming language" and you will find tons of examples.
Back to top
View user's profile Send private message
AhMunRa
Grandmaster Cheater Supreme
Reputation: 27

Joined: 06 Aug 2010
Posts: 1117

PostPosted: Wed Jul 13, 2011 3:25 pm    Post subject: Reply with quote

Sorry, I misinterpreted your question. You can search the Programming section here, there are tons of examples.
_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.>
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Wed Jul 13, 2011 3:57 pm    Post subject: Reply with quote

Acubra wrote:
You need to receive the ModuleBase of the material.dll. To achieve this you need to use the API CreateToolhelp32Snapshot and then loop through the moduls via Module32Next. If you found the correct module, you just have to add the offset (in your case it's EB459) to the moduleaddress and you are at the correct address to write your codeinjection or whatever you want to do there.

Why when you can just use System.Diagnostics.ProcessModuleCollection.
Seems like alot of extra work when you have the tools already.

@synapsehome
Which language are you referring to.

_________________
Back to top
View user's profile Send private message
Acubra
Advanced Cheater
Reputation: 0

Joined: 19 Jun 2011
Posts: 64
Location: C:\Windows\System32\HoG

PostPosted: Wed Jul 13, 2011 4:03 pm    Post subject: Reply with quote

Hey Pingo,
not everyone is using .net. In MASM or C there is no other way to do it. (At least I don't know them)
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Wed Jul 13, 2011 4:09 pm    Post subject: Reply with quote

Acubra wrote:
Hey Pingo,
not everyone is using .net. In MASM or C there is no other way to do it. (At least I don't know them)

True, i never thought of that. Im having an off day

_________________
Back to top
View user's profile Send private message
synapsehome
How do I cheat?
Reputation: 0

Joined: 13 Jul 2011
Posts: 7

PostPosted: Thu Jul 14, 2011 3:06 am    Post subject: Reply with quote

forum.cheatengine.org/viewtopic.php?t=539364 - this i need, but i need to write float and integer at material.dll + EB459
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Thu Jul 14, 2011 4:21 am    Post subject: Reply with quote

Just remember, WriteProcessMemory writes the value as a byte array.
Whatever value type you need to write, you'll need to convert it to bytes.
Code:
WriteProcessMemory(Process_Handle, Address, Bytes, Bytes_Length, 0)

So to write a float/integer value, you need to convert it to byte array first.
Code:
BitConverter.GetBytes(Value)

And just make a simple write float, something like this
Code:
    Public Sub WriteFloat(ByVal iAddress As Integer, ByVal Float_Value As Single)
        Dim pBytes As Byte() = BitConverter.GetBytes(Float_Value)
        WriteProcessMemory(IntPtr.Zero, iAddress, pBytes, pBytes.Length, 0)
    End Sub

But replace IntPtr.Zero with the actual process handle.

For the module, just get the Baseaddress and add the offset.

_________________
Back to top
View user's profile Send private message
synapsehome
How do I cheat?
Reputation: 0

Joined: 13 Jul 2011
Posts: 7

PostPosted: Thu Jul 14, 2011 10:17 am    Post subject: Reply with quote

Thank you. But now i have the problem with the record to memory. I need to write the number 1 in the process of HL2. What is the pBytes.Length and 0?
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Thu Jul 14, 2011 10:30 am    Post subject: Reply with quote

read the docs : http://msdn.microsoft.com/en-us/library/ms681674(v=vs.85).aspx
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites