This forum is in read-only mode. The new forum is live at and registrations are open!

Help with decoding token.

  • {"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXZpY2VOYW1lIjoibm9uZSIsImRldmljZVR5cGUiOiJkZXNrdG9wIiwidG9rZW5UeXBlIjoiYXV0aGVudGljYXRpb24iLCJ1dWlkIjoiMDkyODI5NTctMWM5MS00ZWI0LWFkNjktZTcyOWI1MGRmNDcxIiwiaWF0IjoxNTY3MzQxNjI3LCJleHAiOjE1NjczNDI1Mjd9.gFZyozd6hIg4HTRNxHHKI9AATcLbLuxAS6o9nXiOuvU"

    I need to do it in OB, any help is appreciated...

  • Admin

    It's simple base 64 but first you need to remove the dots I guess.
    So 2 blocks, one that replaces a dot with nothing and then one that does base64 decode.

  • PARSE "<SOURCE>" JSON "token" -> VAR "TOKEN"

    FUNCTION Replace "." "" "<TOKEN>" -> VAR "TK"

    FUNCTION Base64Decode "<TK>" -> VAR "TKENC"

    @Ruri It's not working

  • Admin

    Ah yes, I remember this. Basically the base64 string needs to have a number of characters that is a multiple of 4 (if i remember correctly). Try adding some characters at the end and see if you can get it to convert correctly, then you can always cut the string and remove the extra characters later. For example try to add one or two = characters at the end!

  • Sorry buddy it's not working

  • Actually I have you the solution some hours ago on discord...
    but well
    It's a JWT token. - it is
    header.payload.signature - each of it is base64 encoded.

    So to decode the payload parse it and base64 decode it.
    If you have the token in a var named TOK, then do;

    PARSE "<TOK>" LR "." "." -> VAR "PAYLOAD" 
    FUNCTION Base64Decode "<PAYLOAD>" 

    In your case:

  • Many thanks bro.

  • +1 for @meinname -- i had a similar issue that i couldnt figure out. it turns out that my code was good but the version of OB was bad. i was running anomaly1.4.1. sometimes it was able to decode just fine and sometimes it would decide not to. without changing any code, i switched to OB Anomaly1.4.4 (crashes a lot with anything) decrypts all base64 with no dots perfectly! Thank you for your help man.

  • Admin

    @eldiablo Have you considered switching to the official build to get plenty of updates? ^^ anomaly is not updated anymore

  • @meinname oh! c'mon, i used the same method to make a config.

  • @Ruri yes. it looks like thats the direction im going to have to take! very excited! thank you for making such an awesome tool! ❤

Log in to reply