I have really fun problem. It's kind of sandbox escaping.
Aim: get not public methods of class
What I can:
1) Load standart assemblies by assemblies by long name
2) Use GetType and Type's methods
What I cannot:
1) Use using in code
Looks like I could load private fields like
myType.GetFields(BindingFlags.NonPublic | BindingFlags.Instance);
but I haven't BindingFlags imported in my code.
OK, I could create instance of BindingFlags and use GetField of it, but again it returns Object and I can't cast it to BindingFlags.
I tried Convert.ChangeType method, but Invoke return Objects :)
How could I resolve this issue?
Aucun commentaire:
Enregistrer un commentaire