This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Script for automatic setup of an SS-TPROXY server on CentOS 7.3 Minimal. | |
# | |
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | |
exiterr() { echo "Error: $1" >&2; exit 1; } | |
exiterr2() { exiterr "'yum install' failed."; } | |
bigecho() { echo; echo -e "\033[36m $1 \033[0m"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Time::gmtime; | |
use Time::localtime; | |
sub gcd { | |
my ($a, $b) = @_; | |
return ( $b ? gcd($b ,$a % $b) : $a); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__ __ _ _ | |
| \/ | __ _ _ ____ _____| | | | |
| |\/| |/ _` | '__\ \ / / _ \ | | | |
| | | | (_| | | \ V / __/ | | | |
|_| |_|\__,_|_| \_/ \___|_|_| | |
_ _ ____ _ | |
| | | | | __ ) ___ ___ | |_ | |
| | | |___| _ \ / _ \ / _ \| __| | |
| |_| |___| |_) | (_) | (_) | |_ | |
\___/ |____/ \___/ \___/ \__| ** LOADER ** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $(id -u) != "0" ]; then | |
printf "Error: You must be root to run this tool!\n" | |
exit 1 | |
fi | |
clear | |
printf " | |
################################################## | |
# # |