Please note, this is a STATIC archive of website hashcat.net from 08 Oct 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.

hashcat Forum

Full Version: Adding 4 digit variable number to Name wordlist
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a wordlist of names and I want to add [4-digit-year] to end of each password using rule or maskprocessor:
abcd [abcd?d?d?d?d] =>abcd1965, abcd2015, abcd1722 ... and so on
I added a rule to the string:
Code:
-r /rules/year.rule
And inside of the rule file I added:
Code:
$?d $?d $?d $?d
but it didn't work! i realized it adds a "?" to the end of names and use "d" to duplicate that [4 times].
the results was like this:
abcd?abcd?abcd?abcd?abcd

please help.

Full string:
Code:
-m2500 -a0 hccapx/wifi_test.hccapx dics/names.lst -r rules/add_year.rule
Code:
for i in {1722..2017}; do echo $i | sed 's/\(.\)/\$\1 /g'; done > rules/add_year.rule
Hashcat rules don't support dynamic processing at the moment. You would have to run this through something like the mask preprocessor to expand that into a rule file. for example:

```
mp '$?d$?d$?d$?d' > new.rules
```

This should leave you with a file with many thousands of rules inside of it that should do what you expect.
(11-30-2017, 10:18 PM)philsmd Wrote: [ -> ]
Code:
for i in {1722..2017}; do echo $i | sed 's/\(.\)/\$\1 /g'; done > rules/add_year.rule

It seems your code is quite a smart automatic way to creat add_year rules ,but where and how should I run your code?
paste to cmd or elsewhere?
Sorry for newbie thoughts.
unix bash shell
Yeah, that's true my example was targeted for linux/mac users that use a bash-compatible shell.

That said, you can extend the idea to any other environment or tool (yes you could also do it all with awk etc).
An example using powershell (this can be run on windows with powershell installed) for instance would look something like this:
Code:
for ($i = 1722; $i -lt 2018; $i++) { echo $i | %{$_ -replace '(.)','$$$1 '} }

and as unix-ninja already pointed out you could do the same also with hashcat-utils' maskprocessor (mp64.exe for instance) or even with hashcat's --stdout mode
It's just a little bit more complicated to limit to only the numbers/years you want with mp/--stdout because they do not use directly a counter like the i variable above
(12-05-2017, 12:18 PM)undeath Wrote: [ -> ]unix bash shell
Thanks
(12-05-2017, 01:57 PM)philsmd Wrote: [ -> ]Yeah, that's true my example was targeted for linux/mac users that use a bash-compatible shell.

That said, you can extend the idea to any other environment or tool (yes you could also do it all with awk etc).
An example using powershell (this can be run on windows with powershell installed) for instance would look something like this:
Code:
for ($i = 1722; $i -lt 2018; $i++) { echo $i | %{$_ -replace '(.)','$$$1 '} }

and as unix-ninja already pointed out you could do the same also with hashcat-utils' maskprocessor (mp64.exe for instance) or even with hashcat's --stdout mode
It's just a little bit more complicated to limit to only the numbers/years you want with mp/--stdout because they do not use directly a counter like the i variable above

I do believe your code is effective and elegant,but newbies like me cannot understand easyily.
So I did like this
aaaaa
abcde
admin
anywn
apple

Xaaaaa
Xabcde
Xadmin
Xanywn
Xapple

XaXaaaa
XaXbcde
XaXdmin
XaXnywn
XaXpple

XaXaXaaa
XaXbXcde
XaXdXmin
XaXnXywn
XaXpXple

XaXaXaXaa
XaXbXcXde
XaXdXmXin
XaXnXyXwn
XaXpXpXle

XaXaXaXaXa
XaXbXcXdXe
XaXdXmXiXn
XaXnXyXwXn
XaXpXpXlXe

Xa XaXaXaXa
Xa XbXcXdXe
Xa XdXmXiXn
Xa XnXyXwXn
Xa XpXpXlXe

Xa Xa XaXaXa
Xa Xb XcXdXe
Xa Xd XmXiXn
Xa Xn XyXwXn
Xa Xp XpXlXe

Xa Xa Xa XaXa
Xa Xb Xc XdXe
Xa Xd Xm XiXn
Xa Xn Xy XwXn
Xa Xp Xp XlXe

Xa Xa Xa Xa Xa
Xa Xb Xc Xd Xe
Xa Xd Xm Xi Xn
Xa Xn Xy Xw Xn
Xa Xp Xp Xl Xe

finally to this step ,notepad it and replace all X

^a ^a ^a ^a ^a
^a ^b ^c ^d ^e
^a ^d ^m ^i ^n
^a ^n ^y ^w ^n
^a ^p ^p ^l ^e

HERE is my not so smart way
half automatic and half by hand

yourname@yourmachine /cygdrive/c/a
$ sed 's/^/&X/' test5.txt >newtest5.txt
yourname@yourmachine /cygdrive/c/a
$ sed 's/^../&X/' test5.txt >newtest5.txt
yourname@yourmachine /cygdrive/c/a
$ sed 's/^..../&X/' test5.txt >newtest5.txt
yourname@yourmachine /cygdrive/c/a
$ sed 's/^....../&X/' test5.txt >newtest5.txt
yourname@yourmachine /cygdrive/c/a
$ sed 's/^......../&X/' test5.txt >newtest5.txt
yourname@yourmachine /cygdrive/c/a
$ sed 's/^../& /' test5.txt >newtest5.txt
yourname@yourmachine /cygdrive/c/a
$ sed 's/^...../& /' test5.txt >newtest5.txt
yourname@yourmachine /cygdrive/c/a
$ sed 's/^......../& /' test5.txt >newtest5.txt
yourname@yourmachine /cygdrive/c/a
$ sed 's/^.........../& /' test5.txt >newtest5.txt

as I describe my painful 30+ hours as follows:
https://hashcat.net/forum/thread-7074.html
there r an obvious mistake in my former clumsy procedure
should run rev original-baseword >new.txt  first , for making prepend rules