Community
    • Login

    Find the Line that contains the MD5 code!

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 634 Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          Sarah Duong @guy038
          last edited by

          @guy038 Thanks. You’re boss this forum.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors