Regex - what is this and how can I use it? Be a cracking master, use regex.

Member
Joined
Mar 26, 2018
Messages
3
What is regex (regular expression) and how it can help you with cracking?
A very useful thing for cracking! Be a cracking master, parse databases like a god!

[hide]​
Hey, as I can see many of you are wondering what is a term called regex. I think that you heard of it then you had on your mind "sounds hard". Yes, it may sound hard, but in reality, it's easy. I am sure that you can learn the basics of regex in less than 40 minutes. Let's check Wikipedia for more info, maybe it will help us? No, it doesn't help us at all. It makes it more complicated. The things that we know now - it's called regular expression. And that's all. Let me explain to you what is this. Regex is nothing more than a string of characters that can match something in the text. For example:

Dot character - . - matches any character in the text;
Dollar character - $ - matches the end of the line;
Star character - * - is able to match 0 or more times.

There are also some character escapes:

\f matches form-feed;
\r matches carriage return;
\n matches linefeed;
\t matches horizontal tab;
\v matches the vertical tab;
\0 matches NUL character;
[\b] matches backspace.

Of course, there are more characters that are available in the regex. A helpful thing for you can be this selection of tables. Now you have a lookup to some regex functions/patterns.

But well, how you can use it in cracking? Have you ever had a database which contained more info than user/email and password. If yes, you probably were wondering how to use the useless for you pieces of information to get pure email or user:password combolist. That's the case where you can use regex. Let me give you a example:

You have a database that contains email, username, password, hash, IP, first name and last name and all of the things are separated (delimited) with a tab character and the break character is enter, how you can manage it to get pure user:password combolist? You have to use EmEditor to make it much easier with regex. Download the software, install it and open via it database. Now right-click on "CSV Formats"  then select "Customize CSV...".

o8KXX.png

Then click on "Add" and as delimiter set \t (tab character in regex). Then click OK.

HvRAN.png

Now click on the second "CSV Formats" that appeared on toolbox and boom, you have your database sorted into columns. Last thing that you have to do is select the columns that you want to copy then copy it. Now you can open new document, paste it and replace tab character with :. So now your database looks like this:

WRkjB.png

To replace tab character with :, click Ctrl + F then move to "Replace >>" tab. In Find field type \t, in Replace with type : and click "Replace All". All your tabs got replaced with :.


Ofc that's only a small part of regex power.
[/hide]​

Thanks for reading, don't be a leecher and make sure to leave a like.
 
Member
Joined
Aug 2, 2018
Messages
21
Upvoted
WTF Is This?
Is This a Software or smth?
thanks anyway
 
Member
Joined
Jul 6, 2018
Messages
137
Nice! Keep up the nice work!
 
Member
Joined
Nov 2, 2018
Messages
105
Thanks a freaking ton will like
 
Member
Joined
Aug 16, 2018
Messages
43
really confused what "regex" is? is it windows regisrty
edit:still really confused
 
Member
Joined
Sep 19, 2018
Messages
49
Simon said:
What is regex (regular expression) and how it can help you with cracking?
A very useful thing for cracking! Be a cracking master, parse databases like a god!



Thanks for reading, don't be a leecher and make sure to leave a like.

like that bro thanks
 
Top