more last minute polish
This commit is contained in:
+4
-4
@@ -22,12 +22,12 @@ if [ -z $1 -o -z $2 ]; then # check to maek sure both required args are present
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${#1} -ne 40 ]; then # check da length of da hashie boi
|
if [ ${#1} -ne 40 ]; then # check da length of da hashie boi
|
||||||
echo "First arguement should be the SHA1 hash, exactly 40 hex characters long!\nPlease see README for more details\nUsage:\n\tbd_crack.sh <hash> <known five characters> <optional charset>\nexiting"
|
echo -e "First arguement should be the SHA1 hash, exactly 40 hex characters long!\nPlease see README for more details\nUsage:\n\tbd_crack.sh <hash> <known five characters> <optional charset>\nexiting"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${#2} -ne 5 ]; then # maek sure da known chars are precisely 5 chars otherwise fail
|
if [ ${#2} -ne 5 ]; then # maek sure da known chars are precisely 5 chars otherwise fail
|
||||||
echo "Second argument should be exactly five characters!\nPlease see README for more details\nUsage:\n\tbd_crack.sh <hash> <known five characters> <optional charset>\nexiting"
|
echo -e "Second argument should be exactly five characters!\nPlease see README for more details\nUsage:\n\tbd_crack.sh <hash> <known five characters> <optional charset>\nexiting"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ if [ ! -z $3 ]; then # if charset is specified
|
|||||||
if [[ "$charset" =~ ^["$valid_charsets"]+$ ]]; then # sanity checkan da stupid chars :wheeze: just some shitty regex bullsh8it
|
if [[ "$charset" =~ ^["$valid_charsets"]+$ ]]; then # sanity checkan da stupid chars :wheeze: just some shitty regex bullsh8it
|
||||||
charset=$(grep -o . <<< "$charset" | sort -u | tr -d '\n')
|
charset=$(grep -o . <<< "$charset" | sort -u | tr -d '\n')
|
||||||
else
|
else
|
||||||
echo "INVALID CHARSET, DEFAULTING TO DEFAULT BEHAVIOR"
|
echo -e "INVALID CHARSET, DEFAULTING TO DEFAULT CHARSET"
|
||||||
charset_formatted="?l?u?d?s" # just replicate da default charset here because lazy as fucxk lmafao
|
charset_formatted="?l?u?d?s" # just replicate da default charset here because lazy as fucxk lmafao
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ else # if charset is not specified default to digit, upper alpha, lower alpha, a
|
|||||||
charset_formatted="?l?u?d?s"
|
charset_formatted="?l?u?d?s"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
outfile="$2-$1-cracked.txt" # using a fookin outfile because da hashcat.potsmoke or whatever the fuck is stupid
|
outfile="$2-$1-$(date +"%d-%m-%Y-%H%M")-cracked.txt" # using a fookin outfile because da hashcat.potsmoke or whatever the fuck is stupid
|
||||||
|
|
||||||
sudo hashcat -a3 -m100 $1 -1 $charset_formatted "$2?1?1?1?1?1?1?1?1" --increment --increment-min=5 -O -o "$2-$1-cracked.txt"
|
sudo hashcat -a3 -m100 $1 -1 $charset_formatted "$2?1?1?1?1?1?1?1?1" --increment --increment-min=5 -O -o "$2-$1-cracked.txt"
|
||||||
retcode=$? # jus gettin da return code from hashcat rq
|
retcode=$? # jus gettin da return code from hashcat rq
|
||||||
|
|||||||
Reference in New Issue
Block a user