Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void Exec(byte[] file)
- {
- Assembly assembly = Assembly.Load(file);
- MethodInfo entryp = assembly.EntryPoint;
- object objectval = RuntimeHelpers.GetObjectValue(assembly.CreateInstance(entryp.Name));
- if (entryp.GetParameters().Length > 0)
- { entryp.Invoke(RuntimeHelpers.GetObjectValue(objectval), new object[] { new string[] { "1" } }); }
- else
- { entryp.Invoke(RuntimeHelpers.GetObjectValue(objectval), null); }
- }
Add Comment
Please, Sign In to add comment