Post: [RELEASE] PS3Lib v4.5 - DEX/CEX
11-24-2013, 11:27 PM #1
(adsbygoogle = window.adsbygoogle || []).push({});

PS3 Library .NET

Version 4.5.1

Make real time tools easily for DEX or CEX consoles !




A new version of PS3Lib is now published. This dll allow you to connect into .NET language your console with TMAPI(Target Manager API) or with CCAPI(Control Console API) this works on DEX/CEX.

You should use this version to use CCAPI 2.70 (released coming soon).
This DLL is compatible also with CCAPI 2.60 but not anymore with older version (like CCAPI 2.50).

The download link is at the bottom of the page. The executables are inside the package with two demo projects included for understand how to use the full DLL (each functions are commented).


New features:

- Support CCAPI v2.60+.
- Read/Write memory as 'double'.
- Read/Write memory as 'float' array.
- ArrayBuilder constructor overload.
- Some functions fixes.


Some changes:

An overload of the class ArrayBuilder has been added, you can now define directly the size of the array that you want get on the class, just look that exemple:
    
ArrayBuilder build = new ArrayBuilder(0x50); // Create automatically an array with 80 bytes (0x50).
build.Write.SetInt32(0, 1337); // We write random things inside for exemple.
...
PS3.SetMemory(offset, build.ToArray()); // New feature who allow you to return the build as an array of bytes.


New extensions are implemented, we can now write/read memory floats array and doubles:
    
// Writes
PS3.Extensions.WriteDouble(offset, double);
PS3.Extensions.WriteFloats(offset, float[]);

// Read
double d = PS3.Extensions.ReadDouble(offset);
float[] fA = PS3.Extensions.ReadFloats(offset, length); // The second argument is the length of the array that we want get, exemple if we want the position XYZ of Call Of Duty we will put 3.


Some functions have been updated, like ReadString etc due to a bad code quality.


MD5 Hash:

- 0B35CC2DF877C881469094FE47D2E825


You must login or register to view this content.
(Download the .zip who contain the dll, the demos and source)
Last edited by iMCSx ; 02-15-2016 at 05:25 PM. Reason: Update v4.5.1

The following 170 users say thank you to iMCSx for this useful post:

^TPP^, -JM-, -SuperMan, ..jigsaw, {H} | Exception, {OM}1337{OM}, One, Kappa, ϟ c0rruption ϟ, A_Gen_Fiasco, aityahiaidir, Albus, anxify, BadChoicesZ, bAdReQuEsT, BeeMovie, bhoot-iq, BISOON, Brag, Choco, Cien, CITYCOMET, cl_21, Cmd-X, codmadz332, ContinueModder, cool9187, Creepzoid 0___0, Cyb3r, Dan Dactyl, Dan94, Dannie Fresh, Dark Nacho, Demon2Roxx, ErasedDev, DjFly, dnawrkshp, dolby1, EliteHackzPS3, esc0rtd3w, FarSideX, flynhigh09, FM|T Enstone, FM|T xDevOpS, FM|T ZoRo, Foxhoundz3, FranceDowngrade, FusionIsDaName, Gaukler1, Gendjisan, LightningMods, Harry, Hate, HeroWin, HiddenHour, homeedog, Hori_By_Nature, Hunter926, i_iTop_i, i6oz, Callumeleyy, iLLy-i, ImPiffHD, ImPokerz, Insult, iRnZ, iStonerHQ, iTпDM, JamRock2, Jannik007, JATOCH, JemEO, OfficialJesseP, Jgood, jp187187, kaser, KevinWinterX, Khairul Anuar, KILLSAGAINGoDz, kiwi_modz, KranK, Krxxl, Kryptus, LizzoOo, Loxy, M-alShammary, M4K3VELi7-, Macauly, Mango_Knife, mastakiller13, Mateljgz, Mawndo, MegaMister, metoshkata, MOD-RuLeZ, MODZ4FUN420, moekroeman, Mr.Azoz, MrBerrics and 70 other users.
12-13-2013, 06:55 PM #56
Mango_Knife
In my man cave
Originally posted by iMCSx View Post
PS3Lib v4.2 released.

