-
-
Notifications
You must be signed in to change notification settings - Fork 294
/
setup.sh
208 lines (196 loc) · 7.45 KB
/
setup.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# Setup script - InstaHack
# The setup script for the InstaHack tool. This is a python script that automates the installation of the
# required utilities and modules, and all the important required dependencies for the tool.
# Author : Waseem Akram
# Github : https://github.com/evildevill/
# Website : https://hackerwasii.com
# Created on : May 04, 2020
# Modified on : October 04, 2024
# This file is part of InstaHack.
# Defining the ANSII color code variables for colored output
RED="\033[91m"
GREEN="\033[92m"
YELLOW="\033[93m"
BLUE="\033[94m"
RED_REV="\033[07;91m"
YELLOW_REV="\033[07;93m"
DEFCOL="\033[00m"
# Function to detect the operating system
detect_os() {
uname
}
# Function to check the Linux distribution
check_distro() {
if [ -f /etc/os-release ]; then
cat /etc/os-release | grep '^ID='
else
echo "android"
fi
}
# Function to install the required utilities and modules for Kali Linux
install_utilities_and_modules_kali() {
sudo apt-get install python -y >/dev/null 2>&1
sudo apt-get install git -y >/dev/null 2>&1
sudo apt-get install wget -y >/dev/null 2>&1
sudo apt-get install curl -y >/dev/null 2>&1
pip3 install lolcat -y >/dev/null 2>&1
sudo apt install tor -y >/dev/null 2>&1
}
# Function to install the required utilities and modules for Ubuntu
install_utilities_and_modules_ubuntu() {
sudo apt-get update -y >/dev/null 2>&1
sudo apt-get install python3 -y >/dev/null 2>&1
sudo apt-get install git -y >/dev/null 2>&1
sudo apt-get install wget -y >/dev/null 2>&1
sudo apt-get install curl -y >/dev/null 2>&1
sudo apt-get install tor -y >/dev/null 2>&1
pip3 install lolcat >/dev/null 2>&1
sudo apt-get install python3-pip -y >/dev/null 2>&1
}
# Function to add a directory to the PATH if it's not already there
add_to_path() {
dir="/home/$USER/.local/bin"
if ! echo $PATH | grep -q $dir; then
echo "export PATH=$dir:\$PATH" >>~/.zshrc
source ~/.zshrc
fi
}
# Function to install the required utilities and modules for Termux
install_utilities_and_modules_termux() {
pkg install python -y
pkg install python3 -y
pkg install git -y
pkg install wget -y
pkg install curl -y
pkg install tor -y
pip3 install lolcat
pip3 install requests
pip3 install mechanize
pip3 install bs4
pip3 install colorama
pip3 install requests[socks]
pip3 install stem
pip3 install instagram-private-api==1.6.0
}
downloading_password_lists() {
echo -e $GREEN "Downloading password list..." $DEFCOL
echo -e $GREEN "Please wait This may take a moment"
echo -e $GREEN "Depending on your internet speed.." $DEFCOL
echo ""
sleep 2
# Array of password lists to download
password_lists=("pass1.txt" "pass2.txt" "pass3.txt" "pass4.txt")
# Loop over the array and download each password list
for password_list in ${password_lists[@]}; do
if ! wget https://pub-2b8e269912ef4e92a7cdaa2352aee92f.r2.dev/$password_list; then
echo -e $RED "Failed to download $password_list" $DEFCOL
return 1
fi
done
echo -e $GREEN "Password list downloaded successfully" $DEFCOL
# Create pass folder inside instahack then move these into instahack/pass folder
mkdir -p $HOME/instahack/pass
mv ${password_lists[@]} $HOME/instahack/pass
echo ""
}
# The main script starts here
clear
# Detect the user's operating system
operating_system=$(detect_os)
# Check the user's operating system and perform different actions based on the operating system
if [ -d "/data/data/com.termux/files/usr/" ]; then
# If the user is using Termux, install the required utilities and modules
echo -e $GREEN "Detected Termux on Android." $DEFCOL
echo -e $GREEN "Installing the required utilities and modules." $DEFCOL
echo -e $GREEN "Please wait This may take a moment - " $DEFCOL
echo -e $GREEN "Depending on your internet speed." $DEFCOL
echo -e $GREEN "You may be prompted to grant storage permissions..." $DEFCOL
echo ""
# If the user is using Termux on Android, install the required utilities and modules
sleep 3
install_utilities_and_modules_termux
cd $HOME
# check if instahack folder exists
if [ -d "instahack" ]; then
cd instahack
sleep 2
bash instahack.sh
else
cd $HOME
git clone https://github.com/evildevill/instahack
cd instahack
downloading_password_lists
rm -rf /data/data/com.termux/files/usr/etc/tor/torrc
cp torrc /data/data/com.termux/files/usr/etc/tor/torrc
pip3 install -r requirements.txt
echo -e $GREEN "Setup completed successfully" $DEFCOL
echo -e $GREEN "Open new terminal and type $RED tor $GREEN then hit enter" $DEFCOL
sleep 4
bash instahack.sh
fi
# If the user is using Linux, check the distribution
elif [[ "$operating_system" == *"Linux"* ]]; then
# If the user is using Linux, check the distribution
linux_distro=$(check_distro)
if [[ "$linux_distro" == *"kali"* ]]; then
# If the user is using Kali Linux, install the required utilities and modules
clear
echo ""
echo -e $GREEN "Detected Kali Linux. Installing the required utilities and modules..." $DEFCOL
echo -e $GREEN "Please wait This may take a moment depending on your internet speed..." $DEFCOL
echo -e $GREEN "You may be prompted to enter your password..." $DEFCOL
echo ""
sleep 1
install_utilities_and_modules_kali
add_to_path
if [ -d "instahack" ]; then
cd instahack
sleep 2
bash instahack.sh
else
git clone https://github.com/evildevill/instahack.git
cd instahack
sudo rm -rf /etc/tor/torrc
sudo cp torrc /etc/tor/torrc
pip3 install -r requirements.txt
downloading_password_lists
sleep 2
echo -e $GREEN "Setup completed successfully" $DEFCOL
echo -e $GREEN "Open new terminal and type $RED tor $GREEN then hit enter" $DEFCOL
sleep 5
bash instahack.sh
fi
elif [[ "$linux_distro" == *"ubuntu"* ]]; then
# If the user is using Ubuntu, install the required utilities and modules
clear
echo ""
echo -e $GREEN "Detected Ubuntu Linux. Installing the required utilities and modules..." $DEFCOL
echo -e $GREEN "Please wait This may take a moment depending on your internet speed..." $DEFCOL
echo -e $GREEN "You may be prompted to enter your password..." $DEFCOL
echo ""
sleep 1
install_utilities_and_modules_ubuntu
add_to_path
if [ -d "instahack" ]; then
cd instahack
sleep 2
bash instahack.sh
else
git clone https://github.com/evildevill/instahack.git
cd instahack
sudo rm -rf /etc/tor/torrc
sudo cp torrc /etc/tor/torrc
pip3 install -r requirements.txt
downloading_password_lists
sleep 2
echo -e $GREEN "Setup completed successfully" $DEFCOL
echo -e $GREEN "Open new terminal and type $RED tor $GREEN then hit enter" $DEFCOL
sleep 5
bash instahack.sh
fi
else
echo -e $RED "Unknown Linux distribution. This script only supports Kali Linux, Ubuntu, and Termux." $DEFCOL
fi
else
echo -e $RED "This operating system is not supported by the script." $DEFCOL
fi