-
Notifications
You must be signed in to change notification settings - Fork 0
/
modpli
77 lines (72 loc) · 1.62 KB
/
modpli
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
#!/bin/bash
#-------------------------------------------------------------------------VARIABLES-----------------------------------------------------------------------------
Password=""
Directory=""
Directory_2=""
File=""
#-------------------------------------------------------------------------FUNCTIONS---------------------------------------------------------------------------------------------
check_pkg () {
cmd_avab zip
}
cmd_avab () {
if ! command -v $1 &> /dev/null
then
echo -n " [+] Installing Required Packages...."
apt update -y ;apt upgrade -y
apt install $1 -y &> /dev/null
check_pkg
echo "(Done)"
clear
fi
}
cxt () {
files=$(ls -a)
for file in $files
do
if [[ $file == "." ]]
then
continue
elif [[ $file == ".." ]]
then
continue
else
fil=$(echo $file | cut -d "." -f 1)
if [[ $fil == "" ]]
then
fil=$(echo $file | cut -d "." -f 2)
fi
mv $file .$fil.$1
fi
done
}
#-------------------------------------------------------------------------LOGIC-----------------------------------------------------------------------------
check_pkg
cd $Directory
mkdir add
if [ ! -e $File ]
then
echo " [!] File Doesn't Exists!"
rm -rf add
exit 0
fi
echo -n " [+] Decrypting File...."
unzip -P $Password $File &> /dev/null
echo "(Done)"
cd $Directory_2
echo -n " [+] Converting Data In Suitable Format...."
cxt mp4
echo "(Done)"
read -p " [+] Add Files...(Press Enter To Continue)"
cd $Directory/add
cxt id
mv .* $Directory/$Directory_2 &> /dev/null
rm -rf $Directory/add
cd $Directory
cd $Directory_2
cxt id
cd $Directory
rm -rf $File
echo -n " [+] Encrypting Files....."
zip -rP $Password $File $Directory_2
echo "(Done)"
rm -rf $Directory/$Directory_2