Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script + proto definition used to research the pageToken of the GCP IAM projects.serviceAccounts.list method
#!/bin/bash
project=$1
page_size=3
unknown4=0
# Magic
outer=$(echo -e "project: $project\npage_size: $page_size\nunknown4: $unknown4" | protoc --encode=Outer test.proto | base64 -w 0 | sed 's/+/-/g; s/\//_/g')
outer=${outer//=}
echo cg:$outer
syntax = "proto2";
message Outer {
optional uint64 project = 1;
optional int32 page_size = 3;
optional int32 unknown4 = 4;
optional string inner_pb = 5;
}
message Inner {
optional uint64 last_service_account = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.