Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

A C++ mono injector for injecting .NET assemblies into selected processes.

License

Notifications You must be signed in to change notification settings

TTENSHII/XashInjector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Xash Injector

Table of Contents

πŸ“˜ Index

πŸ‘Ύ About

Xash is a C++ mono injector built upon the WinAPI. It enables the injection of assemblies (such as .NET DLLs) into a selected process, providing a flexible solution to enhance and extend functionality. Designed primarily for 64-bit applications, there are plans to extend support to 32-bit applications.

🎴 Example

image

🎏 Usage

  • Launching Xash:

    • Execute the Xash binary.
    • Choose the target process.
    • Select the DLL assemblies.
    • Fill in the necessary namespace, class, and load method (corresponding to the desired mod).
    • Click the "Inject" button to complete the process.
    • Multiple assemblies can be injected simultaneously.
    • You can eject or see injected assemblies in the Loaded Dll panel.
  • Assembly Desinjection:

    • Navigate to the "Loaded dll" panel.
    • Click the "Eject" button of the correct assemblies.

✨ Themes

You can configure the application theme. You can choose from a range of predefined themes or colour-by-colour themes. For the moment, the theme is not saved; this feature is coming on the json-save branch.

Arcade BW Purple Default Ocean

πŸ“¦ Installation

  • Obtaining Binaries:

  • Compilation Instructions:

    • Developers can also compile the project by following the instructions provided in the development section.
  • Supported Operating System:

    • Xash only works on Windows.
  • System Architecture:

    • Xash currently exclusively supports 64-bit applications.

πŸ”§ Development

Developers have the flexibility to use the compiler and the Win SDK of their choice. However, for reference, the project is developed using the following tools:

  • MSVC v143
  • Windows 11 SDK 10.0.22621.0
  • CMake

In the "scripts" directory, you'll find compilation scripts. Alternatively, if you prefer a custom approach, you can use your own CMake commands. For example:

cmake -S . -B build
cmake --build build --config Release -- /m

Feel free to adapt these tools and commands to your development environment as needed.

πŸ“ Clone the repository

Clone the repository with submodules:

git clone --recursive https://github.com/TTENSHII/XashInjector

If you have already cloned the repository, you can do this to add submodules:

git submodule update --init --recursive

πŸ“ File Structure

β”œβ”€β”€ assets
β”œβ”€β”€ .github
β”‚   └── workflows
β”œβ”€β”€ scripts
β”‚   β”œβ”€β”€ build-release
β”‚   └── build-debug
β”œβ”€β”€ external (the project's git sub-modules)
β”‚   β”œβ”€β”€ imgui
β”‚   └── CMakeLists.txt
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ GUI
β”‚   β”‚   β”œβ”€β”€ Imgui
β”‚   β”‚   β”œβ”€β”€ Dx11
β”‚   β”‚   β”œβ”€β”€ WindowManager
β”‚   β”‚   β”œβ”€β”€ Gui-components
β”‚   β”‚   β”œβ”€β”€ CMakeLists.txt
β”‚   β”‚   └── GUI-related files
β”‚   β”œβ”€β”€ injector
β”‚   β”‚   β”œβ”€β”€ Assembly
β”‚   β”‚   β”œβ”€β”€ Mono-Module
β”‚   β”‚   β”œβ”€β”€ Injector-utilities
β”‚   β”‚   └── CMakeLists.txt
β”‚   └── system
β”‚       β”œβ”€β”€ CMakeLists.txt
β”‚       └── System-related files
β”œβ”€β”€ CMakeLists.txt
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .gitmodules
β”œβ”€β”€ .clang-format
└── README.md

🌸 Contribution & Guideline

Welcome to the XashInjector project! We appreciate your interest in contributing. To get started, here are some guidelines:

  • Issues and Discussions:

    • Feel free to explore our Issues for existing tasks or report new ones.
    • Engage in Discussions here to ask questions or propose ideas.
  • Contributing Basics:

    • Familiarize yourself with the project's codebase.
    • Submit issues for bug reports, feature requests, or discussions before diving into code changes.
  • Coding Style:

    • Please follow the established coding style, respecting conventions such as mClassMember or pascalCase for methods, for example.
    • Ensure compliance with .clang-format and maintain the project structure.
  • Getting Started:

    • Clone the repository with git submodules.
    • Read Development section
    • See Branches & PR section for more informations.

🌡 Branches & PR

Branching Workflow:

  • main: The production branch.
  • dev: The development branch.
  • No other permanent branches will be created in the repository; all branches must be merged with the main branch.

Creating a New Branch:

  • When initiating work on a new feature, create a branch with a concise and clear name, such as support-of-32bits, best-gui-theme or fix-settings-panel.
  • Aim for brevity and clarity in branch naming.

Creating a Pull Request:

  • Submit the pull request (PR) in the dev branch.
  • Provide a detailed description of the changes made.
  • Add correct labels such as bug fix, enhancement, GUI, documentation...
  • Ensure the PR passes all continuous integration checks and receives positive feedback.
  • After successful checks and approval, the changes will be merged.

πŸ’Ž Making mods

While I won't provide an in-depth tutorial on mod creation, here are some essential tips for beginners:

  • C# .NET development: Have knowledge of C# or other object-oriented programming languages. Install tools to compile the code into a dll Class Library (.NET Framework).

  • Mod Project Setup: When initiating your mod project, choose "Class Library (NET Framework)." Make sure that the .NET Framework version is the same of the targeted game. You can usually find this information in the game files.

  • Resource Exploration: Explore mod development through various resources. Watch videos, read articles, or participate in forums dedicated to modding. Enjoy the learning process and have fun experimenting with your creations!

πŸ“„ Resources

  • dnSpy: dnSpy is a powerful tool for .NET assembly editing and debugging. It provides a user-friendly interface for examining and modifying assemblies, making it an excellent companion for creating mods in games using Mono.

  • Dear ImGui: ImGui is a highly versatile and efficient graphical user interface library, offering an easy way to create user interfaces in applications/mods.

πŸ”’ Usage Guidelines

Ensure compliance with the terms of use for other programs when utilizing Xash. Exercise caution to avoid inappropriate use, such as injecting mods in multiplayer environments, and adhere to the rules and regulations of respective communities.