From a1b2ddb0205cff8f7e74cf38df81031ae5827641 Mon Sep 17 00:00:00 2001 From: NYAN CAT Date: Wed, 29 May 2019 21:20:55 +0300 Subject: [PATCH] Add notification --- .../Handle Packet/HandleReportWindow.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandleReportWindow.cs b/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandleReportWindow.cs index ae34103..5165ab9 100644 --- a/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandleReportWindow.cs +++ b/AsyncRAT-C#/AsyncRAT-Sharp/Handle Packet/HandleReportWindow.cs @@ -5,6 +5,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Forms; namespace AsyncRAT_Sharp.Handle_Packet { @@ -13,6 +14,17 @@ namespace AsyncRAT_Sharp.Handle_Packet public HandleReportWindow(Clients client, string title) { new HandleLogs().Addmsg($"Client {client.ClientSocket.RemoteEndPoint.ToString().Split(':')[0]} Opened [{title}]", Color.Blue); + if (Program.form1.InvokeRequired) + { + Program.form1.BeginInvoke((MethodInvoker)(() => + { + if (Properties.Settings.Default.Notification == true) + { + Program.form1.notifyIcon1.BalloonTipText = $"Client {client.ClientSocket.RemoteEndPoint.ToString().Split(':')[0]} Opened [{title}]"; + Program.form1.notifyIcon1.ShowBalloonTip(100); + } + })); + } } } }