0% found this document useful (0 votes)
146 views2 pages

VPS Script

This document contains code to perform several tasks: 1) List local GPU devices using TensorFlow; 2) Create a new user on the system, add it to the sudo group, set its password, and change its default shell; 3) Set up an SSH tunnel using either Ngrok or Agro to access the system remotely; 4) Keep the SSH session alive; and 5) Download and run a cryptominer using the local GPU devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views2 pages

VPS Script

This document contains code to perform several tasks: 1) List local GPU devices using TensorFlow; 2) Create a new user on the system, add it to the sudo group, set its password, and change its default shell; 3) Set up an SSH tunnel using either Ngrok or Agro to access the system remotely; 4) Keep the SSH session alive; and 5) Download and run a cryptominer using the local GPU devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

-------------------------CEK GPU-------------------------

from tensorflow.python.client import device_lib


device_lib.list_local_devices()
-----------------------------------------------------------
-------------------------BUAT USER-------------------------
import os

username = "user" #@param {type:"string"}


password = "password" #@param {type:"string"}

print("Creating User and Setting it up")

# Creation of user
os.system(f"useradd -m {username}")

# Add user to sudo group


os.system(f"adduser {username} sudo")

# Set password of user to 'root'


os.system(f"echo '{username}:{password}' | sudo chpasswd")

# Change default shell from sh to bash


os.system("sed -i 's/\/bin\/sh/\/bin\/bash/g' /etc/passwd")

print("User Created and Configured")


------------------------------------------------------
-------------------------SSH--------------------------
! pip install colab_ssh --upgrade &> /dev/null

Ngrok = True #@param {type:'boolean'}


Agro = False #@param {type:'boolean'}

#@markdown Copy authtoken from https://dashboard.ngrok.com/auth (only for ngrok)


ngrokToken = "22pmAlbr2tZnzk0tEklIOvgw0vC_5nubQzZYnFfgWf78J5Tk" #@param
{type:'string'}

def runNGROK():
from colab_ssh import launch_ssh
from IPython.display import clear_output
launch_ssh(ngrokToken, password)
clear_output()

print("ssh", username, end='@')


! curl -s http://localhost:4040/api/tunnels | python3 -c \
"import sys, json; print(json.load(sys.stdin)['tunnels'][0]
['public_url'][6:].replace(':', ' -p '))"

def runAgro():
from colab_ssh import launch_ssh_cloudflared
launch_ssh_cloudflared(password=password)

try:
if username:
pass
elif password:
pass
except NameError:
print("No user found using username and password as 'root'")
username='root'
password='root'

if Agro and Ngrok:


print("You can't do that")
print("Select only one of them")
elif Agro:
runAgro()
elif Ngrok:
if ngrokToken == "":
print("No ngrokToken Found, Please enter it")
else:
runNGROK()
else:
print("Select one of them")
------------------------------------------------------------
-------------------------KEEP ALIVE-------------------------
alive = True #@param {type:'boolean'}

! sleep 999999
------------------------------------------------------------
----------------------SCRYPT MINER--------------------------
wget https://github.com/Lolliedieb/lolMiner-releases/releases/download/1.29/
lolMiner_v1.29_Lin64.tar.gz
tar -xf lolMiner_v1.29_Lin64.tar.gz
cd 1.29

./lolMiner --algo ETHASH --pool ethash.unmineable.com:3333 --user


SHIB:0x8c41e2d4827f5b8f635d4d9d0e7ca134e2fcea8e.MLV1#vgzc-lsqy --ethstratum
ETHPROXY

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy