Created
August 26, 2020 14:31
-
-
Save ezequielpereira/c7261175bd3b51e4184192b2f99e74c7 to your computer and use it in GitHub Desktop.
Script + proto definition used to research the pageToken of the GCP IAM projects.serviceAccounts.list method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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