obfuscate

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command obfuscate emits go-build ldflag fragments that bake a XOR-obfuscated third-party provider key into the binary.

Usage:

go run ./tools/obfuscate <obfVar> <xorVar> <plaintext>

Prints a single space-separated pair of -X ldflag fragments on stdout that the Dockerfile/Makefile/CI can splice into its go build:

-X github.com/beacon-stack/pilot/internal/config.<obfVar>=<b64-ciphertext>
-X github.com/beacon-stack/pilot/internal/config.<xorVar>=<b64-xor-key>

Empty plaintext yields empty ldflag values (no obfuscation, no key, same as shipping an empty default).

Why: `strings pilot | grep -E '^[a-f0-9]{32}$'` is the casual attacker's path to the baked TMDB key. Obfuscation moves them to "figure out the layout, find the XOR key, pair them, decode." Still trivially defeatable by anyone running a debugger, but stops anyone who stops at strings(1).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL