https://github.com/jmcph4/mph
Python API for interfacing with arbitrary executables
https://github.com/jmcph4/mph
binary-analysis executable fuzzing host managed python subprocess
Last synced: about 1 month ago
JSON representation
Python API for interfacing with arbitrary executables
- Host: GitHub
- URL: https://github.com/jmcph4/mph
- Owner: jmcph4
- License: mit
- Created: 2018-01-12T02:50:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-12T02:51:20.000Z (over 7 years ago)
- Last Synced: 2025-03-22T10:42:34.482Z (about 2 months ago)
- Topics: binary-analysis, executable, fuzzing, host, managed, python, subprocess
- Language: Python
- Size: 1.95 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MPH #
---MPH (managed program host) is a Python package providing an API for interfacing
with arbitrary executables in a generic way. It should be noted that MPH is not
a virtual machine, nor is it a emulator of any sort. MPH simply provides an API
for providing input and output to arbitrary executables.Using MPH, users can provide input to arbitrary guest executables and retrieve
the output (on both `stdout` and `stderr`) and the return value of the program.# Examples #
from mph import program
prog = program.Program("/path/to/myprog", []) # initialise program
prog.append_string_stdin("Hello, world!") # write to stdin
prog.exec() # run program# check return value of gues executable
if prog.retval == 0:
print(prog.stdout)
else:
print("Inferior returned with return code " + str(prog.retval) + "\n")