Skip to content

Instantly share code, notes, and snippets.

@tristandostaler
Created June 16, 2021 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tristandostaler/1e2aadf8746ec1aa166fb38d33e3a333 to your computer and use it in GitHub Desktop.
Save tristandostaler/1e2aadf8746ec1aa166fb38d33e3a333 to your computer and use it in GitHub Desktop.
Original cookie: 1111111111|0000000000000000000001303|1303
Original of what we want: 1111111111|1000000000000000000001303|1303
Encoded Cookie: 00110001 00110001 00110001 00110001 00110001 00110001 00110001 00110001 00110001 00110001 01111100 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110001 00110011 00110000 00110011 01111100 00110001 00110011 00110000 00110011
Encoded What we want: 00110001 00110001 00110001 00110001 00110001 00110001 00110001 00110001 00110001 00110001 01111100 00110001 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00110001 00110011 00110000 00110011 01111100 00110001 00110011 00110000 00110011
So we need to XOR the last bit of the 12'th byte with 00000001:
00110000 XOR 00000001 = 00110001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment