Community
    • Login

    Find the Line that contains the MD5 code!

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 371 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sarah DuongS
      Sarah Duong
      last edited by

      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
      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by guy038

        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 then 40 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

        Sarah DuongS 1 Reply Last reply Reply Quote 2
        • Sarah DuongS
          Sarah Duong @guy038
          last edited by

          @guy038 Thanks. You’re boss this forum.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors