Replies: 8 comments
-
@CODEDAGOTH
No, it's not possible to execute C# code - at least not out of the box. |
Beta Was this translation helpful? Give feedback.
-
@vfsfitvnm install by this command |
Beta Was this translation helpful? Give feedback.
-
@CODEDAGOTH Matches.methods.BeginQuest.implementation = function (qid: Il2Cpp.String, data: Il2Cpp.Object, callback: Il2Cpp.Object): void {
}; |
Beta Was this translation helpful? Give feedback.
-
@vfsfitvnm |
Beta Was this translation helpful? Give feedback.
-
@CODEDAGOTH I suggest you to dump the game first: Il2Cpp.perform(() => {
Il2Cpp.dump().classes().build();
}); Then, open the generated file and look for // mscorlib.dll
class System.Collections.Hashtable : System.Object, System.Collections.IDictionary, System.Collections.ICollection, System.Collections.IEnumerable, System.Runtime.Serialization.ISerializable, System.Runtime.Serialization.IDeserializationCallback, System.ICloneable
{
System.Collections.Hashtable.bucket[] buckets; // 0x10
System.Int32 count; // 0x18
System.Int32 occupancy; // 0x1c
System.Int32 loadsize; // 0x20
System.Single loadFactor; // 0x24
System.Int32 version; // 0x28
System.Boolean isWriterInProgress; // 0x2c
System.Collections.ICollection keys; // 0x30
System.Collections.IEqualityComparer _keycomparer; // 0x38
System.Object _syncRoot; // 0x40
System.Void .ctor(System.Boolean trash); // 0x00a12580
System.Void .ctor(); // 0x00a12590
System.Void .ctor(System.Int32 capacity); // 0x00a128c0
System.Void .ctor(System.Int32 capacity, System.Single loadFactor); // 0x00a12610
System.Void .ctor(System.Int32 capacity, System.Single loadFactor, System.Collections.IHashCodeProvider hcp, System.Collections.IComparer comparer); // 0x00a128d0
System.Void .ctor(System.Int32 capacity, System.Single loadFactor, System.Collections.IEqualityComparer equalityComparer); // 0x00a12960
System.Void .ctor(System.Collections.IHashCodeProvider hcp, System.Collections.IComparer comparer); // 0x00a12980
System.Void .ctor(System.Collections.IEqualityComparer equalityComparer); // 0x00a12a60
System.Void .ctor(System.Int32 capacity, System.Collections.IEqualityComparer equalityComparer); // 0x00a12af0
System.Void .ctor(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); // 0x00a12b20
System.UInt32 InitHash(System.Object key, System.Int32 hashsize, System.UInt32& seed, System.UInt32& incr); // 0x00a12bb0
System.Void Add(System.Object key, System.Object value); // 0x00a12bf0
System.Void Clear(); // 0x00a130a0
System.Object Clone(); // 0x00a13180
System.Boolean Contains(System.Object key); // 0x00a132b0
System.Boolean ContainsKey(System.Object key); // 0x00a132d0
System.Void CopyKeys(System.Array array, System.Int32 arrayIndex); // 0x00a13440
System.Void CopyEntries(System.Array array, System.Int32 arrayIndex); // 0x00a13520
System.Void CopyTo(System.Array array, System.Int32 arrayIndex); // 0x00a136b0
System.Void CopyValues(System.Array array, System.Int32 arrayIndex); // 0x00a13820
System.Object get_Item(System.Object key); // 0x00a13900
System.Void set_Item(System.Object key, System.Object value); // 0x00a13b30
System.Void expand(); // 0x00a13b40
System.Void rehash(); // 0x00a13f20
System.Void UpdateVersion(); // 0x00a13160
System.Void rehash(System.Int32 newsize, System.Boolean forceNewHashCode); // 0x00a13c20
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator(); // 0x00a14000
System.Collections.IDictionaryEnumerator GetEnumerator(); // 0x00a14060
System.Int32 GetHash(System.Object key); // 0x00a140c0
System.Boolean KeyEquals(System.Object item, System.Object key); // 0x00a141a0
System.Collections.ICollection get_Keys(); // 0x00a142a0
System.Void Insert(System.Object key, System.Object nvalue, System.Boolean add); // 0x00a12c00
System.Void putEntry(System.Collections.Hashtable.bucket[] newBuckets, System.Object key, System.Object nvalue, System.Int32 hashcode); // 0x00a13f40
System.Void Remove(System.Object key); // 0x00a14320
System.Object get_SyncRoot(); // 0x00a14540
System.Int32 get_Count(); // 0x00a145c0
static System.Collections.Hashtable Synchronized(System.Collections.Hashtable table); // 0x00a145d0
System.Void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); // 0x00a14670
System.Void OnDeserialization(System.Object sender); // 0x00a14cd0
} At this point (this is just an example, not tested but it will give you the idea): Matches.methods.BeginQuest.implementation = function (qid: Il2Cpp.String, data: Il2Cpp.Object, callback: Il2Cpp.Object): void {
console.log(`count: ${data.fields.count.value}`);
const enumerator = data.methods.GetEnumerator.invoke<Il2Cpp.Object>();
while (enumerator.methods.MoveNext.invoke<boolean>()) {
const key = enumerator.methods.get_Key.invoke<Il2Cpp.Object>();
const value = enumerator.methods.get_Value.invoke<Il2Cpp.Object>();
console.log(`key = ${key}, value = ${value}`);
}
enumerator.methods.Dispose.invoke();
// restore the original execution flow by calling the original method
this.methods.BeginQuest.invoke<void>(qid, data, callback);
}; |
Beta Was this translation helpful? Give feedback.
-
@vfsfitvnm have a some movement) Thank you dude! Amazing module)
It can be modified by defaut frida JS easely
But when i try to change this String via frida-il2cpp-bridge
Get this Error: It Can be resolved by frida-il2cpp-bridge? |
Beta Was this translation helpful? Give feedback.
-
@CODEDAGOTH You have to operate with the const serverTag: Il2Cpp.Field = this.fields["_serverTag"];
console.log(serverTag.value); // "Old serverTag"
serverTag.value = Il2Cpp.String.from("My new serverTag");
console.log(serverTag.value); // "My new serverTag" This solution replaces the old By the way, in this case you can change the value of const serverTag: Il2Cpp.Field = this.fields["_serverTag"];
console.log(serverTag.value); // "Old serverTag"
(serverTag.value as Il2Cpp.String).content = "My new serverTag";
console.log(serverTag.value); // "My new serverTag" This one replaces the content of the existing |
Beta Was this translation helpful? Give feedback.
-
Thank you) Issue can can be closed) |
Beta Was this translation helpful? Give feedback.
-
Hello every one!
I'm very new with il2cpp-bridge.
Can someone explain how i can get, view and modify data from this 'void'
System.Void BeginQuest(System.String qid, System.Collections.Hashtable data, EB.Action<System.String,System.Collections.Hashtable> callback); // 0x01d893c0
I'm good with default Frida js scriptig (can read and modify string, int, bool) but want try to do some more.
Just started with that bridge script
P.S i have almost all C# source code of this game.. It is possible to execute some C# code using il2cpp-bridge?
Beta Was this translation helpful? Give feedback.
All reactions