-
Notifications
You must be signed in to change notification settings - Fork 0
/
decrypt.sh
30 lines (29 loc) · 827 Bytes
/
decrypt.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
RARpath="/root/rar/rar"
for pair in `cat pair.txt`
do
folder=`echo $pair | cut -d♂ -f1`
currentdate=`echo $pair | cut -d♂ -f2`
password=`echo $pair | cut -d♂ -f3`
# /root/rar/rar x -ts -p"$password" "$folder.$currentdaterar"
if [ -f "$folder.$currentdate.rar" ]
then
$RARpath x -ts -p"$password" "$folder.$currentdate.rar"
fi
if [ -f "$folder.$currentdate.part1.rar" ]
then
$RARpath x -ts -p"$password" "$folder.$currentdate.part1.rar"
fi
if [ -f "$folder.$currentdate.part01.rar" ]
then
$RARpath x -ts -p"$password" "$folder.$currentdate.part01.rar"
fi
if [ -f "$folder.$currentdate.part001.rar" ]
then
$RARpath x -ts -p"$password" "$folder.$currentdate.part001.rar"
fi
cd $folder
md5sum --quiet -c $folder.md5
sha1sum --quiet -c $folder.sha1
sha256sum --quiet -c $folder.sha256
cd ..
done