Skip to main content

DocuBleach

DocuBleach

A command-line tool designed to detect and purge macros from commonly used office document formats (including MS Office Files, PDFs, etc.).

Super-Linter Unit Tests

Supported formats

Word

  • .docx: Word Document
  • .doc: Word Document (1997 - 2007)
  • .docm: Word Document with Macros
  • .dotx: Word Template
  • .dotm: Word Template with Macros

PowerPoint

  • .pptx: PowerPoint Presentation
  • .pptm: PowerPoint Presentation with Macros
  • .potx: PowerPoint Template
  • .potm: PowerPoint Template with Macros
  • .ppsx: PowerPoint Show
  • .ppsm: PowerPoint Show with Macros

Excel

  • .xlsx: Excel Spreadsheet
  • .xls: Excel Spreadsheet (1997 - 2007)
  • .xlsm: Excel Spreadsheet with Macros
  • .xltx: Excel Template
  • .xltm: Excel Template with Macros

Planned formats

  • .ppt: PowerPoint Presentation (1997 - 2007)
  • .pdf: Portable Document File

Problem

VBA and OLE content in MS Office files can, and have sometimes been made to, act as vehicles for malware delivery.

Microsoft has previously attempted to protect users from macros by disabling them by default. However, anybody is able to enable macros in an MS Office file before sending them on to a potential victim.

This Python tool aims to detect and remove any of this potentially malicious content from given files.

Solution

A command-line program written in modern Python (3.10+) that is capable of locating and removing macros from a variety of files.

It should support all the common Office Open XML formats, 'legacy' MS binary files, and PDFs.

Usage

This package has now been published to PyPi. Installation and usage are detailed below:

  1. pip install docubleach
  2. docubleach <PATH_TO_FILE>

The optional '-c' flag may be appended to the final command to enable notification if any macros or hyperlinks are detected.

Release files for docubleach 0.1.2

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

Source distribution (sdist)

Source distribution for docubleach 0.1.2
File Size Uploaded
docubleach-0.1.2.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for docubleach 0.1.2
File Interpreter ABI Platform
docubleach-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / docubleach-0.1.2.tar.gz

Download URL docubleach-0.1.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0c58832953227cd4abcaf5ca449ff4370c7b08edc740f995cca95be5722bafdd
BLAKE2b-256 checksum
How to use checksums
f385e5f9eac98a3d919941fb8ce455c31d1e57f4356335c971953f0780986240
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.6 Windows/11

Release files / docubleach-0.1.2-py3-none-any.whl

Download URL docubleach-0.1.2-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ab5a228f9aed39da690af562b5b4f5b61bb7750a855487f4b9a35f2fa096711
BLAKE2b-256 checksum
How to use checksums
b55c5b963076ff5ca008ccef7167866f14e108f9237a87a9c583160a24a0077e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.6 Windows/11

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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