Topic updated.


Good.
01-08-2014, 02:32 PM #57
codmadz332
Pokemon Trainer
thanks m8 very nice job Shiver
01-18-2014, 12:21 AM #58
I add CCAPI.DLL in reference and Press Ok it gives me this message
CCAPI.DLL not found! you need to put this dll in the same folder of your executable to use his functions!
02-18-2014, 07:27 PM #59
Dacoco
I void warranties.
Originally posted by iMCSx View Post



PS3 Library .NET

Version 4.2

Integration CCAPI C# - Make Real Time Tools Easily For DEX or CEX consoles !


A new version of PS3Lib is now released. This version allows you to connect via .NET language your console with TMAPI(Target Manager API) or with CCAPI (Control Console API) so it works for DEX / CEX Smile

The download link is at the bottom of this thread (Codeplex link + viruscan) and the package contains all binaries needed + 2 demo projects C#.


New features :

- Support CCAPI v2.0 C#.
- Function ReadString is now very fast.
- Extension class support both API's.
- ArrayBuilder for build arrays easily.
- IO Removed (Few people used it).
- Set API to switch when you want.
- Use both API's with same function names.
- Dialog CCAPI for ip implemented.
- Connect & Attach function returns bool.
- Fixed some bugs TMAPI.


Changelog v4.1 :

