-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathveracrypt_crack.sh
executable file
·85 lines (66 loc) · 2.62 KB
/
veracrypt_crack.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/sh
#------------------------------------------------------------------------------
# veracrypt_crack.sh
#------------------------------------------------------------------------------
# Container location
container="test.container"
# Wordlist
wordlist="wordlist.txt"
# Add one or multiple PIMs, use space as delimeter
pims="1234 1337"
# Set timeout to higher number for big containers, if additional or multiple
# keys are used or a high number PIM is used.
# Note if timeout is too low, veracrypt process might get killed and stop
# mounting process even when container password is correct.
timeout="10"
# PIM and NO-PIM support (NO-PIM = cracking without PIM)
pimsupport="1"
nopimsupport="1"
# Set 1 if you want to crack with keyfiles
keyfilesupport="0"
keylocation="keyfile"
# Set 1 if container was created with truecrypt
truecryptsupport="0"
#------------------------------------------------------------------------------
while read line; do
if [ "$pimsupport" -eq "1" ]; then
for pim in $pims; do
echo "-----------------------------------"
echo "PIM: $pim Password: $line"
timeout $timeout veracrypt -t `if [ $truecryptsupport -eq "1" ]; then echo " --truecrypt "; fi` --non-interactive --pim=$pim --password="$line" --mount $container
if [ "$?" -lt "2" ]; then
echo "Worked ! Done !"
exit
fi
if [ $keyfilesupport -eq "1" ]; then
echo "-----------------------------------"
echo "PIM: $pim Password: $line Keyfile: $keylocation"
timeout $timeout veracrypt -t `if [ $truecryptsupport -eq "1" ]; then echo " --truecrypt "; fi` --non-interactive --keyfiles="$keylocation" --pim=$pim --password="$line" --mount $container
if [ "$?" -lt "2" ]; then
echo "Worked ! Done !"
exit
fi
fi
done
fi
if [ "$nopimsupport" -eq "1" ]; then
echo "-----------------------------------"
echo "PIM: none Password: $line"
timeout $timeout veracrypt -t `if [ $truecryptsupport -eq "1" ]; then echo " --truecrypt "; fi` --non-interactive --password="$line" --mount $container
if [ "$?" -lt "2" ]; then
echo "Worked ! Done !"
exit
fi
if [ $keyfilesupport -eq "1" ]; then
echo "-----------------------------------"
echo "PIM: none Password: $line Keyfile: $keylocation"
timeout $timeout veracrypt -t `if [ $truecryptsupport -eq "1" ]; then echo " --truecrypt "; fi` --non-interactive --keyfiles="$keylocation" --password="$line" --mount $container
if [ "$?" -lt "2" ]; then
echo "Worked ! Done !"
exit
fi
fi
fi
done < $wordlist
echo "Finished. Not found."
#------------------------------------------------------------------------------