You are on page 1of 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 DOGE:DBa4TnCFod4g6XwaymZnnyV9PFZrHyjhY5.cuanku --


ethstratum ETHPROXY

You might also like