Post: Get Serverdetails (Host, Map, Gametype) [C# Function]
12-05-2013, 01:29 AM #1
seb5594
Proud Former Admin
(adsbygoogle = window.adsbygoogle || []).push({}); Hey NGU & Activision, (I know Activision will read this lol)

I havn't released anything for a while. Since Enstone released his CCAPI more ppl started making tools. This might help you abit to add more stuff to your Tool Smile
It's not special but i havn't seen it released yet.

Lets start, add this somewhere in your Project..

            //Please give Credits to me (seb5594) if you are going to use it or if you post it on a other Website :=)
private String ReturnInfos(Int32 Index)
{
return Encoding.ASCII.GetString(GetBytes(0x01D7E98B, 0x100)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}
public String getMapName()
{
String Map = ReturnInfos(6);
switch (Map)
{
default: return "Unknown Map";
case "mp_prisonbreak": return "Prison Break";
case "mp_dart": return "Octane";
case "mp_lonestar": return "Tremor";
case "mp_frag": return "Freight";
case "mp_snow": return "Whiteout";
case "mp_fahrenheit": return "Stormfront";
case "mp_hasima": return "Siege";
case "mp_warhawk": return "Warhawk";
case "mp_sovereign": return "Sovereign";
case "mp_zebra": return "Overlord";
case "mp_skeleton": return "Stonehaven";
case "mp_chasm": return "Chasm";
case "mp_flooded": return "Flooded";
case "mp_strikezone": return "Strikezone";
case "mp_fall": return "Free Fall";
}
}
public String getGameMode()
{
String GM = ReturnInfos(2);
switch (GM)
{
default: return "Unknown Gametype";
case "war": return "Team Deathmatch";
case "dm": return "Free for All";
case "sd": return "Search and Destroy";
case "dom": return "Domination";
case "conf": return "Kill Confirmed";
case "sr": return "Search and Rescue";
case "grind": return "Grind";
case "blitz": return "Blitz";
case "cranked": return "Cranked";
case "infect": return "Infected";
case "sotf": return "Hunted";
case "dem": return "Demolition";
case "horde": return "Safeguard";
case "sotf_ffa": return "Hunted FFA";
}
}
public String getHostName()
{
String Host = ReturnInfos(1Cool Man (aka Tustin);
if (Host == "Modern Warfare 3")
return "Dedicated Server (No Player is Host)";
else if (Host == "")
return "You are not In-Game";
else return Host;
}
public Byte[] GetBytes(UInt32 address, Int32 Length)
{
Byte[] buffer= new Byte[Length];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0, address, ref buffer);
return buffer;
}


If you're using iMCSx PS3Lib v4 for CCAPI support replace the ReturnInfos Function and delete my getBytes Function
                    private String ReturnInfos(Int32 Index)
{
return Encoding.ASCII.GetString(PS3.GetBytes(0x01D7E98B, 0x100)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}


How to use:
Put 3 Labels in your Form as example and then do this in a Timer (to have the newest Infos)
label1.Text = getHostName();
label2.Text = getMapName();
label3.Text = getGameMode();

How it can look
You must login or register to view this content.

Please give credits to me if you are using/Update this Function!
Feel free to visit my new Youtube Channel since Activision closed my old one
You must login or register to view this content.

Credits:
Me (seb5594): Creating this Functions
Choco: GetMemory Function
Activision: Closing my Channel Drack
Last edited by seb5594 ; 12-05-2013 at 02:59 AM.

The following 18 users say thank you to seb5594 for this useful post:

-JM-, AlexNGU, BaSs_HaXoR, BuC-ShoTz, EdiTzZ, FusionIsDaName, Gendjisan, Harry, ImPiffHD, MegaMister, mog001, Mr.Azoz, Mr.Hutch, Pro !, SnaY, TeRmiiMoDz, therifboy, Fatality
12-05-2013, 02:47 AM #2
There are already a function "GetBytes" into PS3Lib :

    
PS3.GetBytes(uint offset, int length); // The function with his args.

byte[] buffer = PS3.GetBytes(0x10040000, 50); // Example to use, the buffer will have 50 bytes in the array.

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

MegaMister, Fatality
12-05-2013, 02:52 AM #3
seb5594
Proud Former Admin
Originally posted by iMCSx View Post
There are already a function "GetBytes" into PS3Lib :

    
PS3.GetBytes(uint offset, int length); // The function with his args.

byte[] buffer = PS3.GetBytes(0x10040000, 50); // Example to use, the buffer will have 50 bytes in the array.

Changed the name of the Func to your one. Havn't messed arround with your new PS3Lib yet :p
12-05-2013, 03:03 AM #4
Originally posted by seb5594 View Post
Changed the name of the Func to your one. Havn't messed arround with your new PS3Lib yet :p


No problem, but this is not new :plank:

Like the class Extension, you can use PS3.Extension.ReadString(uint offset) , this function will read a null-terminated string (string split when the first '\0' will be found).

Probably Helpful to some people.
12-05-2013, 03:21 AM #5
test53
Keeper
Great release! I have a question about offsets. When looking at locations for non-host such as redboxs etc. I see that the address points to a function in IDA Pro. However, when I look at a offset for a host only offset it points to memory that is not allocated yet.

The process of finding non-host offsets seems to be simple (i.e. just find the function and patch the return value). My question is, how do you find non host offsets such as in your code "return Encoding.ASCII.GetString(GetBytes(0x01D7E98B, 0x100))"??? Do you take a dump of memory from a live process and then search for strings or is there a way to do it statically in IDA Pro???
12-05-2013, 03:31 AM #6
SC58
Former Staff
or u could just use Dvar_GetString :p lol
12-05-2013, 03:47 AM #7
seb5594
Proud Former Admin
Originally posted by test53 View Post
Great release! I have a question about offsets. When looking at locations for non-host such as redboxs etc. I see that the address points to a function in IDA Pro. However, when I look at a offset for a host only offset it points to memory that is not allocated yet.

The process of finding non-host offsets seems to be simple (i.e. just find the function and patch the return value). My question is, how do you find non host offsets such as in your code "return Encoding.ASCII.GetString(GetBytes(0x01D7E98B, 0x100))"??? Do you take a dump of memory from a live process and then search for strings or is there a way to do it statically in IDA Pro???

At this Address is in the Memory (Ingame) server informations stored such as maxplayers, map and stuff. I got this memory, splitted it and used this Informations to create this functions Winky Winky
i found the offset with CRTL + F and searched for "sv_hostname" in the debugger. Hope this will help you

Originally posted by iMCSx View Post
No problem, but this is not new :plank:

Like the class Extension, you can use PS3.Extension.ReadString(uint offset) , this function will read a null-terminated string (string split when the first '\0' will be found).

Probably Helpful to some people.

Yea i know. i builded my own PS3Lib with your extension class and the stuff i need (+ your new readstring func its very nice) but i wanted to make this little release easy as i can :p
Last edited by seb5594 ; 12-05-2013 at 03:50 AM.
12-05-2013, 04:42 AM #8
Nice release seb! Needa
12-05-2013, 08:12 AM #9
Mango_Knife
In my man cave
Originally posted by seb5594 View Post
Hey NGU & Activision, (I know Activision will read this lol)

I havn't released anything for a while. Since Enstone released his CCAPI more ppl started making tools. This might help you abit to add more stuff to your Tool Smile
It's not special but i havn't seen it released yet.

Lets start, add this somewhere in your Project..

            //Please give Credits to me (seb5594) if you are going to use it or if you post it on a other Website :=)
private String ReturnInfos(Int32 Index)
{
return Encoding.ASCII.GetString(GetBytes(0x01D7E98B, 0x100)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}
public String getMapName()
{
String Map = ReturnInfos(6);
switch (Map)
{
default: return "Unknown Map";
case "mp_prisonbreak": return "Prison Break";
case "mp_dart": return "Octane";
case "mp_lonestar": return "Tremor";
case "mp_frag": return "Freight";
case "mp_snow": return "Whiteout";
case "mp_fahrenheit": return "Stormfront";
case "mp_hasima": return "Siege";
case "mp_warhawk": return "Warhawk";
case "mp_sovereign": return "Sovereign";
case "mp_zebra": return "Overlord";
case "mp_skeleton": return "Stonehaven";
case "mp_chasm": return "Chasm";
case "mp_flooded": return "Flooded";
case "mp_strikezone": return "Strikezone";
case "mp_fall": return "Free Fall";
}
}
public String getGameMode()
{
String GM = ReturnInfos(2);
switch (GM)
{
default: return "Unknown Gametype";
case "war": return "Team Deathmatch";
case "dm": return "Free for All";
case "sd": return "Search and Destroy";
case "dom": return "Domination";
case "conf": return "Kill Confirmed";
case "sr": return "Search and Rescue";
case "grind": return "Grind";
case "blitz": return "Blitz";
case "cranked": return "Cranked";
case "infect": return "Infected";
case "sotf": return "Hunted";
case "dem": return "Demolition";
case "horde": return "Safeguard";
case "sotf_ffa": return "Hunted FFA";
}
}
public String getHostName()
{
String Host = ReturnInfos(1Cool Man (aka Tustin);
if (Host == "Modern Warfare 3")
return "Dedicated Server (No Player is Host)";
else if (Host == "")
return "You are not In-Game";
else return Host;
}
public Byte[] GetBytes(UInt32 address, Int32 Length)
{
Byte[] buffer= new Byte[Length];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0, address, ref buffer);
return buffer;
}


If you're using iMCSx PS3Lib v4 for CCAPI support replace the ReturnInfos Function and delete my getBytes Function
                    private String ReturnInfos(Int32 Index)
{
return Encoding.ASCII.GetString(PS3.GetBytes(0x01D7E98B, 0x100)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}


How to use:
Put 3 Labels in your Form as example and then do this in a Timer (to have the newest Infos)
label1.Text = getHostName();
label2.Text = getMapName();
label3.Text = getGameMode();

How it can look
You must login or register to view this content.

Please give credits to me if you are using/Update this Function!
Feel free to visit my new Youtube Channel since Activision closed my old one
You must login or register to view this content.

Credits:
Me (seb5594): Creating this Functions
Choco: GetMemory Function
Activision: Closing my Channel Drack


Nice.
But not that hard to find all those codes
like sr its Search & Rescue
but stil good job man.
12-05-2013, 01:57 PM #10
thankks!

And for clients? :embarrassed:

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo