Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FileStream fs = new FileStream(@"simple.exe",FileMode.Open);
- BinaryReader br = new BinaryReader(fs);
- byte[] bin = br.ReadBytes(Convert.ToInt32(fs.Length));
- fs.Close();
- br.Close();
- Assembly a = Assembly.Load(bin);
- MethodInfo method = a.EntryPoint;
- if (method == null) return;
- object o = a.CreateInstance(method.Name);
- method.Invoke(o, null);
Add Comment
Please, Sign In to add comment