forked from blst-security/cherrybomb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
27 lines (26 loc) · 1.31 KB
/
install.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
#!/bin/bash
platform='unknown'
unamestr=$(uname)
case $unamestr in
"SunOs") echo "\033[31;1m SOLARIS is not yet supported, contact us to get support status or open a github issue\033[0m" ; exit 0;;
"Darwin") platform="mac_x86_64" ;;
"Linux") platform="linux_gnu" ;;
"FreeBSD") echo "\033[31;1m BSD is not yet supported, contact us to get support status or open a github issue\033[0m" ; exit 0;;
"WindowsNT") echo "\033[31;1m WINDOWS is not yet supported, contact us to get support status or open a github issue\033[0m" ; exit 0;;
*) echo "\033[31;1m unknown: $OSTYPE is not yet supported, contact us to get support status or open a github issue\033[0m" ; exit 0;;
esac
echo "\033[32;1m DETECTED OS - ${platform}\033[0m";
filename="cherrybomb_${platform}"
url=https://cherrybomb.blstsecurity.com/download_cherrybomb
c_t="Content-Type: application/json"
payload="{\"file\":\"${filename}\"}"
echo "\033[34;1m DOWNLOADING CHERRYBOMB\033[0m"
presigned=$(curl -s ${url} -H "${c_t}" -d $payload);
pre=$(echo "$presigned" | sed -e 's/^"//' -e 's/"$//');
c=$(curl -s ${pre} -o cherrybomb);
echo "\033[32;1m DONE DOWNLOADING\033[0m"
echo "\033[34;1m INSTALLING\033[0m"
mkdir ~/.cherrybomb 2> /dev/null
chmod +x cherrybomb;
sudo mv cherrybomb /usr/local/bin/
echo "\033[32;1m DONE INSTALLING RUN cherrybomb to test\033[0m"