Skip to content

Commit

Permalink
Update WinInteropTools
Browse files Browse the repository at this point in the history
  • Loading branch information
NGxDTV committed Nov 26, 2024
1 parent f1fd15e commit 439a332
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 7 deletions.
5 changes: 5 additions & 0 deletions NGMemory/NGMemory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,17 @@
<Compile Include="Scanner.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VAMemory\VAMemory.cs" />
<Compile Include="WinInteropTools\CheckBox.cs" />
<Compile Include="WinInteropTools\GuiInteropHandler.cs" />
<Compile Include="WinInteropTools\SysListView32.cs" />
<Compile Include="WinInteropTools\TextBox.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
73 changes: 66 additions & 7 deletions ReadME.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# NGMemory

NGMemory is a C# library that makes working with external process memory simple and intuitive. Whether youre building debugging tools or experimenting with memory manipulation, it gives you the power to read, analyze, and modify memory in real-time with ease.
NGMemory is a powerful yet easy-to-use C# library designed to simplify working with external process memory. Whether you're crafting debugging tools, exploring memory manipulation, or building advanced applications, NGMemory provides the tools you need to read, analyze, and modify memory in real-time effortlessly.

## Features
- **Memory Scanning**: Locate patterns in memory with byte-level precision.
- **Module Address Retrieval**: Easily find the base address of a specific module in a target process.
- **Debugging Utilities**: Manage hardware breakpoints, retrieve CPU register values, and control debugging sessions.
- **Memory Reading/Writing**: Perform efficient and safe read/write operations on external process memory.
- **GUI Interactions**: Work with GUI components like checkboxes and text boxes within external applications.

## New Features
- **Check Box Handling**: Check the state of checkboxes in external applications.
- **Text Manipulation in GUI**: Set and get text in GUI controls like dialogs and text boxes.
- **List View Manipulation**: Retrieve and manipulate list items in external applications.

## Installation
You can install NGMemory via NuGet:
Expand All @@ -30,8 +36,9 @@ IntPtr? result2 = scanner.ScanMemory("F3 0F 10 70 10 33 D2 48 8B CF", (long)base
MessageBox.Show(result.HasValue ? $"Pattern found at: {result.Value.ToString("X")}" : "Pattern not found.");
MessageBox.Show(result2.HasValue ? $"Pattern found at: {result2.Value.ToString("X")}" : "Pattern not found.");
```

#### Result:
```Console
```console
Pattern found at: 7FFB7F1ED715
Pattern found at: 7FFB7F1ED715
```
Expand All @@ -45,8 +52,9 @@ Module module = new Module();
IntPtr baseAddress = module.getModuleBaseAddress("GameAssembly.dll", "SonsOfTheForest");
MessageBox.Show($"Base Address: {baseAddress.ToString("X")}");
```

#### Result:
```Console
```console
Base Address: 7FFB7BA60000
```

Expand All @@ -57,13 +65,64 @@ using NGMemory;
ulong registerValue = DebugHook.WaitForRegister("SonsOfTheForest", new IntPtr(0x7FFB7F1ED715), Register.Rax);
MessageBox.Show($"Register RAX Value: {registerValue:X}");
```

#### Result:
```Console
Register RAX Value: 0x1C741FA3310
```console
Register RAX Value: 0x1C741FA3310
```

### GET CheckBox Example
```csharp
using NGMemory.WinInteropTools;

bool isChecked = CheckBox.IsCheckBoxChecked(pointer, controlId);
MessageBox.Show(isChecked ? "Checked" : "Unchecked");
```

### GET TextBox Example
```csharp
using NGMemory.WinInteropTools;

string textBoxValue = TextBox.getTextBoxValue(pointer, controlId);
MessageBox.Show($"TextBox Value: {textBoxValue}");
```

### SET TextBox Example
```csharp
using NGMemory.WinInteropTools;

GuiInteropHandler.InteropSetText(pointer, 0x4C, "Test");
```

### GET List View Example
```csharp
using NGMemory.WinInteropTools;

List<ListViewItem> items = SysListView32.GetListViewItems(pointer, columnCount);
foreach (var item in items)
{
Console.WriteLine(item.Text);
}
```

### GET List View Example .NET Forms
```csharp
var p = Process.GetProcessesByName("twe");
List<IntPtr> ChildList = getChildList(getWindowByContainsName(p, "Window Titel"));

IntPtr[] childLists = ChildList.ToArray();
IntPtr windowPointer = getWindowByContainsName(p, "Window Titel");

IntPtr hwndListView = NGMemory.Kernel32.GetDlgItem(childLists[0], 0x52C);
List<ListViewItem> items = GetListViewItems(hwndListView, 14);
foreach (var item in items)
{
listview.Items.Add(item);
}
```

## Nuget Download
https://www.nuget.org/packages/NGMemory/1.0.2
## NuGet Download
[https://www.nuget.org/packages/NGMemory/1.0.3](https://www.nuget.org/packages/NGMemory/1.0.3)

## Contributing
Feel free to fork this repository and contribute by submitting pull requests. Issues and feature requests are welcome!
Expand Down

0 comments on commit 439a332

Please sign in to comment.