config

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 6 Imported by: 0 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoDetectDBRoot

func AutoDetectDBRoot() (string, string, error)

func DefaultWeChatBase

func DefaultWeChatBase() (string, error)

func DefaultWeChatBases

func DefaultWeChatBases() ([]string, error)

func Path

func Path() (string, error)

func Save

func Save(c *Config) error

Types

type Config

type Config struct {
	SchemaVersion int               `json:"schema_version,omitempty"`
	Wxid          string            `json:"wxid"`
	DBRoot        string            `json:"db_root"`
	Keys          map[string]string `json:"keys,omitempty"`
	ImageKey      string            `json:"image_key,omitempty"`
	ImageXORKey   *int              `json:"image_xor_key,omitempty"`
	Key           string            `json:"key,omitempty"`
	KeyPID        int               `json:"key_pid,omitempty"`
	KeyEpoch      int64             `json:"key_epoch,omitempty"`
}

Config is wechat-cli's persistent key map. By default it intentionally stays at ~/.config/wxcli/config.json for wxkey / wx-cli compatibility; WECHAT_CLI_CONFIG or the legacy WX_MCP_CONFIG can point at an explicit file.

Schema 2 carries a per-DB enc_key map: each WCDB file's SQLCipher salt maps to its 32-byte post-PBKDF2 encryption key. This is the only ready runtime state. Schema 1's legacy master password is intentionally ignored.

func Load

func Load() (*Config, error)

func (*Config) Ready

func (c *Config) Ready() bool

Ready reports whether the config has enough material to open WCDB files via wechat-cli's supported runtime path: schema-2 per-salt enc_keys.

Jump to

Keyboard shortcuts

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