pyradamsa
pyradamsa provides an interface for calling libradamsa methods from within Python, allowing one to perform mutations on byte blocks (aka fuzzing). For more details see radamsa (a general-purpose fuzzer) and libradamsa (precompiled radamsa library).
Usage
Install the package using pip (or build it from source)
pip install pyradamsa
Do some fuzzing
import pyradamsa
rad = pyradamsa.Radamsa()
mydata = b'GET /auth?pass=HelloWorld HTTP1.1'
fuzzed = rad.fuzz(mydata, seed=1337)
print(fuzzed)
> b'GET /auth?pass=HelloWorld HTTP\xc0\xb1.1'
# seed is randomly set if not provided
rad.fuzz(mydata)
> b'\tG\xf3\xa0\x81\x9c\xf7dLET \xe2\x81/aut\xf3\xa0\x80\xafHTTP2.rld HTTP2.rld HTTP3.2\xe1\xa0\x8e9'
rad.fuzz(mydata)
> b'GET /auth?pass=HelloWorld HTTP1.340282366920938463463374607431768211455'
etc.
# enforce static seed on initialization
rad = pyradamsa.Radamsa(seed=0)
# max_mut enforces a maximum length for returned data
# it defaults to (data length + an offset of 4096 bytes)
fuzzed = rad.fuzz(mydata, seed=1337, max_mut=10)
> b'GET /auth?'
# the offset may be overwritten on init
rad = pyradamsa.Radamsa(mut_offset=2048)
Building
Currently wheels are available for linux i686 and x86_64
# Clone the repo
git clone --recurse-submodules https://github.com/tsundokul/pyradamsa.git
cd pyradamsa
# patch memory leak when reinitializing owl vm
patch libradamsa/libradamsa.c realloc.patch
# OPTIONAL: when using manylinux (https://github.com/pypa/manylinux)
docker run --rm -it -v `pwd`:/io quay.io/pypa/manylinux2010_x86_64 /bin/bash
cd /io && alias python='/opt/python/cp35-cp35m/bin/python3.5'
export PATH="/opt/python/cp35-cp35m/bin/:${PATH}"
# Install requirements
python -m pip install -r requirements.txt
# Build C extension (libradamsa.so)
python setup.py build_ext
# Run tests
./run_tests
# Build wheel
python setup.py bdist_wheel
Contributing
- Fork the repo
- Check out a feature or bug branch
- Add your changes
- Update README when needed
- Submit a pull request to upstream repo
- Add description of your changes
- Ensure tests are passing
- Ensure branch is mergeable
MIT License, 2020 @tim17d
Metadata
Release files for pyradamsa 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyradamsa-0.1.1-cp32-abi3-manylinux1_x86_64.whl | CPython 3.2 | abi3 | Linux glibc 2.5+ x86-64 | Details |
| pyradamsa-0.1.1-cp32-abi3-manylinux1_i686.whl | CPython 3.2 | abi3 | Linux glibc 2.5+ x86-32 | Details |
Total release size: 1.1 MB
Release files / pyradamsa-0.1.1-cp32-abi3-manylinux1_x86_64.whl
| Download URL | pyradamsa-0.1.1-cp32-abi3-manylinux1_x86_64.whl |
|---|---|
| Size | 545.2 kB |
| Tags | CPython 3.2 Linux glibc 2.5+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dd12d5e3e42b00cc715e130c197a53d4810feb54e4feb41631ad990b500f6e34
|
|
BLAKE2b-256 checksum How to use checksums |
f386bac767757153b0ba0027022c64e924f1097bba09e397902c9d790eda949f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.0
|
Release files / pyradamsa-0.1.1-cp32-abi3-manylinux1_i686.whl
| Download URL | pyradamsa-0.1.1-cp32-abi3-manylinux1_i686.whl |
|---|---|
| Size | 550.5 kB |
| Tags | CPython 3.2 Linux glibc 2.5+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
e8bf3c115cec8b38bdd4d169a55b837789d5f4a48468c2a6240306ea6f426365
|
|
BLAKE2b-256 checksum How to use checksums |
187fdc8b93c40e6cb810295187de68285515083caad944487ec5b77214166015
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.0
|
Security for pyradamsa 0.1.1
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.