Guest User

Untitled

a guest
Jan 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. FileStream fs = new FileStream(@"simple.exe",FileMode.Open);
  2. BinaryReader br = new BinaryReader(fs);
  3. byte[] bin = br.ReadBytes(Convert.ToInt32(fs.Length));
  4. fs.Close();
  5. br.Close();
  6. Assembly a = Assembly.Load(bin);
  7. MethodInfo method = a.EntryPoint;
  8. if (method == null) return;
  9. object o = a.CreateInstance(method.Name);
  10. method.Invoke(o, null);
Add Comment
Please, Sign In to add comment