Posts: 63
	Threads: 10
	Joined: Nov 2017
	
	
 
	
	
		Should something like this work?
Code:
./hashcat -O -w3 -a6 dict.txt ?a?a?a?a -i --stdout | ./hashcat -O -w3 -m0 -a7 ?a?a -i 'hash'
Trying to accomplish having a dict.txt:
cat
dog
etc
And I want to add ?a?a to beginning and ?a?a?a?a to end of the wordlist
	
 
 
	
	
	
		
	Posts: 929
	Threads: 4
	Joined: Jan 2015
	
	
 
	
	
		Assuming the syntax is correct, that would indeed work - it would be slower than a direct on-GPU implementation, but a good compromise solution.
	
	
	
~
	
	
 
 
	
	
	
		
	Posts: 2,301
	Threads: 11
	Joined: Jul 2010
	
	
 
	
		
		
		12-20-2017, 01:03 PM 
(This post was last modified: 12-20-2017, 01:03 PM by undeath.)
		
	 
	
		I remember only a0 supporting stdin mode. Not sure if this has changed.
	
	
	
	
	
 
 
	
	
	
		
	Posts: 63
	Threads: 10
	Joined: Nov 2017
	
	
 
	
		
		
		12-20-2017, 03:57 PM 
(This post was last modified: 12-20-2017, 04:29 PM by walterlacka.)
		
	 
	
		 (12-20-2017, 01:03 PM)undeath Wrote:  I remember only a0 supporting stdin mode. Not sure if this has changed.
I think you're right:
Code:
./hashcat -O -w3 -a6 dict.txt ?a?a?a?a --stdout | ./hashcat -O -w3 -m0 -a7 ?a?a 'hash'
Gives:
Code:
Hash '?a?a': Line-length exception
No hashes loaded.
But this works:
Code:
./hashcat -O -w3 -a6 dict.txt ?a?a?a?a --stdout | ./hashcat -O -w3 -m0 -a0 'hash'
So, I was thinking I could create my own rule file using 
mp '^?a^?a' > new.rules, then issue this command:
Code:
./hashcat -O -w3 -a6 dict.txt ?a?a?a?a --stdout | ./hashcat -O -w3 -m0 -a0 'hash' -r ./new.rules 
 
	
	
	
	
 
 
	
	
	
		
	Posts: 929
	Threads: 4
	Joined: Jan 2015
	
	
 
	
	
		No - stdout leaves the hashcat process entirely, and there is no in-hashcat method for this today (other than, perhaps, generating a *very* large list of masks using maskprocessor:
Simplified PoC:
Code:
$ mp64 ?lhello?a | head
ahello 
ahello!
ahello"
ahello#
ahello$
ahello%
ahello&
ahello'
ahello(
ahello)
~
	
	
 
 
	
	
	
		
	Posts: 63
	Threads: 10
	Joined: Nov 2017
	
	
 
	
	
		The dict I want to use is only 2184 words… so I did this:
Code:
./hashcat -O -w3 -a7 ?a?a dict.txt --stdout > prependaa.txt
./maskprocessor-0.73/mp64.app '$?a$?a$?a$?a' > appendaaaa.rule
./hashcat -O -w3 -a0 ‘hash’ prependaa.txt -r ./appendaaaa.rule
I got this error:
Code:
* Device #2: Not enough allocatable device memory for this attack.
Code:
* Device #3: Not enough allocatable device memory for this attack.
 
	
	
	
	
 
 
	
	
	
		
	Posts: 929
	Threads: 4
	Joined: Jan 2015
	
	
 
	
	
		I think that you've got all of the possible pieces already, and you just need to arrange them with the trade-off that works best for you. It looks like appending or prepending ?a?a with rules as the final step is a good balance.
	
	
	
~