2 个版本
| 0.1.2 | 2021年10月22日 | 
|---|---|
| 0.1.1 | 2021年10月20日 | 
| 0.1.0 |  | 
#4 在 #injector
每月37次下载
21KB
460 行
安装
前往 发布页面 下载最新版本。
如果没有安装 Rust,请使用 cargo 进行安装
cargo install injrs
如果没有安装 Rust,请先安装。
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
用法
通常,您可以将 injrs 作为简单的工具使用。
USAGE:
injrs PROCESS_NAME/PID [Libraies...]
EXAMPLES:
1. Inject test.dll to process Calc.exe
    $ injrs Calc.exe test.dll
2. Inject test.dll and demo.dll to process with PID: 1888
    $ injrs 1888 test.dll demo.dll
DLL 示例
examples/hellobox 中的代码是一个简单的消息框 DLL,用于测试注入器。
可以使用以下命令构建:
cargo build --release --example hellobox
构建目标将位于
target/i686-pc-windows-msvc/release/examples/hellobox.dll
尝试将演示 DLL 注入到目标进程
injrs PID/PNAME target/i686-pc-windows-msvc/release/examples/hellobox.dll
作为库使用
您还可以使用 injrs 作为库编写注入项目。
use injrs::process_windows::*;
use injrs::inject_windows::*;
fn main() {
    let name = "Calc.exe";
    let dll = "./my-demo-dll.dll";
    let p = Process::find_first_by_name(name).unwrap();
    print!("inject dll to process => ");
    match process.inject(dll) {
        Err(e) => {
            println!("error: {}", e);
        },
        Ok(_) => {
            println!("success");
        }
    }
}
有关更多详细信息,请查看 src/main.rs。
依赖项
~225KB