MindSystem Posted December 21, 2015 Posted December 21, 2015 Hi, i want to set an operand to MessageBox.Show("test"); But when i debug, using this code : method.Body.Instructions.Insert(0, Instruction.Create(OpCodes.Ldstr, "test")); object a = MessageBox.Show(method.Body.Instructions[0].Operand.ToString()); method.Body.Instructions.Insert(1, Instruction.Create(OpCodes.Nop)); method.Body.Instructions.OpCode = OpCodes.Call; method.Body.Instructions.Operand = a; (Yeah the code is strange haha) So, when i debug using this code, it shows messagebox unlimited...; My Question is : how to set an operand to MessageBox.Show without get messagebox? Thanks you
XenocodeRCE Posted December 22, 2015 Posted December 22, 2015 (edited) Create a new projet & on button1_click event put a M'essagebox show' then build it up and then decompile it. You will see what's missing from your code Edited December 22, 2015 by XenocodeRCE 1
MindSystem Posted December 22, 2015 Author Posted December 22, 2015 2 hours ago, XenocodeRCE said: Create a new projet & on button1_click event put a M'essagebox show' then build it up and then decompile it. You will see what's missing from your code Yeah, i forgot the "pop" opcode
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now