Extracting the passwords from a multiple file wordlist (sed & grep).
#2
You can combine your first four commands into a single sed command. Since it appears you have an example that uses multiple nested directories (grep -r) you can use find + sed. And since you used grep -i I'll assume that pass= could be in any case.

Code:
find -type f | xargs sed -rn 's/^[Pp][Aa][Ss][Ss]=(.*)$/\1/p' | sort -u >wordlist_whatever.txt

Sorting the wordlist by most used password first isn't a bad idea I suppose, you could still work that into that.

Code:
find -type f | xargs sed -rn 's/^[Pp][Aa][Ss][Ss]=(.*)$/\1/p' | sort | uniq -c | sort -bnrk 1 | sed -r 's/\W+[0-9]+\W+//' >wordlist_ordered_whatever.txt
Reply


Messages In This Thread
RE: Extracting the passwords from a multiple file wordlist (sed & grep). - by epixoip - 06-14-2012, 05:58 PM