Skip to content

Commit d94b5bf

Browse files
v2.2.4
1 parent 206b0bb commit d94b5bf

File tree

1 file changed

+147
-0
lines changed

1 file changed

+147
-0
lines changed

rinstall

+147
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
#!/bin/bash
2+
#Let's Begin ::
3+
# Colors
4+
b='\033[1m'
5+
u='\033[4m'
6+
bl='\E[30m'
7+
r='\E[31m'
8+
g='\E[32m'
9+
y='\E[33m'
10+
bu='\E[34m'
11+
m='\E[35m'
12+
c='\E[36m'
13+
w='\E[37m'
14+
endc='\E[0m'
15+
enda='\033[0m'
16+
trap ctrl_c INT
17+
function ctrl_c() {
18+
echo ""
19+
echo -e " ${r} Do you want to leave installation ?${endc}"
20+
read -p " (Y/N) : " yn
21+
case $yn in
22+
[Yy]* ) exit;;
23+
[Nn]* ) install;;
24+
* ) install;;
25+
esac
26+
echo ""
27+
}
28+
function showlogo {
29+
clear
30+
echo """
31+
.____ __ .__ .__
32+
| | ____ ____ | | _______ | | | | ___________
33+
| | / _ \_/ ___\| |/ /\__ \ | | | | _/ __ \_ __ \
34+
35+
| |__( <_> ) \___| < / __ \| |_| |_\ ___/| | \/
36+
|_______ \____/ \___ >__|_ \(____ /____/____/\___ >__|
37+
\/ \/ \/ \/ \/
38+
Sofiane Hamlaoui | 2020
39+
""";
40+
echo
41+
}
42+
function checkroot {
43+
showlogo
44+
if [[ $(id -u) = 0 ]]; then
45+
echo -e " Checking For ROOT: ${g}PASSED${endc}"
46+
echo ""
47+
else
48+
echo -e " Checking For ROOT: ${r}FAILED${endc}
49+
${y}This Script Needs To Run As ROOT${endc}"
50+
echo ""
51+
echo -e " ${g}Lockdoor Installer${enda} Will Now Exit"
52+
echo
53+
sleep 1
54+
exit
55+
fi
56+
}
57+
58+
function chkapt {
59+
which apt > /dev/null 2>&1
60+
if [ "$?" -eq "0" ]; then
61+
echo -e " ${g} [-] Installing the Packages${endc}"
62+
echo ""
63+
apt-get install -y golang-go python python-pip python3 python3-requests python3-pip gcc ruby php git wget bc curl netcat subversion openjdk-11-jre make automake gcc gzip rsync wget
64+
gem install bundler:1.17.2
65+
else
66+
echo -e " ${g} [-] Skipping apt${endc}"
67+
fi
68+
69+
}
70+
71+
function chkpacman {
72+
which pacman > /dev/null 2>&1
73+
if [ "$?" -eq "0" ]; then
74+
echo -e " ${g} [-] Installing the Packages${endc}"
75+
echo ""
76+
pacman -S go python python-pip python-requests python2 python2-pip gcc ruby php git wget bc curl netcat subversion jre-openjdk make automake gcc linux-headers gzip rsync wget
77+
gem install bundler:1.17.2
78+
else
79+
echo -e " ${g} [-] Skipping pacman${endc}"
80+
fi
81+
}
82+
83+
function chkzypper {
84+
which zypper > /dev/null 2>&1
85+
if [ "$?" -eq "0" ]; then
86+
echo -e " ${g} [-] Installing the Packages${endc}"
87+
echo ""
88+
zypper install go python python-pip python-requests python2 python2-pip gcc ruby php git wget bc curl netcat subversion jre-openjdk make automake gcc linux-headers gzip rsync wget
89+
gem install bundler:1.17.2
90+
else
91+
echo -e " ${g} [-] Skipping zypper${endc}"
92+
fi
93+
sleep 1
94+
}
95+
96+
function chkdnf {
97+
which dnf > /dev/null 2>&1
98+
if [ "$?" -eq "0" ]; then
99+
echo -e " ${g} [-] Installing the Packages${endc}"
100+
echo ""
101+
dnf install go python python-pip python-requests python2 python2-pip gcc ruby php git wget bc curl netcat subversion jre-openjdk make automake gcc linux-headers gzip rsync wget
102+
gem install bundler:1.17.2
103+
else
104+
echo -e " ${g} [-] Skipping dnf${endc}"
105+
fi
106+
sleep 1
107+
}
108+
109+
function chkyum {
110+
which yum > /dev/null 2>&1
111+
if [ "$?" -eq "0" ]; then
112+
echo -e " ${g} [-] Installing the Packages${endc}"
113+
echo ""
114+
yum install go python python-pip python-requests python2 python2-pip gcc ruby php git wget bc curl netcat subversion jre-openjdk make automake gcc linux-headers gzip rsync wget
115+
gem install bundler:1.17.2
116+
else
117+
echo -e " ${g} [-] Skipping yum${endc}"
118+
fi
119+
sleep 1
120+
}
121+
122+
function install {
123+
showlogo && checkroot && chkapt && chkzypper && chkdnf && chkyum && chkpacman
124+
clear
125+
showlogo
126+
echo ""
127+
echo -e "\e[32m[-] : Where do you want to install the script [/opt/sofiane/Pentest] !\e[0m"
128+
read installdir
129+
: ${installdir:=/opt/sofiane/Pentest}
130+
echo ""
131+
echo -e "\e[32m[-] Installing .... !\e[0m"
132+
echo ""
133+
mkdir -p $installdir
134+
mkdir -p $HOME"/.config/lockdoor"
135+
grep -l Sofiane /usr/local/bin/* | xargs rm
136+
echo "Location:"$installdir > $HOME"/.config/lockdoor/lockdoor.conf"
137+
rsync -a ToolsResources/* $installdir
138+
pip3 install lockdoor
139+
clear
140+
# RUN
141+
showlogo
142+
echo -e " ${y}Lockdoor Installed Succesfully !${endc}
143+
${y}Type ${g}lockdoor${endc}${y} in ${r} Terminal${endc}${y} to use it${endc}"
144+
}
145+
146+
#main
147+
install

0 commit comments

Comments
 (0)