Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Injector
- {
- public static void Inject(byte[] data)
- {
- var injector = InjectionMethod.Create(InjectionMethodType.ManualMap);
- var processId = Process.GetProcessesByName("csgo")[0].Id;
- var hModule = IntPtr.Zero;
- using (var dll = new PortableExecutable(data))
- hModule = injector.Inject(dll, processId);
- if (hModule != IntPtr.Zero)
- {
- Worker.instance.owninjector.InjectionFinished();
- }
- else
- {
- // injection failed
- if (injector.GetLastError() != null)
- MessageBox.Show(injector.GetLastError().Message);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment