Find the Line that contains the MD5 code!
-
I have a file text with more 100.000 lines
1/ How to choose the line that contains more than 1 character ‘&’ ?
2/ The Line is formatted: Email:Pass. I should choose the line that contains the password Hash code. I know there are many kids of Hash code, but I need to choose the line with the MD5 code 32 and SHA1 40 characters.
Example: The line that contains the password MD5 32 characters :
abc@abc.com:8bd7a1153a88761ad9d37e2f2394c947
and the line that contains the password SHA1 40 characters :
cba@xyz.com:4f61ec4d2d1fd181ec25797e1d8d2400c5b04f24- Not necessarily accurate MD5 or SHA1 that is because I think this is not possible, so maybe I just need a similar format. I mean, if the line does the password is 32 or 40 characters will be selected. Hope you understand me are referring to problems.Thanks
-
Hello, @sarah-duong and All,
Very easy with regexes ! So :
- To find a line containing more than
1
character&
:
SEARCH
^(.*&){2}.*
or^(.*&){2}.*\R
( if you need the line-break too )- To find a line containing at least
32
hexadecimal chars (MD5
) and not more then40
chars (SHA1
), preceded with a colon :
SEARCH
^.+:[[:xdigit:]]{32,40}$
or^.+:[[:xdigit:]]{32,40}\R
( if you need the line-break too )Best Regards,
guy038
- To find a line containing more than
-
@guy038 Thanks. You’re boss this forum.