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: How to prepend single word to each dictionary entry?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'd like to prepend "https://" to every entry in my dictionary file, how can I do this with normal hashcat? Seems like it is possible with the hybrid attack in ocl hashcat like this?

./oclHashcat64.bin -m 0 -a 1 hashes.txt ^h^t^t^p^:^/^/ dictionary.txt

But I can only use the normal hashcat and it doesn't work, I simply get "^h^t^t^p^:^/^/: No such file or directory".
You can use a rule file, see : https://hashcat.net/wiki/doku.php?id=rule_based_attack

Also note that combination attack is different between oclHashcat and hashcat, in oclHashcat it combines 2 wordlists, in hashcat it combines each word of a single wordlist.
Thanks for your very fast response! I already found the rule based attack, but it didn't work out. I tried running:
./hashcat-cli64.bin -m 0 -r rule-http-prepend.txt hashes.txt dictionary.txt
where in rule-http-prepend.txt the content is ^h^t^t^p^:^/^/ or the same with a linebreak after every ^h etc. Loads the rule but doesn't find my testhash Sad
If you use ^h^t^t^p^:^/^/, since the rules are read from left to right, you prepend //:ptth to each word in your dict (^h prepends h, but then ^t prepends t -> th with the previous one, etc…).
Yes it's because the ^ (prepend rule) ... prepends so if your plain is "password" and your rule is "^t^h^e" for example, it will result in "ehtpassword".

I hope you see what you have to change now Smile
Perfect, works great, thank you very much!

Now as a last question is there a way to write the rule directly in the command instead of "outsourcing" it to an extra file? Something like:
./hashcat-cli64.bin -m 0 -r '^/^/^:^p^t^t^h' ../hashes.txt ../dictionary.txt
No, except in oclHashcat where you can use -j and/or -k.