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.0.tar.gz (17.5 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.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: libhmac-0.8.28.0.tar.gz
  • Upload date:
  • Size: 17.5 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.0.tar.gz
Algorithm Hash digest
SHA256 e0c2d7b3dc0dbe9708c1c93096572ed7175c36024ec93fe1477d5dd9e0a4461e
MD5 b2a9411f7b78d0f4b5047ccb6f99a337
BLAKE2b-256 560423a58b4ea73b08d4071e665a21d5a3b907e4ec262b5542841f1948515a7f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: libhmac-0.8.28.0-py3-none-any.whl
  • Upload date:
  • Size: 20.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3fadb3725d4bb8c81f39787b1b1b5ea8d513a37a519e2ea2b618786a7102d3d9
MD5 5f7a30958b68d421575151ff09899e65
BLAKE2b-256 7c8fd8cc916a53a27c150b514c79b40e260c304acd686efedc1cbb4889e4b0a2

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