-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·51 lines (43 loc) · 1.44 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
echo "Downloading necessary packages for Sniffer"
# websocketDir="/usr/local/lib/python3.6/site-packages/websockets"
websocketDir="/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/websockets"
# Check for Homebrew, install if we don't have it
if test ! $(which brew)
then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
echo "Brew is already in your system"
fi
if test ! $(which pip3)
then
echo "Installing python version 3..."
brew install python3
else
echo "Python3/pip3 is already in your system"
fi
if test ! $(which mitmproxy)
then
echo "Installing mitmproxy..."
pip3 install mitmproxy~=2.0.2
else
echo "MitmProxy is already in your system"
fi
if [ -d "$websocketDir" ]
then
echo "You already have websockets installed"
else
echo "Adding websockets in your python collections..."
mkdir /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/websockets
cp -r ./lib/websockets /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/
echo "Websocket was added successfully"
fi
#if [ -d "$websocketDir" ]
#then
# echo "You already installed websockets"
#else
# echo "Installing websockets now..."
# echo "If this takes too long then it must mean you're not on visigoth and you didn't turn on proxy"
# pip3 install websockets
#fi
echo "All done!"