weird issue when trying to read mask option from file
#7
The problem here is simple. You are piping multiple arguments to hashcat through the $line variable, and your script is therefore sending them to hashcat as a single parameter.
You think it's saying: hashcat --flag param
But it's actually executing like this: hashcat "--flag param"

Here is a revised version of your script that should work a lot better:

Code:
#!/bin/bash

masks="`cat $1`"
hashfile=$2

IFS=$'\n'
set $(cat $1)

for line in $@; do
  echo "++++++++++++++++++++++++++++++++++++++++++++++++++"
  cmd="./hashcat-0.46/hashcat-cli32.bin -m 0 -a 3 --disable-potfile --outfile-format=1 -o cracked.dic $hashfile $line"
  eval $cmd
done


Messages In This Thread
RE: weird issue when trying to read mask option from file - by unix-ninja - 11-08-2013, 08:37 PM