I need to find any file across the entire file system that includes a string of text featuring between 30 & 40 consecutive characters only (i.e. it should match a md5 hash and not a sha512 hash for instance) and where the charset is lowercase letters (a-z) or uppercase letters (A-Z) or numbers(0-9).
findstr /S /i /R /m "^[a-z0-9]{30,40}$" *.txt
I tried with the above and the output was as follows (I just wanted to check text files first to see if I could find the values I'm looking for);
FINDSTR: Out of memory
I looked at https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/findstr for guidance but not got much experience with the Windows command-line. I know the range I used above {30,40} isn't really referred to within the docs for findstr
and that's the part I'm really struggling with.
Note that I don't have to use findstr
and can use other in-built Windows utilities or PowerShell just as long as its executed via the command-line is only requirement.
Get-ChildItem
to get the files, and thenSelect-String
to find the matching content.