Creating a Command Application RTM Tool [PS3/XBOX]

Hello everyone, today I'll be showing you how to create a Real Time Modding tool, however this tutorial will show you how to create one without a GUI. Instead, this tutorial will give you detailed steps to create your very own Command Editor, like my my Grand Theft Auto V: Command Editor.

This tutorial will cover creating a PS3 Command Application and I shall also touch on creating an XBOX Command Application. With that said, let's begin.


Right to begin with, you're going to want to head over to Visual Studios and create a new project. Instead of selecting 'Windows Form Application', you're going to select a 'Console Application'. Now you must name it, I always use something relevant. In this case, it shall be called Tutorial. Look at the screenshot below;

[​IMG]

Now we can select 'OK' and let it load in our new and untouched project.

You will be greeted by a page identical to the following,

[​IMG]

This is where all the magic is going to happen. Firstly, you're going to need the PS3Lib.dll. When you've got it, you must add it as a reference to your project.

This can be done by going to 'Project' > 'Add Reference' (Like so,)

[​IMG]

You should then select 'Browse' and find the location of your PS3Lib.dll, I have mine in it's own folder on C:\ so I'll select it and then ensure that the little checkbox is ticked, like so;

[​IMG]

Then to finalize the reference, we must add this to the top of the coding;

Code (Text):
using PS3Lib;

Like so;

[​IMG]

Now, we must begin adding the essentials needed to make our RTM Tool. Place the following code in the location that I do, this will help to declare the functions from the PS3Lib.

Code (Text):
public static PS3API PS3 = new PS3API();

Place it here;

[​IMG]

Now we can finally begin creating the base of the application and some nifty little features.

We're firstly going to ensure that the application doesn't close automatically upon opening, as is the case when creating a new Console Application. We're going to add a Boolean and also a command that will come in handy for an awesome feature.

Code (Text):

String command;
Boolean quitNow = false;
 

Add these two lines of code to the following place, this location isn't vital but I like to order things;

[​IMG]

As you can see, they're underlined. Don't panic! This is only because they've been declared but not used. Before we continue to making the commands, we'll add a cool little feature that will help make the users life easier when typing the commands!

Below those two new pieces of coding, add the following;

Code (Text):
      while (!quitNow)
                {
                command = Console.ReadLine();
                switch (command.ToLower())
                {
                }
                }
 
Your coding should now be looking like so;

[​IMG]

Basically, this now means that your application will no longer close upon opening it! It will stay open forever until you click the red X, which is what you want, is it not? Also the second line will make the tool recognize the commands that you have typed in. The 'command.ToLower())' part makes the tool read the command no matter how it's typed, like before it wouldn't recognize "/CoNnEcT" but with this small statement, it will!

Now to fill it with options and commands!

In order to create commands in Console Applications, it must be done via a 'case'. I'll give an example and hopefully you'll understand.

Code (Text):

case "/connect" :
* Connect coding here! *
break;
 

