Skip to content

Instantly share code, notes, and snippets.

@raphaunix
Last active October 17, 2019 20:39
Show Gist options
  • Save raphaunix/008199de5b728f963b1379ff14e7e177 to your computer and use it in GitHub Desktop.
Save raphaunix/008199de5b728f963b1379ff14e7e177 to your computer and use it in GitHub Desktop.
s.sh
#!/bin/sh
# Usage:
# sudo su -c 'wget -O- https://gist.githubusercontent.com/raphaunix/008199de5b728f963b1379ff14e7e177/raw/s.sh | sudo bash -s'
# sudo su -c 'curl -s https://gist.githubusercontent.com/raphaunix/008199de5b728f963b1379ff14e7e177/raw/s.sh | bash -s --'
set -eu
clear
CRED='\e[1m\e[31m'
CEND='\e[0m\e[0m'
echo -e "${CRED}
██████ ██▓ ██▓ ▓█████ ███▄ █ ▄████▄ ▓█████
▒██ ▒ ▓██▒▓██▒ ▓█ ▀ ██ ▀█ █ ▒██▀ ▀█ ▓█ ▀
░ ▓██▄ ▒██▒▒██░ ▒███ ▓██ ▀█ ██▒▒▓█ ▄ ▒███
▒ ██▒░██░▒██░ ▒▓█ ▄ ▓██▒ ▐▌██▒▒▓▓▄ ▄██▒▒▓█ ▄
▒██████▒▒░██░░██████▒░▒████▒▒██░ ▓██░▒ ▓███▀ ░░▒████▒
▒ ▒▓▒ ▒ ░░▓ ░ ▒░▓ ░░░ ▒░ ░░ ▒░ ▒ ▒ ░ ░▒ ▒ ░░░ ▒░ ░
░ ░▒ ░ ░ ▒ ░░ ░ ▒ ░ ░ ░ ░░ ░░ ░ ▒░ ░ ▒ ░ ░ ░
░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
${CEND}"
__check(){
if [ "$(id -u)" != "0" ] ; then
echo -e "${CRED}[-] YOU NEED ROOT PERMISSIONS TO RUN THIS SCRIPT! ${CEND}"
exit 1
fi
}
__tor(){
if [ ! -e /usr/bin/tor ]; then
echo -e "${CRED}[-] INSTALLING TOR ${CEND}"
if [ "$(grep "ID=ubuntu" /etc/os-release)" == "ID=ubuntu" ]; then
apt-get install -y gcc wget curl git unzip tor &> /dev/null
else
yum install -y gcc wget curl git unzip tor &> /dev/null
fi
fi
}
__proxychains(){
if [ ! -e /usr/bin/proxychains ]; then
echo -e "${CRED}[-] INSTALLING PROXYCHAINS ${CEND}"
cd /tmp
VERSION=4.14
wget -qO- https://github.com/rofl0r/proxychains-ng/archive/v$VERSION.tar.gz | tar xz -C /tmp/
cd proxychains-ng-$VERSION
cp src/proxychains.conf /etc/proxychains.conf
./configure --prefix=/usr --sysconfdir=/etc &> /dev/null
make &> /dev/null
make install &> /dev/null
echo -e "${CRED}[-] INSTALLING PROXYCHAINS CONFIG ${CEND}"
sed -i 's/strict_chain/#strict_chain/' /etc/proxychains.conf
sed -i 's/#dynamic_chain/dynamic_chain/' /etc/proxychains.conf
echo "socks5 127.0.0.1 9050" >> /etc/proxychains.conf
if [ ! -e /usr/bin/proxychains ]; then
ln -s /usr/bin/proxychains4 /usr/bin/proxychains
fi
systemctl start tor
proxychains curl https://ipinfo.io/ip
fi
}
main(){
__check
__tor
__proxychains
echo -e "${CRED}[-] DONE ${CEND}"
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment