Skip to main content

PyMBR

PyMBR is a simple module that allows the user to parse, manipulate or create MBR/Bootsectors easily.

  • Parse full MBR dump

  • Parse parts of the MBR such as the partition table.

  • Change the bootcode or the artition table values.

  • Compose the changes made into a a new MBR binary string.

Installation

python setup.py install

or

pip install pymbr

Sample usage - Creating a simple MBR

import pymbr
mbr = pymbr.MBR()
mbr.bootcode = pymbr.Bootcode.ZOIDBERG
mbr.partitionTable = pymbr.PartitionTable.parse('\x00' * 64)
mbr.signature = 0xaa55
bin = mbr.compose()
with open('mbr.bin', 'wb') as file:
    file.write(bin)

TODOs:

  • Add more common filesystems to the Filesystem class

  • Add common MBR bootcode to he Bootcode class

  • Add LBA to CHS converion

  • Add overlapping partition prevention

  • Tests?

Metadata

Release files for pymbr 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymbr 1.0.3
File Size Uploaded Provenance Actions
pymbr-1.0.3.tar.gz 4.8 kB Without provenance Details for pymbr-1.0.3.tar.gz

Release files / pymbr-1.0.3.tar.gz

Download URL pymbr-1.0.3.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f22cab3345571d52b71a029eff17792268862a38ad509df108b085de04112d76
BLAKE2b-256 checksum
How to use checksums
598cf4bcb610e2068dd5bcfa4569b5b6a39b347f748a32dd58a1f88e391b0539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pymbr 1.0.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page