The 'case' is what you input to get an output basically and the 'break;' is used to break that command (does what it's called). Without this 'break;', it would continue to run all of the commands in your code until it finds a break point. So this is vital.

Let's code our Connect command!

We should all have something very similar to this,

[​IMG]

Here's the code to put in that command, I did some tweaks to this but you can use it how you feel.

Code (Text):
                        PS3.ChangeAPI(SelectAPI.ControlConsole);
                        if (PS3.ConnectTarget())
                        {
                            Console.WriteLine("Connected via : " + PS3.GetCurrentAPIName() + "\n\n");
                        }
                        else
                        {
                            Console.WriteLine("Error, Impossible to connect!\n\n");
                        }

Your tool should now look this this;

[​IMG]

You can also test it by debugging it and typing in your new command, you should get a window pop up like so;

[​IMG]

If that happens, you're doing it all correct!

Now I'll help you to add the Attach command! Add another case but this time name it something like "/attach"

Here's the code for the attach function;

Code (Text):
           
                        if (PS3.AttachProcess())
                            Console.WriteLine("Proccess Succesfully Attached!");
                        else Console.WriteLine("Please be sure that you are in a game!");
 


Your tool should now be looking like this;

[​IMG]

Now, I'm presuming you know how to code/add functions via PS3Lib, although I'll give you a couple of functions as examples and you can figure the rest out! (Examples from my GTA Tool, so offsets/bytes will be from GTA 1.15 Update)

Code (Text):

                            PS3.CCAPI.Notify(CCAPI.NotifyIcon.FRIEND, "Godmode: Enabled");
                            Console.WriteLine("\n  [+] You chose " + command + "\n");
                            PS3.SetMemory(0x110C828, new Byte[] { 0x38, 0x60, 0x7F, 0xFF, 0xB0, 0x7F, 0x00, 0xB4 });
 
This command features a PS3 Notification, the message & icon can be easily changed. This also has a feature that shows you exactly what you typed in which is a nifty little feature.

Here's my command;

[​IMG]

If you still don't understand how to create or add mods using the PS3Lib's SetMemory function then I believe you're in need of another tutorial. One that has been covered many times, so I shall not be going in depth about it.

Now that we've started creating the main features and functionality, I'll give you the final couple of features needed to finalize your tool!

These are functions I like to add to my tool to enable everyone is happy and to also help the user!

Firstly I'll show you about adding a '/quit' command that will close the window!

Code (Text):

case "/quit" :
quitNow = true;
break;
 

This will make the boolean become true, which in turn will cause the application to close immediately.

Another good thing to include is an error catching system, I'll also share the coding for this!

Code (Text):

                    default:
                        Console.WriteLine("\n  [+] Unknown Command was used! Command entered = " + command + "\n");
                        Console.WriteLine("  [+] Type /commands for a list of available commands\n");
                        break;
 
With that one, there is no need for you to create a 'case', just paste the code as you see it. Like so

[​IMG]

That's it for the Playstation 3 part of this guide, hopefully I helped some of you guys out!

Welcome to the XBOX 360 Edition of my tutorial! Before I continue, I will warn that this isn't going to be anywhere near as complex as my previous tutorial. Since I haven't actually made an XBOX tool, but I know how it works!

Like the PS3 part of this tutorial, you're going to want to open Visual Studios and create a new 'Console Application' and name it, again I'm going with something related to this thread!

[​IMG]

Now, to begin you'll need the XRPC.dll

When you've got that, you must add it as a reference to your project, this can be done like so;

'Project' > 'Add Reference'

[​IMG]

You should then select 'Browse' and find the location of your XRPC.dll, I have mine in it's own folder on C:\ so I'll select it and then ensure that the little checkbox is ticked, like so;

[​IMG]

Now we must finalize the reference by adding the "using" the reference. Add the following code to the top of your project.

Code (Text):
using XRPCLib;
Your tool should now look like the following;


Now, we must begin adding the essentials needed to make our RTM Tool. Place the following code in the location that I do, this will help to declare the functions from the XRPCLib.

Place the following in the same location as my screenshot;

Code (Text):
public static XRPC Jtag = new XRPC();
http://puu.sh/aOf07/38cf534a03.png
[/spoiler]

Now we can finally begin creating the base of the application and some nifty little features.

We're firstly going to ensure that the application doesn't close automatically upon opening, as is the case when creating a new Console Application. We're going to add a Boolean and also a command that will come in handy for an awesome feature.

[code]String command;
Boolean quitNow = false;[/code]

Add these two lines of code to the following place, this location isn't vital but I like to order things;

[spoiler=Boolean]
[IMG]http://puu.sh/aOfbN/0e10a6a7c5.png

As you can see, they're underlined. Don't panic! This is only because they've been declared but not used. Before we continue to making the commands, we'll add a cool little feature that will help make the users life easier when typing the commands!

Below those two new pieces of coding, add the following;

Code (Text):
      while (!quitNow)
                {
                command = Console.ReadLine();
                switch (command.ToLower())
                {
                }
                }
[​IMG]

Basically, this now means that your application will no longer close upon opening it! It will stay open forever until you click the red X, which is what you want, is it not? Also the second line will make the tool recognize the commands that you have typed in. The 'command.ToLower())' part makes the tool read the command no matter how it's typed, like before it wouldn't recognize "/CoNnEcT" but with this small statement, it will!

Now to fill it with options and commands!

In order to create commands in Console Applications, it must be done via a 'case'. I'll give an example and hopefully you'll understand.

Code (Text):
case "/connect" :
* Connect coding here! *
break;
The 'case' is what you input to get an output basically and the 'break;' is used to break that command (does what it's called). Without this 'break;', it would continue to run all of the commands in your code until it finds a break point. So this is vital.

Let's code our Connect command!

We should all have something very similar to this,

[​IMG]

Here's the code to put in that command, I did some tweaks to this but you can use it how you feel.

Code (Text):


                        Jtag.Connect();

                        if (Jtag.activeConnection)
                        {
                            Console.WriteLine("\n  [+] XRPC Tool has connected to Console!");
                            Jtag.Notify(XRPC.XNotiyLogo.FLASHING_HAPPY_FACE, "XRPC Tool Connected!");
                        }
                        else
                        {
                            Console.WriteLine("\n  [+] XRPC Tool has failed to connect to Console!");
                        }

 

Your tool should now look this this;

[​IMG]

Now, I'm presuming you know how to code/add functions via XRPCLib, although I'll give you a couple of functions as examples and you can figure the rest out! (Examples from my GTA Tool, so offsets/bytes will be from GTA TU15 Update)

Code (Text):

                            Jtag.Notify(XRPC.XNotiyLogo.FLASH_LOGO, "God Mode: Enabled");
                            Console.WriteLine("\n  [+] You chose " + command + "\n");
                            Jtag.SetMemory(0x110C828, new Byte[] { 0x38, 0x60, 0x7F, 0xFF, 0xB0, 0x7F, 0x00, 0xB4 });
If you still don't understand how to create or add mods using the XRPCLib's SetMemory function then I believe you're in need of another tutorial. One that has been covered many times, so I shall not be going in depth about it.

Now that we've started creating the main features and functionality, I'll give you the final couple of features needed to finalize your tool!

These are functions I like to add to my tool to enable everyone is happy and to also help the user!

Firstly I'll show you about adding a '/quit' command that will close the window!

Code (Text):
case "/quit" :
quitNow = true;
break;

This will make the boolean become true, which in turn will cause the application to close immediately.

Another good thing to include is an error catching system, I'll also share the coding for this!

Code (Text):
default:
                        Console.WriteLine("\n  [+] Unknown Command was used! Command entered = " + command + "\n");
                        Console.WriteLine("  [+] Type /commands for a list of available commands\n");
                        break;
With that one, there is no need for you to create a 'case', just paste the code as you see it. Like so

[​IMG]

That's it for the XBOX 360 Part of the guide, hopefully I helped!

Setting the window title like so;

[​IMG]

Code (Text):
Console.Title = "TEXT";
Setting the text's background color like so;

[​IMG]

Code (Text):
Console.BackgroundColor = ConsoleColor.Red;

Setting the foreground color of the window, like so;

[​IMG]

Code (Text):
Console.ForegroundColor = ConsoleColor.Yellow;

Clear the console window

Code (Text):
Console.Clear();

That's it for this tutorial, enjoy and hopefully you all like it!

1 comment:

  1. This is a great news that I must share with you all. I have been looking for a way to break into my wife's phone because she has a pass-code on her phone and is always receiving late night calls and text messages. I have been suspecting her for the past 1 year then, i contacted this hacker,who helped me hack into her phone and got me results under 24 hours he got me results of her call logs, text messages and even deleted text messages i was so happy to find out the truth about my wife i never knew she was a big time cheat until the HACKER (Michael) helped me, his prices are affordable contact him if you want to know more about your spouse and your relationship state and other services:- Like Website hack,whatsapp hack, Email. All you need to do just Email:- * (michaelcalce800@gmail.com) Text/whatsapp (+1 843 779 2336

    ReplyDelete