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 


[request] help in c#
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
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Nov 19, 2007 12:46 pm    Post subject: [request] help in c# Reply with quote

how do i insert an assembly scripts into a C# script?
_________________
Stylo
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Nov 19, 2007 12:49 pm    Post subject: Reply with quote

You can't really do that.

Try making a C++ DLL that has an Assembly script, and call the DLL in your C# application.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Nov 19, 2007 12:54 pm    Post subject: Reply with quote

the problem is that i dont know to program in c++
maybe u can give me the program in c++ and i'll just add the assembly script and if u can to teach me how to call the dll in my c# application it'll be great =]

_________________
Stylo
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Nov 19, 2007 12:58 pm    Post subject: Reply with quote

Lol, I don't know how to do the C++ DLL stuff, but I know this:

Code:

void MyMethod(void)
{
      asm
      {
              //Your ASM script here
      }
}


But you should Google about that

And as for the C#

Code:

//using System.Runtime.InteropServices
[DLLImport("DLLNAMEHERE.dll")]
private static extern MyMethod();

//Later on in the code..

MyMethod();


I think that's how you do that--I know you do [DLLImport] with API Calling, but I haven't done it with custom DLLs before.
Back to top
View user's profile Send private message
killersamurai
Expert Cheater
Reputation: 0

Joined: 10 Sep 2007
Posts: 197
Location: Colorado

PostPosted: Mon Nov 19, 2007 1:13 pm    Post subject: Reply with quote

When you create your dll in c++, you would have to export the function.
Code:

_declspec (dllexport) void Something();


To do inline asm, it should start like this
Code:

__asm
{
}
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Nov 19, 2007 1:23 pm    Post subject: Reply with quote

Alright, I'm not too experienced with C++, thank you.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Mon Nov 19, 2007 4:46 pm    Post subject: Reply with quote

Just WPM the whole thing.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Nov 19, 2007 5:08 pm    Post subject: Reply with quote

I don't think 1qaz means to edit something else's memory, I think he/she/it wants to do inline.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Tue Nov 20, 2007 1:12 am    Post subject: Reply with quote

i wanted to make a trainer, i mean to make a windowApplication and add button and when i click on it inside the game it'll turn on the script Confused
_________________
Stylo
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Tue Nov 20, 2007 10:39 am    Post subject: Reply with quote

Oh, then yeah, WPM it all.

I'm going to release my framework for hacking in C# soon, so just wait a little longer.
Back to top
View user's profile Send private message
CyClonenl
Newbie cheater
Reputation: 0

Joined: 12 Mar 2005
Posts: 24

PostPosted: Tue Nov 20, 2007 2:00 pm    Post subject: Reply with quote

I dont think it can be done.
You should check this page, it helped me a lot creating my trainer in C# Smile
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Nov 20, 2007 2:10 pm    Post subject: Reply with quote

CyClonenl wrote:
I dont think it can be done.
You should check this page, it helped me a lot creating my trainer in C# Smile


It can be done. Just use WriteProcessMemory to write your whole script in, the only difference is you would be writing the entire thing in bytes rather than a "script". Just look in memory view and write down what it is, then what it is after the script, and just write that all with WPM
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Tue Nov 20, 2007 2:57 pm    Post subject: Reply with quote

I'm currently working on a framework to help out with hackers, that is lightly based off of gamesguru's C# trainer thing.

It will have the ability to convert an opcode into an array of bytes, but you'regonna have to wait on that. ;)[/quote]
Back to top
View user's profile Send private message
CyClonenl
Newbie cheater
Reputation: 0

Joined: 12 Mar 2005
Posts: 24

PostPosted: Tue Nov 20, 2007 4:07 pm    Post subject: Reply with quote

slovach wrote:
CyClonenl wrote:
I dont think it can be done.
You should check this page, it helped me a lot creating my trainer in C# Smile


It can be done. Just use WriteProcessMemory to write your whole script in, the only difference is you would be writing the entire thing in bytes rather than a "script". Just look in memory view and write down what it is, then what it is after the script, and just write that all with WPM


Oh that is very possible, i've done it myself.
See the attachment, its the full source of a minesweeper c# trainer Smile

No comments in the source, but its a good reference. It shows you how to read a value and display it (The title of the window will be the time in minesweeper) writing user input to an address and changing optcodes.



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Tue Nov 20, 2007 4:12 pm    Post subject: Reply with quote

Yeah, it really is quite easy to do.

Right now, the only thing you can do is use CE to find the array of bytes for an opcode, and use WPM with those.

But sometime in the future, I will have something to convert string to opcode. =)
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