Bonus Guide CSRF token Regex Parse
-
Hello
Here is a bonus from my guide on csrf token and today we are going to talk about Regex (Regular expressions).
Regular expressions allow you to identify in a text, subsets respecting a particular pattern. I would like to tell you that REGEX is not a language.
To better understand I put you a tutorial in English, French and Arabic:--->
English
---> French
---> ArabicIn this case, we could simply do an LR but I’m going to show you how we do it in REGEX
Now I'm going to do the OB part:
So here we launch our request and we get a token csrf
After its Create a new block then PARSE then Mod REGEX
So: Add a new block ---> PARSE ---> Regex mode
and look for csrf
Then you pretend that you want to parse a csrf token LR except that you put everything in regex and also you put in output [1] because it's not a full match it's a group [0] for full match
Now we are really going to use REGEX:
So we have that <meta name="csrf-token" content="">To have the content of this we need to use metacharacters symbol Regex
The point -----> . <----- Period indicates any character
The star ----->*<-----Indicates 0, 1 or more occurrences of the previous character or classAll this in parentheses (. *) So that its performs both
We parse our csrf token in regex mode its works with any time you put the symbols
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
If the Output is [0]
His takes exactly as tight as [1] his takes by group
Hope you understood and that I was precise
Why001
-
Thanks for these guides !
-
np @luciole
-
I would also recommend this site
https://regex101.com/
which helped me a lot when i started learning reg. expressions. You can test your regex there and even debug it
-
Yes I know this tools I completely forgot the mention thank you to you! @Itamai
-
My favourite go-to site is:
https://regexr.com/
-
thanks bro is very good
-
thank you for each single guide you make bro
-
Thanks for the guide bro
-
Thanks for these guides !!
-
This post is deleted!
-
Hey @inconnu365
It's not here that you have to wear your open a topic sealed that would be better and with screenshot