Limiting the consecutive occurrence
#93
Pixel Wrote: M@LIK I think I found a bug:
...
The red ones are missing .

Opos! My bad, we should have removed all these three lines:
Code:
/\(.\).*\1.*\(.\).*\2/d
/\(.\).*\(.\).*\1.*\2/d
/\(.\).*\(.\).*\2.*\1/d

Pixel Wrote: Thanks M@LIK your the best. Oh WOW, lot of commands for this one. Do you know and good sed tutorials that are good? I have had a look but, just wanted to see if you had any that you would recommend having a you at?

I often look here: http://www.grymoire.com/Unix/Sed.html
But that only covers about 30% of sed, It's really an unlimited tool.

Hash-IT Wrote: I am just going to summarise the regular expressions part of this before we all get lost on what it all means.

So this is the regular expression code only not SED. Can you help me finish the explanation of the code M@LIK ?

Code:
.)\1\1  =  No more than 2 consecutive characters.  Add \1 for more.
(.).*\1.*\1  =  No more than 2 characters in a given line.  Add .*\1 for more.
(.).*\1.*(.).*\2  =  
(.).*(.).*\1.*\2  =  
(.).*(.).*\2.*\1  =  
(ABCD|BCDE|CDEF|DEFG|EFGH|FGHI|GHIJ|HIJK|IJKL|JKLM|KLMN|LMNO|MNOP|NOPQ|OPQR|PQRS|QRST|RSTU|STUV|TUVW|UVWX|VWXY|WXYZ)  =  No characters in alphabetical sequence of more than 3

We removed the last 4 rules, so no need to explain them.
However, it's all in:
Code:
(.) = Any character.
\1 or \2 or \3 ... \9 = Any occurrence of that same character.
Note that the \[1-9] are considered in sequence:
Code:
(.)\1 = Any two same-characters next to each other. E.g: AA or BB or 33. BUT NOT: AB, 12.
(.)\1(.)\2 = This will match: AABB, NN55, KK.., ^^$$. BUT NOT: ABAB, MNMN, 1313.
.* = Means there is a possibility that the characters are not next to each other:
     E.g: (.).*\1 Will match: 1B1, 11, 1SDH1, 1MBKDOEF1, OIU11TRW. BUT NOT: ABCD, 1234

Hash-IT Wrote: M@LIK, can I interest you in writing a wiki page for the hashcat wiki on this subject ? I think many people are interested in it but are just not able to help. Just take a look at the number of times this thread has been read !!!

Sounds good! My exams are still going, I'll finish by the end of next week, let's wait til then.


Messages In This Thread
Limiting the consecutive occurrence - by Hash-IT - 05-23-2012, 12:38 AM
RE: Limiting the consecutive occurrence - by ntk - 05-27-2012, 01:28 PM
RE: Limiting the consecutive occurrence - by TAPE - 05-27-2012, 11:36 PM
RE: Limiting the consecutive occurrence - by ntk - 05-28-2012, 09:57 AM
RE: Limiting the consecutive occurrence - by ntk - 05-29-2012, 12:12 AM
RE: Limiting the consecutive occurrence - by ntk - 05-29-2012, 02:19 AM
RE: Limiting the consecutive occurrence - by ntk - 05-29-2012, 04:02 AM
RE: Limiting the consecutive occurrence - by ntk - 05-30-2012, 10:11 AM
RE: Limiting the consecutive occurrence - by M@LIK - 06-01-2012, 03:44 PM
RE: Limiting the consecutive occurrence - by ntk - 06-01-2012, 11:30 PM
RE: Limiting the consecutive occurrence - by ntk - 06-02-2012, 10:48 AM
RE: Limiting the consecutive occurrence - by ntk - 06-03-2012, 12:56 AM
RE: Limiting the consecutive occurrence - by ntk - 06-03-2012, 01:07 PM
RE: Limiting the consecutive occurrence - by ntk - 06-03-2012, 02:14 PM
RE: Limiting the consecutive occurrence - by ntk - 06-05-2012, 02:08 AM
RE: Limiting the consecutive occurrence - by ntk - 06-05-2012, 02:48 AM
RE: Limiting the consecutive occurrence - by aGia - 06-07-2012, 11:26 PM
RE: Limiting the consecutive occurrence - by ntk - 06-08-2012, 12:13 AM
RE: Limiting the consecutive occurrence - by aGia - 06-08-2012, 12:24 AM
RE: Limiting the consecutive occurrence - by ntk - 06-08-2012, 12:29 AM
RE: Limiting the consecutive occurrence - by ntk - 06-08-2012, 01:52 AM
RE: Limiting the consecutive occurrence - by d333 - 09-04-2012, 01:56 PM
RE: Limiting the consecutive occurrence - by atom - 09-04-2012, 02:04 PM