-
Notifications
You must be signed in to change notification settings - Fork 49
/
umadbro
executable file
·44 lines (39 loc) · 1.47 KB
/
umadbro
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
#!/bin/bash
# -----------------------------------------------------------
# generate an encrypted but crackable archive that contains
# a fake truecrypt volume with no actual info in it
# -----------------------------------------------------------
# -----------------------------------------------------------
# configure as you please
# -----------------------------------------------------------
wordlist="/usr/share/dict/american-english-insane"
archive_prefix="truecrypt_vol"
database="myvolume.tc"
keyfile="DONOTLOSE.key"
truecrypt=$(which truecrypt)
# -----------------------------------------------------------
# make it do the thing
# -----------------------------------------------------------
lolarchive() {
random_pass=$(sort -R "${wordlist}" | head -n 1)
cp -f "${truecrypt}" . &> /dev/null
my_truecrypt=$(basename "${truecrypt}")
if [[ $(($RANDOM % 2)) -eq 0 ]]; then
7za a -y -mhe=on -p"${random_pass}" "${archive_prefix}.7z" "${keyfile}" "${database}" "${my_truecrypt}" &> /dev/null
else
rar a -o+ -hp"${random_pass}" "${archive_prefix}.rar" "${keyfile}" "${database}" "${my_truecrypt}" &> /dev/null
fi
shred -un 1 "${keyfile}" "${database}" &> /dev/null
}
main() {
loop=0
count=$RANDOM
while [[ $loop -lt $count ]]; do
dd if=/dev/urandom bs=$RANDOM count=$RANDOM >> "${database}" 2> /dev/null
count=$(($count-1))
done
dd if=/dev/urandom bs=1M count=1 of="${keyfile}" &> /dev/null
lolarchive
}
main
exit 0