Metadata-Version: 2.1
Name: migi
Version: 0.0.16
Summary: A powerful and versatile dynamic instrumentation toolkit
Home-page: https://github.com/nomadsinteractive/migi
Author: Vintage Mars
Author-email: nomadsinteractive@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/nomadsinteractive/migi/issues
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: C++
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# MIGI (My Ideas Got Incepted)

A powerful and versatile dynamic instrumentation toolkit.

## How it works
By injecting Python scripts into target host, migi makes host manipulation possible.

To get started, follow the steps below.

### 1. Install from PyPI
```shell
pip install migi
```

### 2. Attach to target host
```python
import migi

session = migi.attach_process('notepad.exe', python_console=[])
```

An interactive Python console, which runs inside the host app, will show up if nothing goes wrong. 

### 3. Make function calls

Typing the scripts below into that host-running console you've just created and everything should be self-explanatory. 

```python
from ctypes import *
from migi.decorators import stdcall

@stdcall('MessageBoxW', 'User32.dll')
def _native_message_box_w(hwnd: c_void_p, content: c_wchar_p, title: c_wchar_p, flags: c_uint32) -> c_int32:
    pass


def message_box(content: str, title: str, flags: int = 0) -> c_int32:
    return _native_message_box_w(None, create_unicode_buffer(content), create_unicode_buffer(title), flags)

message_box("I'm in", '1')
```

### 4. Learn more

Learn more about calling convention, api interception and others by referring to docs and examples

## How to build

### 1. Platform support
- Windows
```shell
cmake --build out/windows --target all path_to_src
```
- Other platform plans in roadmap.md


