THE FORUM IS IN READ-ONLY MODE
How can I parse a cookie with a dynamic name?
-
Hello, I've got a cookie that I need to parse which has a dynamic name. I know that I need to parse this cookie since it's the 4th cookie that I receive when I make this request. How can I do this in Openbullet?
I've got 2 examples here below to show you guys what I mean. I need to capture the 4th cookie here.
https://imgur.com/a/yBbjHGA
-
Parse both key and value
-
If the value is fixed, you can parse by value
<COOKIES{value}>
-
Otherwise just use
<COOKIES>
which will return a stringified version of the cookie dictionary and then make a regex that will parse the cookie you need from that string.
-
@Ruri Do you know how I can make the regex? I've never used regex parsing before
-
You should show me an example of your
<COOKIES>
variable and what exactly you want to parse (and exactly what is randomized each time)
-
@Ruri
go6LtCxmFW8exku31AUSUD7m4AXyXLKwcUok5a63: eyJpdiI6IjBkY1FzTnExdWliV0M0MmtwRGt1UkE9PSIsInZhbHVlIjoiVEtYMXprRnNuRkdYRDBLRWM2ek1JSXJ4N1RHWlQzVVlBVndBdjk5Z0pYU1BETHRiVG9Fb0JTNDFldnpJUnN1WXdBUUoycStNbTFTb1pYb0lBNWt1OXF0UmpibzdMMTlZSmNYRkZiMkkxSXJKN2J3bjMxNk9teWh5RWxSNHVGaEZYSGRnS2R6RlN4MXdjUzlEaFo1dlpqVjJkWTUxWnBjNUJ2aElncUJFeDRoMjN3aWF4VU9qRkdlK2orUUJObG1NUXZWbDhzbCtEdTRKUnNCSGUxY0d1SElXVVBVUnpVSDNRQ1JtalwvdVZZNFIxXC9yblBycHhMajI5S1BcL0xzOE1ZdVhiT3pJN2V5M3VwcmdmTVhOeXdBN052TUo2WGhCY1IxdkNaWG1MVFhIWVplZURleWN0bUVlcTJYODhKYWdScTUiLCJtYWMiOiJiZDg5NDkzN2M2MTk2NmU0MmYxNjk2NDU5NjkxN2MxYTU3NTljNTkxNDZiNTVhOTkyZjVhZjBhOGQyZGY3ZTE2In0%3DFth6vQLhfm3ijDj0YMfWnwMH1rGKXpqsO8P5zq9y: eyJpdiI6IkJkYTdLZWFQdFhHXC9Ed3kwSm1SdGRnPT0iLCJ2YWx1ZSI6InRFbnBLSUV5YU5WZEk4ZVdvZ0JVNlo1ZExXODhTWDM0UVF0U0VPNUw5MXZLQ1NGOGNzd3NXcXF1T0djUlNPazlPZ1ZGNjFSaWphZzNOcUxVZ2luTGVkMG1QcmhZNThSNG9yd2R3ZkM1bkpoSlhOZnRUQ1wvMDczRFluZ2QxWFlsRXhTcTJGeE1odEU5Qkk3T3laUWhwQzlYQWlMdkZQZVdxcmU1dEdEM1wvY0hkNHoyVHVYV1phZTZVcSs4Rnk1bTJQS09SeE5FOVwvZ1MwU081RTJscnFweGpzMzNcL2dseEt1WXlFWWZhOVBSWWpTdzJrSzc4MFlxaEFcL2VydWZ6MVpMNVdSV25VeWMxXC9nZEllMTh2ZVd6c05kT1QwbnFxWENLWitxTXBWeXhLTUZQUndyNU41Q3JJM3ZtWXVYQ0NnSkJHIiwibWFjIjoiOGM3OWE1MWNkMjcxY2YxMjBlMWIyZTIxNzkzMThiMDc2ZDMwMWQ2NjQ4MTE1NTJjMDRiZWZjZTBmNWE3MzYzMCJ9
Examples are above. You can see that the variable names are randomised and I need to capture the respective JWTs. I don't want to paste all the cookies since that would probably clutter everything up. You can see two examples of <COOKIES> in the imgur link here. https://imgur.com/a/yBbjHGA
-
whats difference between () and {} in <COOKIES()>
-
-
You could do something like parse
ey[0-9A-Za-z]+
to parse the jwt (output would be[0]
)