PROTOSCAN(1)

πŸ“¦ version 0.3.6, in nixpkgs unstable

hiii bestie πŸ’– welcome to PROTOSCAN(1) β€” it's giving General Commands Manual energy, and the main character is the protoscan command. let's get into it ✨

πŸ’– NAME πŸ’–

protoscan β€” find the protobuf descriptors embedded in a binary. that's the assignment, and it ate. πŸ’…

🌸 SYNOPSIS 🌸

protoscan [--proto-out] [-h|--help] [-V|--version] <FILE>

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: protoscan digs through a binary and finds the protobuf descriptors embedded in it. iconic behavior, no cap.

it prints the file name of each FileDescriptorProto found in FILE, in order. that's the whole vibe.

with --proto-out, it also writes each one to DIR/<name> β€” and lowkey cute detail: its .proto suffix gets replaced by .pb. it creates directories as needed, so you don't have to pre-make the whole little folder situation. πŸŽ€

πŸ‘‘ OPTIONS πŸ‘‘

  • --proto-out <DIR> β€” write each descriptor found under DIR, as <name>.pb.

--proto_out, the former spelling, is still accepted but deprecated (spec 0407 S3). so like, it still works, but maybe don't make it your whole personality. πŸ™ˆ

  • -h, --help β€” print help (see a summary with '-h').
  • -V, --version β€” print version.
  • <FILE> β€” the binary to scan. yes, that's the thing you're pointing the scanner at, bestie. 🫢

⭐ VERSION ⭐

v0.3.6 β€” that's the version. short, sweet, slay. πŸ’œ

🌈 ENVIRONMENT 🌈

  • PROTOSCAN_COMPLETE β€” when set to bash, zsh, or fish, print a shell completion script to stdout and exit. completion script era, we love to see it. ✨
  • PROTOSCAN_GEN_MAN β€” when set to a directory, write this man page there as protoscan.1 and exit. meta much? iconic. 😭

πŸ“ EXAMPLES πŸ“

πŸ’œ List the descriptors a program embeds

protoscan ./some_binary

this is the basic vibe check. πŸ”₯

πŸ’œ Extract them, then decode one with prototext

protoscan --proto-out extracted/ ./some_binary
prototext decode -t google.protobuf.FileDescriptorProto extracted/foo/v1/foo.pb

extract first, decode after β€” the prototext girlies know. πŸ’…

πŸ’œ Enable bash completion

source <(PROTOSCAN_COMPLETE=bash protoscan)

one-liner, no notes. 🌟

πŸŽ€ SEE ALSO πŸŽ€

prototext(1), protolens(1), reproto(1) β€” go give them a little read too, bestie. iykyk. πŸ˜­πŸ’–


xoxo, the User Commands section of the manual β€” protoscan v0.3.6, and the footer didn't give me a date so I'm not inventing one, periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from