-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v8' of https://github.com/cmu-sei/GHOSTS into v8
- Loading branch information
Showing
17 changed files
with
103 additions
and
11 deletions.
There are no files selected for viewing
0
src/Ghosts.Client/lib/Customize.exe → lib/5.6.0.3644/Customize.exe
100755 → 100644
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
To install Redemption either run install.exe (make sure that redemption.dll | ||
is in the same directory) or run | ||
|
||
regsvr32.exe <fullpath>\redemption.dll | ||
|
||
Redemption is a regular COM library and can be installed either with | ||
regsvr32.exe or using your favorite installer (you will need to mark | ||
redemption.dll as self-registering). | ||
|
||
To use Redemption in VB or .Net languages, add "Redemption" library to your project | ||
references from the COM tab of the References dialog in Visual Studio. | ||
You can instead add a reference to the included Interop.Redemption.dll | ||
(strongly named and signed) instead of relying on the auto-generated interop dll. | ||
|
||
You can dynamically load Redemption without installing it in the registry at all. | ||
See the following URL for more details: | ||
http://www.dimastr.com/redemption/security.htm#redemptionloader | ||
|
||
|
||
To uninstall Redemption, run the following from the command line: | ||
|
||
regsvr32.exe /u <fullpath>\redemption.dll | ||
|
||
In case of Vista 64 bit, use %SYSTEMROOT%\SysWOW64\regsvr32.exe to register the dll, | ||
and not %SYSTEMROOT%\System32\regsvr32.exe (which is a 64 bit exe) | ||
Windows 7 64 bit invokes the right regsvr32.exe based on the dll bitness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
using System.Threading; | ||
|
||
namespace Ghosts.Client.Infrastructure | ||
{ | ||
internal static class NagScreenResolver | ||
{ | ||
|
||
[DllImport("user32.dll", SetLastError = true)] | ||
private static extern IntPtr FindWindow(string lpClassName, string lpWindowName); | ||
|
||
[DllImport("user32.dll", SetLastError = true)] | ||
private static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, | ||
string lpszWindow); | ||
|
||
[DllImport("user32.dll", SetLastError = true)] | ||
private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); | ||
|
||
const uint BM_CLICK = 0x00F5; | ||
|
||
internal static void Resolve() | ||
{ | ||
Console.WriteLine("Watcher thread started."); | ||
var windowHandle = IntPtr.Zero; | ||
|
||
while (true) | ||
{ | ||
windowHandle = FindWindow(null, "Outlook Redemption"); | ||
|
||
if (windowHandle != IntPtr.Zero) | ||
{ | ||
var radioButtonHandle = FindWindowEx(windowHandle, IntPtr.Zero, "TRadioButton", "I agree"); | ||
var okButtonHandle = FindWindowEx(windowHandle, IntPtr.Zero, "TButton", "OK"); | ||
|
||
if (radioButtonHandle != IntPtr.Zero) | ||
{ | ||
// Select the radio button | ||
SendMessage(radioButtonHandle, BM_CLICK, IntPtr.Zero, IntPtr.Zero); | ||
} | ||
|
||
if (okButtonHandle != IntPtr.Zero) | ||
{ | ||
// Click the "OK" button | ||
SendMessage(okButtonHandle, BM_CLICK, IntPtr.Zero, IntPtr.Zero); | ||
} | ||
} | ||
|
||
Console.WriteLine("Window not found, retrying in 1 second..."); | ||
Thread.Sleep((int)(1000 * 1.5)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters