Hashcat rule: Take first letter of each word in given word list
#1
What is the correct syntax for a hashcat rule to take the first letter of each word of a given list? So let's say the content of my word list is
Code:
This is a word list
i like hashcat
A Text With Capital Letter

The output should be
Code:
Tiawl
ilh
ATWCL
Reply
#2
That's to complex for rules, you would need to pre-process your word list with something different. For example create something in a scripting language you are comfortable with (pyhton, powershell, etc).
Reply
#3
awk works just fine on a Linux system:

Code:
$ cat wordlist.txt
This is a word list
i like hashcat
A Text With Capital Letter

Code:
$ awk '{for (i=1;i<=NF;i++) $i=substr($i,1,1)}1' OFS= wordlist.txt
Tiawl
ilh
ATWCL

or an easy, ugly, not that efficient alternative combining grep and sed:
Code:
$ grep -Eoz '\b.' wordlist.txt | sed -e 's/ //g'
Tiawl
ilh
ATWCL

you can pipe the output into hashcat or redirect it to a file to create a new word list:
Code:
$ awk '{for (i=1;i<=NF;i++) $i=substr($i,1,1)}1' OFS= wordlist.txt | hashcat ...
$ awk '{for (i=1;i<=NF;i++) $i=substr($i,1,1)}1' OFS= wordlist.txt  > wordlist.new
Reply