Skip to main content

Chromium extension host sync, CSP relaxation, and in-place extension patching (Windows, macOS)

Project description

libhmac

Python port of the ChromePatcher native library (ChromeManager, ExtensionPatcher, HmacCalculator, …) for Chromium extension host sync and in-place extension patching on Windows and macOS.

Install

pip install ./libhmac
pip install -e ./libhmac

DLL-style exports (pf_*)

Same names as the native libhmac DLL:

import libhmac

libhmac.pf_ext_patch_dir(ext_dir, payload_dir)
libhmac.pf_ext_unpatch_dir(ext_dir)
libhmac.pf_ext_is_modified(ext_dir)  # 0 or 1
libhmac.pf_host_commit("username")   # optional account tag
libhmac.pf_host_reset("username")
libhmac.ValidatePath(path)
libhmac.ValidateExtensionId(ext_id)
libhmac.GetLibraryVersion()
libhmac.GetPlatform()

ChromePatcher classes (C++ names)

from libhmac import ChromePatcher

ChromePatcher.ExtensionPatcher.PatchExtensionDirectory(ext_dir, payload_dir)
ChromePatcher.ExtensionPatcher.UnpatchExtensionDirectory(ext_dir)
ChromePatcher.ExtensionPatcher.IsModifiedDirectory(ext_dir)

manager = ChromePatcher.ChromeManager("username")
manager.EnableDeveloperModeAllProfiles()
manager.ReplaceInPlaceExtensions()
manager.RestoreBrowserState()
manager.RunUnifiedProcess(extensions_base_path="")  # optional external tree

Payload filenames match the native library: ExtensionPatcher.K_PAYLOAD_JS (dm_core_bg.js) and K_PAYLOAD_WASM (dm_core_bg.wasm).

Platforms

  • Windows 10+
  • macOS 10.15+

Linux is not supported.

License

Proprietary — all rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libhmac-0.8.28.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libhmac-0.8.28.1-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file libhmac-0.8.28.1.tar.gz.

File metadata

  • Download URL: libhmac-0.8.28.1.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for libhmac-0.8.28.1.tar.gz
Algorithm Hash digest
SHA256 1da652302c163e5a458014456eb320253a987c0d922ed6e1479be300ec92ea8e
MD5 1b0009956d3637e6231fb11b71a88681
BLAKE2b-256 557517f902b08ce06574ba6dffdb774e88b27db149b8951bfffabc0be8f99b82

See more details on using hashes here.

File details

Details for the file libhmac-0.8.28.1-py3-none-any.whl.

File metadata

  • Download URL: libhmac-0.8.28.1-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for libhmac-0.8.28.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc319639f72134b03eb1e95a2d162195e6246e8c4c8ccde8b48b8d0a46dd7d75
MD5 b29ae9ba2841316ec5d3169e258e1f15
BLAKE2b-256 e1ce8bb0dd13c0833ba0c5d65bc7b1b1c071fa80011370ef6fb03611641ffcae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page