Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

peinjecter

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

peinjecter

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.

  • 1.0.0
  • PyPI
  • Socket score

Maintainers
1

向可执行文件中注入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


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc