Résolu Besoin aide pour programmation d un tool. (localiser et changer un offset).

Statut
N'est pas ouverte pour d'autres réponses.

the.one.du.59

Membre
Inscription
4 Décembre 2013
Messages
61
Réactions
2
Points
5 151
RGCoins
50
Bonjour a tous.

Voila, je suis entrain de programmer un tool pour ps3 et je voudrais je voudrai implanter un search offset.

J ai trouver le code pour localiser mes offset, pas de souci, ça fonctionne nickel. Mais je bloque sur le faites
d'implanter tel offset trouver a tel bouton. besoin d aide, Merci.

En esperant de nombreuses reponses. merci d'avance.
 
non je n utilise pas la dll de vito. car ne ne connais pas.

si vous prefere j utilise ce codage pour touver mes offsets

1- Coller ceci dans le : "main event public partial class" de votre tool

Code:
public uint ZeroOffset;
public int NumberOffsets = 0;
2- Coller ce code quelque part dans votre tool avant le button button "Search Offset" ! //c'est le "Search Event" qui va gérer votre recherche

Code:
public uint ContainsSequence(byte[] toSearch, byte[] toFind, uint StartOffset, int bytes)
{
for (int i = 0; (i + toFind.Length) < toSearch.Length; i += bytes)
{
bool flag = true;
for (int j = 0; j < toFind.Length; j++)
{
if (toSearch[i + j] != toFind[j])
{
flag = false;
break;
}
}
if (flag)
{
NumberOffsets++;
int num3 = ((int)StartOffset) + i;
return (uint)num3;
}
}
return 0;
}

private ulong Search(byte[] Search, uint Start, int Length, int bytes)
{
byte[] ReadBytes = PS3.Extension.ReadBytes(Start, Length);
uint num = this.ContainsSequence(ReadBytes, Search, Start, bytes);
if (num.Equals(this.ZeroOffset))
{
return 0;
//not found
}
else
{
int counter = 0;
foreach (int value in Search)
if (value == 1) ++counter;
uint num2 = num + ((uint)counter);
return num2;
}
}
Explication :

Uint Start = L'emplacement du début sur la mémoire, cela signifie un JUMP de manière aléatoire à partir de l'adresse de 32500000 vers une adresse supérieure.
int Length = Où S'arreter, cela signifie l'adresse de début est 32500000, et sa apparaît de façon aléatoire entre 32500000 et 32700000 , on utilise comme ceci 32500000 200000 + pour définir la longueur (Length)
int bytes = Sur quel type d'octets sa va rechercher

3- Créer un button search offset et coller ce codage dedans :

byte[] bytes = { 0x25, 0xFE, 0x27, 0xE0 }; //Just random Bytes as an example you use yours
ulong Found = Search(bytes, 0x32500000, 0x200000, 4) + 0x20; //bytes, Uint start , int Length, what bytes type to search ) + 0x20 will give you your result + 20 bytes froward same you do for minus insert (-)

if (Found == ZeroOffset)
{
this.YourTextlabel.Text = "NOT FOUND";
}
else
{
this.YourTextlabel.Text = "FOUND : " + string.Format("0x{0:X}", Found); // ("0x{0:X}", Found) defines the result and return it into text label // using that ulong Found = Search(bytes, 0x32500000, 0x200000, 4);
}

Mais comment changer l offset trouver??????
 
Statut
N'est pas ouverte pour d'autres réponses.
Retour
Haut