PEInjecter is a Python library that allows you to inject any executable file into the call lifecycle of an exe. This can be useful for a variety of purposes, such as adding custom functionality to an existing program or modifying its behavior.
Project description
向可执行文件中注入python代码或者任意可执行文件
使用python解释器直接注入
import tkinter.messagebox
import peinjecter
def hello():
tkinter.messagebox.showinfo('Hello peinjecter!')
if __name__ == '__main__':
peinjecter.inject('target.exe', before=hello)
打包后再进行注入
import sys
import tkinter.messagebox
import peinjecter
def hello():
tkinter.messagebox.showinfo('Hello peinjecter!')
if __name__ == '__main__':
if getattr(sys, 'frozen', False):
peinjecter.inject('target.exe', before=hello)
else:
peinjecter.build()
注入其他可执行文件
import peinjecter
if __name__ == '__main__':
peinjecter.inject('target.exe', before='test.exe')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
peinjecter-1.0.0.tar.gz
(8.7 MB
view details)
Built Distribution
File details
Details for the file peinjecter-1.0.0.tar.gz
.
File metadata
- Download URL: peinjecter-1.0.0.tar.gz
- Upload date:
- Size: 8.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.8 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33b7b77d5b0262b4032d958629dace9d98d8ecbf9788f7fd0cdcaa8570fe5280 |
|
MD5 | fe85066455ae740ee60d9340db68233c |
|
BLAKE2b-256 | df00a4128f7849a268deb3d1e4d264593d3b71eb76ff0c6952bab3ed1b3cc3b7 |
File details
Details for the file peinjecter-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: peinjecter-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.8 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 997f56ed845302bd6cb9d2b6a5ecb9d2d99d2636b4291107b924b284d5769ac5 |
|
MD5 | d50bc9ab57e4ec3eb408d3deff4e2d22 |
|
BLAKE2b-256 | 177011241836c92353b1a3f2a962a9472e548dac2f2c72947e632991275ec74c |