Sending commands without using the game-console

Need Help With an Existing Feature in Memory Hacking Software? Ask Here

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

Sending commands without using the game-console

Postby trialusert » Wed Jun 24, 2009 10:16 pm

Hello. I'm trying to use c# in order to send commands to a game-server, instead of typing the commands manually in the game console.
For example, if I want to change my name in-game, I need to open the console and type "/name ***". How can I send commands to the game server without using the game-console? My purpose is to make a little software that changes the in-game name automatically.

Thanks.
User avatar
trialusert
NULL
 
Posts: 155
Joined: Tue May 20, 2008 6:19 pm

Postby SpeedWing » Wed Jun 24, 2009 11:06 pm

do you mean something like this?

I don't know much bout C#, but I hope this helps you out


you will need to set a hotkey to call this thread, but I would have no idea how to do that, maybe you could check it out here: http://20.targetprocess.com/2006/10/hot ... ndows.html
Code: Select all
private void typetext()
{
SendKeys("/name ***") ;
}

User avatar
SpeedWing
Defragler
 
Posts: 2031
Joined: Tue Jan 01, 2008 1:00 am
Location: If there is a Will there is a Solution.

Postby trialusert » Wed Jun 24, 2009 11:16 pm

That means I'll have to send a key that opens the game-console, and then send the command keys? If so, will I see the console gets opened? Because that's not my purpose...
User avatar
trialusert
NULL
 
Posts: 155
Joined: Tue May 20, 2008 6:19 pm

Postby SpeedWing » Wed Jun 24, 2009 11:28 pm

I think you should wait until someone with a bit more knowledge should answer this.

and yes you need to have the game console open to send the command with this way. who knows if there is an other way to do it.

( as i said 6-7 lines ago, just wait untill someone with a bit more knowledge answers) ( Hint hint. L.Spiro) XD
User avatar
SpeedWing
Defragler
 
Posts: 2031
Joined: Tue Jan 01, 2008 1:00 am
Location: If there is a Will there is a Solution.

Postby Eradicator » Thu Jun 25, 2009 6:20 am

You have two options, as far as I can tell.


Disclaimer: I'm by no means an expert, someone more experienced probably can probably answer your question in more depth.

  • __stdcall - You can use this function to call the game's own functions from outside of the game. In my opinion, this is the better of the two options. Use MHS to find the function that sends text from the console, and use __stdcall to send whatever you want to. http://msdn.microsoft.com/en-us/library/zxk0tw93(VS.71).aspx
  • Packets - You can use a packet program, such as Wireshark or Winsock Packet Editor to log the packets, and then have your program send them. This would be the more difficult of the two options, because chances are the packets are encrypted, and you'd have to figure out how to send them from within the game.
Eradicator
I Have A Few Questions
 
Posts: 5
Joined: Thu May 08, 2008 8:28 am

Postby L. Spiro » Thu Jun 25, 2009 6:26 am

__stdcall is a calling convention. It does not in itself allow you to call functions in other processes.

In C# you probably have access to SendInput().
If you do not DllImport it and use it directly.
There is plenty of documentation on how to use it, and you can test it in MHS before you try in your C# project.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan


Return to Help

Who is online

Users browsing this forum: No registered users and 0 guests