Skip to content

notes on extracting api key from secretd binary #47

@sbellem

Description

@sbellem

The API KEY and SPID are compressed (gzipped) using some go tool, go-bindata such that the data ends up in a go file:

  • ias_bin_dev.go for testnet
  • ias_bin_prod.go for mainnet

For instance, the string "3Dprintedchips" will be encoded as

var _api_key_txt = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x32\x76\x29\x28\xca\xcc\x2b\x49\x4d\x49\xce\xc8\x2c\x28\xe6\x02\x04\x00\x00\xff\xff\x4e\x49\xa9\x5f\x0f\x00\x00\x00")

It is possible to pass -no-compress to go-bindata such that the data will not be compressed, and in that case the resulting go file (e.g. ias_bin_dev.go) would contain:

var _api_key_txt = []byte(`3Dprintedchips`)

(note the backticks surrounding the plain text)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions