Posts: 1
Threads: 1
Joined: Jan 2017
What is the easiest way to do such operations :
1-pick all 8 chars long words from a list file and create a new one with them only.
2- append a couple predefined pre or suffix to these words (123, 111, 007 for example)
I would rather do this in a linux terminal but i dont mind using a windows gui app.
Thank you, any help is greatly appreciated.
Posts: 124
Threads: 12
Joined: Apr 2010
Posts: 32
Threads: 7
Joined: Mar 2016
(01-29-2017, 10:31 PM)heretolearn Wrote: What is the easiest way to do such operations :
1-pick all 8 chars long words from a list file and create a new one with them only.
2- append a couple predefined pre or suffix to these words (123, 111, 007 for example)
I would rather do this in a linux terminal but i dont mind using a windows gui app.
Thank you, any help is greatly appreciated.
Check this out:
https://hashcat.net/wiki/doku.php?id=hashcat_utils#len
And this:
https://hashcat.net/wiki/doku.php?id=rule_based_attack
Or this:
cat your_dict.txt | awk 'length()==8' > new_dict.txt
for i in `cat new_dict.txt`; do echo ${i}123 >> new_dict123.txt; done
Google for other solutions.
Posts: 2,936
Threads: 12
Joined: May 2012
01-30-2017, 08:01 PM
(This post was last modified: 01-30-2017, 08:02 PM by epixoip.)
UUoC! awk 'length == 8' dict1 > dict2
For the second one, a 'for' loop won't work if the wordlist has more lines than ARG_MAX or if the words contain spaces, plus UUoC again, so that would be a very poor solution. A 'while' loop would be better: while read word; do echo "${word}123"; done < dict2 >> dict3
Or, since this is Hashcat: ./hashcat --stdout -j '$1$2$3' dict2 >dict3
Personally I'd probably just use sed 's/$/123/' dict2 >dict3
Posts: 32
Threads: 7
Joined: Mar 2016
Of course. This was just an example when no one was answering him.