int3
Synopsis
int3 is a Python toolkit for writing low-level, position-independent code featuring the following...
A high-level command-line interface for common assembly tasks:
$ echo -n "int3" | int3 assemble -a x86_64 | int3 format
b"\xcc"
A Python interface for writing your own position-independent programs with automatic bad byte avoidance (examples/linux/hello_world.py):
import sys
from int3 import Compiler
cc = Compiler.from_str("linux/x86_64", bad_bytes=b"\n\r")
with cc.def_func.main():
num_written = cc.sys_write(fd=1, buf=b"Hello, world\n")
cc.sys_exit(num_written)
sys.stdout.buffer.write(cc.compile())
Support for disassembling them:
$ python3 examples/linux/hello_world.py | python3 -m int3 disassemble | tail -10
0x0078: inc edx
0x007a: inc edx
0x007c: inc edx
0x007e: inc edx
0x0080: mov rax, rdi
0x0083: syscall
0x0085: mov rdi, rax
0x0088: mov eax, 0x3c
0x008d: syscall
0x008f: ret
And executing them:
$ python3 examples/linux/hello_world.py | python3 -m int3 execute ; echo $?
Hello, world
13
Installation
int3 is tested on the latest major version of CPython. You can get the latest release from PyPI with:
pip install int3
Features
- Write position-independent assembly code in a higher-level Python interface
- Builtin support for cross-compiling to various architectures
- Mutate generated machine code to remove bad bytes
- Command-line interface for common formatting and exploratory reversing tasks
License & Usage
int3 is intended for educational use. int3's unique code is released under the GNU LGPLv3, as per the LICENSE.txt file in the root of this repository. Code belonging to other open source projects is licensed under the respective licenses of those projects.
Metadata
Release files for int3 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| int3-0.0.2.tar.gz | 34.9 MB | Without provenance | Details for int3-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| int3-0.0.2-cp313-cp313-manylinux_2_38_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.38+ x86-64 | Details for int3-0.0.2-cp313-cp313-manylinux_2_38_x86_64.whl |
Total release size: 70.4 MB
Release files / int3-0.0.2.tar.gz
| Download URL | int3-0.0.2.tar.gz |
|---|---|
| Size | 34.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12cff32060fb4d3b20e3ace28f68a37f235031e87abf25f38f85a1fe5dc291ef
|
|
BLAKE2b-256 checksum How to use checksums |
52507025cf9ae43a466fc4aa4b05faa6abadba62eac446c797e102a352cd45ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.15
|
Release files / int3-0.0.2-cp313-cp313-manylinux_2_38_x86_64.whl
| Download URL | int3-0.0.2-cp313-cp313-manylinux_2_38_x86_64.whl |
|---|---|
| Size | 35.5 MB |
| Tags | CPython 3.13 Linux glibc 2.38+ x86-64 |
|
SHA-256 checksum How to use checksums |
c21054a95360c5e142453ab80c5ce59e4260baddb206c1613bb312c470beeb07
|
|
BLAKE2b-256 checksum How to use checksums |
2269d2ac2c31612fc91220d2d77c980505d382c136ff274fe12391b283c60a8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.15
|
Security for int3 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.