- Integration classic functions PS3TMAPI_NET.dll (so you don't need to use it anymore)
- Extension class fixed if you use ccapi you don't have an error about PS3TMAPI_NET.dll.
- You can access to TMAPI_NET class with : using PS3Lib.NET;

Changelog v4.1.1.0 :

- All instances error have been fixed ! The dll works just fine now !
- Thanks to SnaY for his testing with this new version !

Changelog v4.2 :

- The DLL use now the .NET Framework 4.0, so windows XP is now compatible.
- Added functions PowerOff / PowerOn for TMAPI.
- Added function InitComms for TMAPI & InitTarget for PS3API (To re-init your console in a thread or a timer)
- A part of a function has been edited.


These app in below are just 2 demo coded very quickly only for show you all possibility.



Here 2 Pictures :

You must login or register to view this content.

You must login or register to view this content.


I'll start to explain how to add/use the dll in your project right now.

Once you have extracted the binaries folder of the .zip, add the dll PS3Lib as reference into visual studio, and in your source code :

    using PS3Lib;


Your ready to use the dll. Now this thread is splitted in 3 parts.
Don't worry, if you dont understand something i left 2 Demo projects (source) in the package.
If you have an error like "Impossible to load PS3TMAPI_NET.dll" just place this dll in the same directory of your .exe



I - PS3API (TMAPI & CCAPI All in one)

- This part is to use CCAPI or TMAPI when you want ! You can switch modes at all time.

It's VERY useful if you want make a tool compatible TMAPI and CCAPI without changing your code.

You need to create this instance :


    
[LEFT]// This will set by default the TMAPI
private PS3API PS3 = new PS3API();

// If you want set instantly the CCAPI so make this :
private PS3API PS3 = new PS3API(SelectAPI.ControlConsole);[/LEFT]

You can now use the function connect & attach :

    
[LEFT]if(PS3.ConnectTarget())
{
//Connected, so we'll attach the process
if(PS3.AttachProcess())
{
// Attached !
}
else { // ERROR ATTACH }
}
else
{
// Connection error.
}[/LEFT]

Yeah, here these functions return a boolean. If you have selected TMAPI, the default console will be connect, if you have selected the CCAPI, a mini dialog will be displayed for the IP.

If you want make your own custom dialog, just look at my sources.
You can now use all basic functions like SetMemory/GetMemory and Extensions too !

You can change the api with this function :


    
[LEFT]PS3.ChangeAPI(SelectAPI.TargetManager); // Or SelectAPI.ControlConsole for CCAPI Smile[/LEFT]


There are some useful functions like GetCurrentAPI or GetCurrentAPIName (string), here the last example :


    
[LEFT]if(PS3.GetCurrentAPI() == SelectAPI.TargetManager)
{
// You use TMAPI.
}
else
{
// You use CCAPI.
}[/LEFT]
It's pretty simple, right ? I think this class was the best solution to make RTE Tools without editing your code :p



II - CCAPI

This part is for use ONLY CCAPI.

You need to create an instance of the class CCAPI, i recommand to use global variable, so do this :

    private CCAPI PS3 = new CCAPI();


Now into a button , you can use all functions, example here for connect and attach :


    
[LEFT]// Connect
PS3.ConnectTarget("192.168.1.13"); // Here you need to put the PS3 IP


// Attach Default GAME process :
PS3.AttachProcess();


// You can also use the function SUCCESS for know if the function has been correctly executed so :
if(PS3.SUCCESS(PS3.AttachProcess())
{
// It's good !
}
else
{
// Not good..
}[/LEFT]


Or you can select which process to attach :


    
[LEFT]

/******** Attach the default Process GAME ********/

PS3.AttachProcess();


/******** Attach a process manually ********/

// Get all running processes
procs = new uint[64];
PS3.GetProcessList(out procs);


// Get a process name
string name = String.Empty;
PS3.GetProcessName(procs[0], ref name); // Return the name of the process 0.


// Attach your desired process
PS3.AttachProcess(procs[0]);


/******** Attach a basic process by enum ********/

// Attach directly a basic process : (Only if you don't want make codes)
PS3.ProcessAttach(CCAPI.ProcessType.VSH);[/LEFT]

As you saw, the method AttachProcess has 3 overloads, very useful.

You're now able to set or get memory :


    
[LEFT]// Set Memory
byte[] buffer = new byte[] { 0x10, 0x20, 0x30, 0x40};
PS3.SetMemory(0x10040000, buffer);


// Get Memory
byte[] buffer = new byte[4];
PS3.GetMemory(0x10040000, buffer);[/LEFT]

These are just some examples. Both of these functions can use ulong or uint addresses. You can also use :

- GetLv2Memory / SetLv2Memory
- GetLv1Memory / SetLv1Memory

These method work with the same method (Just use ulong addresses).
There are a lots of functions available... Just look into the source (CodePlex) or into the CCAPI-Demo in the package. I created a CCAPI Manager in C#, just to show you every function available.

You can also use the class Extensions with CCAPI, like this :

    
// Write an Integer with CCAPI easily :
PS3.Extensions.WriteInt32(0x10040000, 1337);




III - TMAPI

This part is for use ONLY TMAPI (DEX).

You need to create an instance of the class TMAPI, i recommand to use global variable, so do this :

    private TMAPI DEX = new TMAPI();


Now into a button , you can use all functions, example here for connect and attach :

    
// Connect
if(DEX.ConnectTarget())
{
// OK, try to connect :
if(DEX.AttachProcess())
{
// Success
}
else
{
// Error attach
}
}
else
{
// Error connect
}


You can also connect your target by name or by index. I think i'll not post how to Get/Set Memory here, i have already explained in the PS3Lib v3 and it's the same things of others class Smile



IV - ArrayBuilder

This part is for use ArrayBuilder.
You need to create an instance, but it's not needed in global :


    
// Here I create an array, I write some values/types and I send the buffer into memory...
byte[] buffer = new byte[0x50];
ArrayBuilder Build = new ArrayBuilder(buffer);
Build.Write.SetBool(3, true);
Build.Write.SetFloat(4, 1000);
Build.Write.SetInt32(8, 1337);
Build.Write.SetString(20, "iMCSx ArrayBuilder !");
PS3.SetMemory(0x10060000, buffer);
MessageBox.Show("Done, try to read now !");


// Here I get the buffer from memory, and I read it.
byte[] buff = PS3.Extension.ReadBytes(0x10060000, 0x50);
ArrayBuilder Build = new ArrayBuilder(buff);
bool var1 = Build.Read.GetBool(3);
float var2 = Build.Read.GetFloat(4);
int var3 = Build.Read.GetInt32(Cool Man (aka Tustin);
string var4 = Build.Read.GetString(20);
MessageBox.Show("Result from the array sent to memory is :\n\nPosition 3 - Bool - " + var1.ToString() + "\n\nPosition 4 - Float - " + var2.ToString() + "\n\nPosition 8 - Int32 - " + var3.ToString() + "\n\nPosition 20 - String - " + var4);


I think these extras will be cool for some people, because you can write an array as you want, with a different endian and different type. It's much faster than doing lots of SetMemory or GetMemory.




Thanks for reading guys, and I hope you will like this PS3Lib, if you found a bug or something just tell me.


Credits : FM|T Enstone


You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.





Do you know why these are the only Methods I get? I dont have PS3.SetMemory or PS3.GetMemory, any Idea why? I am using PS3Lib 4.2.0.0
Thanks
02-18-2014, 07:30 PM #60
Dacoco
I void warranties.
Originally posted by iMCSx View Post



PS3 Library .NET

Version 4.2

Integration CCAPI C# - Make Real Time Tools Easily For DEX or CEX consoles !


A new version of PS3Lib is now released. This version allows you to connect via .NET language your console with TMAPI(Target Manager API) or with CCAPI (Control Console API) so it works for DEX / CEX Smile

The download link is at the bottom of this thread (Codeplex link + viruscan) and the package contains all binaries needed + 2 demo projects C#.


New features :

- Support CCAPI v2.0 C#.
- Function ReadString is now very fast.
- Extension class support both API's.
- ArrayBuilder for build arrays easily.
- IO Removed (Few people used it).
- Set API to switch when you want.
- Use both API's with same function names.
- Dialog CCAPI for ip implemented.
- Connect & Attach function returns bool.
- Fixed some bugs TMAPI.


Changelog v4.1 :

- Integration classic functions PS3TMAPI_NET.dll (so you don't need to use it anymore)
- Extension class fixed if you use ccapi you don't have an error about PS3TMAPI_NET.dll.
- You can access to TMAPI_NET class with : using PS3Lib.NET;

Changelog v4.1.1.0 :

- All instances error have been fixed ! The dll works just fine now !
- Thanks to SnaY for his testing with this new version !

Changelog v4.2 :

- The DLL use now the .NET Framework 4.0, so windows XP is now compatible.
- Added functions PowerOff / PowerOn for TMAPI.
- Added function InitComms for TMAPI & InitTarget for PS3API (To re-init your console in a thread or a timer)
- A part of a function has been edited.


These app in below are just 2 demo coded very quickly only for show you all possibility.



Here 2 Pictures :

You must login or register to view this content.

You must login or register to view this content.


I'll start to explain how to add/use the dll in your project right now.

Once you have extracted the binaries folder of the .zip, add the dll PS3Lib as reference into visual studio, and in your source code :

    using PS3Lib;


Your ready to use the dll. Now this thread is splitted in 3 parts.
Don't worry, if you dont understand something i left 2 Demo projects (source) in the package.
If you have an error like "Impossible to load PS3TMAPI_NET.dll" just place this dll in the same directory of your .exe



I - PS3API (TMAPI & CCAPI All in one)

- This part is to use CCAPI or TMAPI when you want ! You can switch modes at all time.

It's VERY useful if you want make a tool compatible TMAPI and CCAPI without changing your code.

You need to create this instance :


    
[LEFT]// This will set by default the TMAPI
private PS3API PS3 = new PS3API();

// If you want set instantly the CCAPI so make this :
private PS3API PS3 = new PS3API(SelectAPI.ControlConsole);[/LEFT]

You can now use the function connect & attach :

    
[LEFT]if(PS3.ConnectTarget())
{
//Connected, so we'll attach the process
if(PS3.AttachProcess())
{
// Attached !
}
else { // ERROR ATTACH }
}
else
{
// Connection error.
}[/LEFT]

Yeah, here these functions return a boolean. If you have selected TMAPI, the default console will be connect, if you have selected the CCAPI, a mini dialog will be displayed for the IP.

If you want make your own custom dialog, just look at my sources.
You can now use all basic functions like SetMemory/GetMemory and Extensions too !

You can change the api with this function :


    
[LEFT]PS3.ChangeAPI(SelectAPI.TargetManager); // Or SelectAPI.ControlConsole for CCAPI Smile[/LEFT]


There are some useful functions like GetCurrentAPI or GetCurrentAPIName (string), here the last example :


    
[LEFT]if(PS3.GetCurrentAPI() == SelectAPI.TargetManager)
{
// You use TMAPI.
}
else
{
// You use CCAPI.
}[/LEFT]
It's pretty simple, right ? I think this class was the best solution to make RTE Tools without editing your code :p



II - CCAPI

This part is for use ONLY CCAPI.

You need to create an instance of the class CCAPI, i recommand to use global variable, so do this :

    private CCAPI PS3 = new CCAPI();


Now into a button , you can use all functions, example here for connect and attach :


    
[LEFT]// Connect
PS3.ConnectTarget("192.168.1.13"); // Here you need to put the PS3 IP


// Attach Default GAME process :
PS3.AttachProcess();


// You can also use the function SUCCESS for know if the function has been correctly executed so :
if(PS3.SUCCESS(PS3.AttachProcess())
{
// It's good !
}
else
{
// Not good..
}[/LEFT]


Or you can select which process to attach :


    
[LEFT]

/******** Attach the default Process GAME ********/

PS3.AttachProcess();


/******** Attach a process manually ********/

// Get all running processes
procs = new uint[64];
PS3.GetProcessList(out procs);


// Get a process name
string name = String.Empty;
PS3.GetProcessName(procs[0], ref name); // Return the name of the process 0.


// Attach your desired process
PS3.AttachProcess(procs[0]);


/******** Attach a basic process by enum ********/

// Attach directly a basic process : (Only if you don't want make codes)
PS3.ProcessAttach(CCAPI.ProcessType.VSH);[/LEFT]

As you saw, the method AttachProcess has 3 overloads, very useful.

You're now able to set or get memory :


    
[LEFT]// Set Memory
byte[] buffer = new byte[] { 0x10, 0x20, 0x30, 0x40};
PS3.SetMemory(0x10040000, buffer);


// Get Memory
byte[] buffer = new byte[4];
PS3.GetMemory(0x10040000, buffer);[/LEFT]

These are just some examples. Both of these functions can use ulong or uint addresses. You can also use :

- GetLv2Memory / SetLv2Memory
- GetLv1Memory / SetLv1Memory

These method work with the same method (Just use ulong addresses).
There are a lots of functions available... Just look into the source (CodePlex) or into the CCAPI-Demo in the package. I created a CCAPI Manager in C#, just to show you every function available.

You can also use the class Extensions with CCAPI, like this :

    
// Write an Integer with CCAPI easily :
PS3.Extensions.WriteInt32(0x10040000, 1337);




III - TMAPI

This part is for use ONLY TMAPI (DEX).

You need to create an instance of the class TMAPI, i recommand to use global variable, so do this :

    private TMAPI DEX = new TMAPI();


Now into a button , you can use all functions, example here for connect and attach :

    
// Connect
if(DEX.ConnectTarget())
{
// OK, try to connect :
if(DEX.AttachProcess())
{
// Success
}
else
{
// Error attach
}
}
else
{
// Error connect
}


You can also connect your target by name or by index. I think i'll not post how to Get/Set Memory here, i have already explained in the PS3Lib v3 and it's the same things of others class Smile



IV - ArrayBuilder

This part is for use ArrayBuilder.
You need to create an instance, but it's not needed in global :


    
// Here I create an array, I write some values/types and I send the buffer into memory...
byte[] buffer = new byte[0x50];
ArrayBuilder Build = new ArrayBuilder(buffer);
Build.Write.SetBool(3, true);
Build.Write.SetFloat(4, 1000);
Build.Write.SetInt32(8, 1337);
Build.Write.SetString(20, "iMCSx ArrayBuilder !");
PS3.SetMemory(0x10060000, buffer);
MessageBox.Show("Done, try to read now !");


// Here I get the buffer from memory, and I read it.
byte[] buff = PS3.Extension.ReadBytes(0x10060000, 0x50);
ArrayBuilder Build = new ArrayBuilder(buff);
bool var1 = Build.Read.GetBool(3);
float var2 = Build.Read.GetFloat(4);
int var3 = Build.Read.GetInt32(Cool Man (aka Tustin);
string var4 = Build.Read.GetString(20);
MessageBox.Show("Result from the array sent to memory is :\n\nPosition 3 - Bool - " + var1.ToString() + "\n\nPosition 4 - Float - " + var2.ToString() + "\n\nPosition 8 - Int32 - " + var3.ToString() + "\n\nPosition 20 - String - " + var4);


I think these extras will be cool for some people, because you can write an array as you want, with a different endian and different type. It's much faster than doing lots of SetMemory or GetMemory.




Thanks for reading guys, and I hope you will like this PS3Lib, if you found a bug or something just tell me.


Credits : FM|T Enstone


You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.





Do you know why these are the only Methods I get?
You must login or register to view this content.

I dont have PS3.SetMemory or PS3.GetMemory, any Idea why? I am using PS3Lib 4.2.0.0
Thanks
02-18-2014, 07:34 PM #61
Dacoco
I void warranties.
Originally posted by iMCSx View Post

As you saw, the method AttachProcess has 3 overloads, very useful.

You're now able to set or get memory :

[/LEFT]
    
[LEFT]// Set Memory
byte[] buffer = new byte[] { 0x10, 0x20, 0x30, 0x40};
PS3.SetMemory(0x10040000, buffer);


// Get Memory
byte[] buffer = new byte[4];
PS3.GetMemory(0x10040000, buffer);[/LEFT]




Disregard, I figured it out
Last edited by Dacoco ; 02-18-2014 at 08:53 PM.
02-18-2014, 08:05 PM #62
Citadel
Samurai Poster
Originally posted by Wire. View Post
Do you know why these are the only methods i get when using PS3?
You must login or register to view this content.
Im using 4.2.0.0 and I cant seem to get PS3.SetMemory and PS3.GetMemory
Thanks
Wire.


Does it look like this You must login or register to view this content. ?
02-18-2014, 08:51 PM #63
Dacoco
I void warranties.
Originally posted by Citadel View Post
Does it look like this You must login or register to view this content. ?

I figured it out thanks for your help though Happy
03-13-2014, 07:52 PM #64
Originally posted by iMCSx View Post



PS3 Library .NET

Version 4.2

Integration CCAPI C# - Make Real Time Tools Easily For DEX or CEX consoles !


A new version of PS3Lib is now released. This version allows you to connect via .NET language your console with TMAPI(Target Manager API) or with CCAPI (Control Console API) so it works for DEX / CEX Smile

The download link is at the bottom of this thread (Codeplex link + viruscan) and the package contains all binaries needed + 2 demo projects C#.


New features :

- Support CCAPI v2.0 C#.
- Function ReadString is now very fast.
- Extension class support both API's.
- ArrayBuilder for build arrays easily.
- IO Removed (Few people used it).
- Set API to switch when you want.
- Use both API's with same function names.
- Dialog CCAPI for ip implemented.
- Connect & Attach function returns bool.
- Fixed some bugs TMAPI.


Changelog v4.1 :

- Integration classic functions PS3TMAPI_NET.dll (so you don't need to use it anymore)
- Extension class fixed if you use ccapi you don't have an error about PS3TMAPI_NET.dll.
- You can access to TMAPI_NET class with : using PS3Lib.NET;

Changelog v4.1.1.0 :

- All instances error have been fixed ! The dll works just fine now !
- Thanks to SnaY for his testing with this new version !

Changelog v4.2 :

- The DLL use now the .NET Framework 4.0, so windows XP is now compatible.
- Added functions PowerOff / PowerOn for TMAPI.
- Added function InitComms for TMAPI & InitTarget for PS3API (To re-init your console in a thread or a timer)
- A part of a function has been edited.


These app in below are just 2 demo coded very quickly only for show you all possibility.



Here 2 Pictures :

You must login or register to view this content.

You must login or register to view this content.


I'll start to explain how to add/use the dll in your project right now.

Once you have extracted the binaries folder of the .zip, add the dll PS3Lib as reference into visual studio, and in your source code :

    using PS3Lib;


Your ready to use the dll. Now this thread is splitted in 3 parts.
Don't worry, if you dont understand something i left 2 Demo projects (source) in the package.
If you have an error like "Impossible to load PS3TMAPI_NET.dll" just place this dll in the same directory of your .exe



I - PS3API (TMAPI & CCAPI All in one)

- This part is to use CCAPI or TMAPI when you want ! You can switch modes at all time.

It's VERY useful if you want make a tool compatible TMAPI and CCAPI without changing your code.

You need to create this instance :


    
[LEFT]// This will set by default the TMAPI
private PS3API PS3 = new PS3API();

// If you want set instantly the CCAPI so make this :
private PS3API PS3 = new PS3API(SelectAPI.ControlConsole);[/LEFT]

You can now use the function connect & attach :

    
[LEFT]if(PS3.ConnectTarget())
{
//Connected, so we'll attach the process
if(PS3.AttachProcess())
{
// Attached !
}
else { // ERROR ATTACH }
}
else
{
// Connection error.
}[/LEFT]

Yeah, here these functions return a boolean. If you have selected TMAPI, the default console will be connect, if you have selected the CCAPI, a mini dialog will be displayed for the IP.

If you want make your own custom dialog, just look at my sources.
You can now use all basic functions like SetMemory/GetMemory and Extensions too !

You can change the api with this function :


    
[LEFT]PS3.ChangeAPI(SelectAPI.TargetManager); // Or SelectAPI.ControlConsole for CCAPI Smile[/LEFT]


There are some useful functions like GetCurrentAPI or GetCurrentAPIName (string), here the last example :


    
[LEFT]if(PS3.GetCurrentAPI() == SelectAPI.TargetManager)
{
// You use TMAPI.
}
else
{
// You use CCAPI.
}[/LEFT]
It's pretty simple, right ? I think this class was the best solution to make RTE Tools without editing your code :p



II - CCAPI

This part is for use ONLY CCAPI.

You need to create an instance of the class CCAPI, i recommand to use global variable, so do this :

    private CCAPI PS3 = new CCAPI();


Now into a button , you can use all functions, example here for connect and attach :


    
[LEFT]// Connect
PS3.ConnectTarget("192.168.1.13"); // Here you need to put the PS3 IP


// Attach Default GAME process :
PS3.AttachProcess();


// You can also use the function SUCCESS for know if the function has been correctly executed so :
if(PS3.SUCCESS(PS3.AttachProcess())
{
// It's good !
}
else
{
// Not good..
}[/LEFT]


Or you can select which process to attach :


    
[LEFT]

/******** Attach the default Process GAME ********/

PS3.AttachProcess();


/******** Attach a process manually ********/

// Get all running processes
procs = new uint[64];
PS3.GetProcessList(out procs);


// Get a process name
string name = String.Empty;
PS3.GetProcessName(procs[0], ref name); // Return the name of the process 0.


// Attach your desired process
PS3.AttachProcess(procs[0]);


/******** Attach a basic process by enum ********/

// Attach directly a basic process : (Only if you don't want make codes)
PS3.ProcessAttach(CCAPI.ProcessType.VSH);[/LEFT]

As you saw, the method AttachProcess has 3 overloads, very useful.

You're now able to set or get memory :


    
[LEFT]// Set Memory
byte[] buffer = new byte[] { 0x10, 0x20, 0x30, 0x40};
PS3.SetMemory(0x10040000, buffer);


// Get Memory
byte[] buffer = new byte[4];
PS3.GetMemory(0x10040000, buffer);[/LEFT]

These are just some examples. Both of these functions can use ulong or uint addresses. You can also use :

- GetLv2Memory / SetLv2Memory
- GetLv1Memory / SetLv1Memory

These method work with the same method (Just use ulong addresses).
There are a lots of functions available... Just look into the source (CodePlex) or into the CCAPI-Demo in the package. I created a CCAPI Manager in C#, just to show you every function available.

You can also use the class Extensions with CCAPI, like this :

    
// Write an Integer with CCAPI easily :
PS3.Extensions.WriteInt32(0x10040000, 1337);




III - TMAPI

This part is for use ONLY TMAPI (DEX).

You need to create an instance of the class TMAPI, i recommand to use global variable, so do this :

    private TMAPI DEX = new TMAPI();


Now into a button , you can use all functions, example here for connect and attach :

    
// Connect
if(DEX.ConnectTarget())
{
// OK, try to connect :
if(DEX.AttachProcess())
{
// Success
}
else
{
// Error attach
}
}
else
{
// Error connect
}


You can also connect your target by name or by index. I think i'll not post how to Get/Set Memory here, i have already explained in the PS3Lib v3 and it's the same things of others class Smile



IV - ArrayBuilder

This part is for use ArrayBuilder.
You need to create an instance, but it's not needed in global :


    
// Here I create an array, I write some values/types and I send the buffer into memory...
byte[] buffer = new byte[0x50];
ArrayBuilder Build = new ArrayBuilder(buffer);
Build.Write.SetBool(3, true);
Build.Write.SetFloat(4, 1000);
Build.Write.SetInt32(8, 1337);
Build.Write.SetString(20, "iMCSx ArrayBuilder !");
PS3.SetMemory(0x10060000, buffer);
MessageBox.Show("Done, try to read now !");


// Here I get the buffer from memory, and I read it.
byte[] buff = PS3.Extension.ReadBytes(0x10060000, 0x50);
ArrayBuilder Build = new ArrayBuilder(buff);
bool var1 = Build.Read.GetBool(3);
float var2 = Build.Read.GetFloat(4);
int var3 = Build.Read.GetInt32(Cool Man (aka Tustin);
string var4 = Build.Read.GetString(20);
MessageBox.Show("Result from the array sent to memory is :\n\nPosition 3 - Bool - " + var1.ToString() + "\n\nPosition 4 - Float - " + var2.ToString() + "\n\nPosition 8 - Int32 - " + var3.ToString() + "\n\nPosition 20 - String - " + var4);


I think these extras will be cool for some people, because you can write an array as you want, with a different endian and different type. It's much faster than doing lots of SetMemory or GetMemory.




Thanks for reading guys, and I hope you will like this PS3Lib, if you found a bug or something just tell me.


Credits : FM|T Enstone


You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.





Nice! :yes: I needed this thank you Tiphat

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo