How to convert String into Dictionary<string, string> using C#?

Hi,

I am struggling here trying to convert String into Dictionary<string, string>

I used the AES Encrypt String to Encrypt the cookie that I got from puppeteer and now I want to convert my string cookie into Dictionary<string, string> using C# or any easy method.

My Cookie String is like : {(KEY1, VALUE1), (KEY2, VALUE2), (KEY3, VALUE3), (KEY4, VALUE4)}

I have tried to use the cookie string as a Data variable but the Set Cookie Block won’t accept it, I think because he think it is a String.

Hello @Terminal,

Your cookies are already in a dictionary if you want to exploit them use this line :

  • data.COOKIES (Dictionary<string, string>) the cookies sent or received so far (e.g. data.COOKIES["COOKIES"])

Source : http://localhost:5000/docs/lolicode/data_variable

(I am struggling here trying to convert String into Dictionary<string, string>)

If you really want to add to a third-party dictionary you have two options:

Using the block directly

Or

By going to lolicode then adding this line you will have your third-party dictionary :

var Terminal = new Dictionary<String, String>();

For more help on dictionaries :

WannaCry

Thanks for your respond mate, but this is not what I am looking for exactly but don’t bother because I’ve already found a solution to my problem using C#