Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
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.
向可执行文件中注入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')
FAQs
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.
We found that peinjecter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.