-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwkk.py
123 lines (111 loc) · 7.06 KB
/
wkk.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import os
import subprocess
import shutil
CRD_SSH_Code = input("Google CRD SSH Code: ")
username = input("user")
password = input("1234")
os.system(f"useradd -m {username}")
os.system(f"adduser {username} sudo")
os.system(f"echo '{username}:{password}' | chpasswd")
os.system("sed -i 's/\/bin\/sh/\/bin\/bash/g' /etc/passwd")
Pin = int(input("Masukkan PIN (minimal 6 digit): "))
Autostart = True #@param {type: "boolean"}
class CRDSetup:
def __init__(self, user, pin, autostart):
self.pin = pin
self.autostart = autostart
os.system("apt update")
self.installCRD()
self.installDesktopEnvironment()
self.changewall()
self.installGoogleChrome()
self.installQbit()
self.finish(user)
@staticmethod
def installCRD():
subprocess.run(['wget', 'https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb'])
subprocess.run(['dpkg', '--install', 'chrome-remote-desktop_current_amd64.deb'])
subprocess.run(['apt', 'install', '--assume-yes', '--fix-broken'])
print("Chrome Remoted Desktop Installed !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
@staticmethod
def installDesktopEnvironment():
os.system("export DEBIAN_FRONTEND=noninteractive")
os.system("apt install --assume-yes xfce4 desktop-base xfce4-terminal")
os.system("bash -c 'echo \"exec /etc/X11/Xsession /usr/bin/xfce4-session\" > /etc/chrome-remote-desktop-session'")
os.system("apt remove --assume-yes gnome-terminal")
os.system("apt install --assume-yes xscreensaver")
os.system("service lightdm stop")
os.system("apt-get install dbus-x11 -y")
os.system("service dbus start")
print("Installed XFCE4 Desktop Environment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
@staticmethod
def installGoogleChrome():
subprocess.run(["wget", "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"])
subprocess.run(["dpkg", "--install", "google-chrome-stable_current_amd64.deb"])
subprocess.run(['apt', 'install', '--assume-yes', '--fix-broken'])
print("Google Chrome Installed !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
@staticmethod
def changewall():
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/1280x1024.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/1280x1024.svg")
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/1280x800.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/1280x800.svg")
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/1600x1200.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/1600x1200.svg")
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/1920x1080.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/1920x1080.svg")
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/1920x1200.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/1920x1200.svg")
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/2560x1440.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/2560x1440.svg")
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/2560x1600.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/2560x1600.svg")
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/3200x1800.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/3200x1800.svg")
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/3200x2000.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/3200x2000.svg")
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/3840x2160.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/3840x2160.svg")
os.system(f"curl -s -L -o /etc/alternatives/desktop-theme/wallpaper/contents/images/5120x2880.svg https://gitlab.com/chamod12/gcrd_deb_codesandbox.io_rdp/-/raw/main/walls/5120x2880.svg")
print("Wallpaper Changed !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
@staticmethod
def installQbit():
subprocess.run(["apt", "update"])
subprocess.run(["apt", "install", "-y", "qbittorrent"])
print("Qbittorrent Installed !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
def finish(self, user):
if self.autostart:
os.makedirs(f"/home/{user}/.config/autostart", exist_ok=True)
link = "www.youtube.com/@The_Disala"
colab_autostart = """[Desktop Entry]
Type=Application
Name=Colab
Exec=sh -c "sensible-browser {}"
Icon=
Comment=Open a predefined notebook at session signin.
X-GNOME-Autostart-enabled=true""".format(link)
with open(f"/home/{user}/.config/autostart/colab.desktop", "w") as f:
f.write(colab_autostart)
os.system(f"chmod +x /home/{user}/.config/autostart/colab.desktop")
os.system(f"chown {user}:{user} /home/{user}/.config")
os.system(f"adduser {user} chrome-remote-desktop")
command = f"{CRD_SSH_Code} --pin={self.pin}"
os.system(f"su - {user} -c '{command}'")
os.system("service chrome-remote-desktop start")
print(" ..........................................................")
print(" .....Brought By The Disala................................")
print(" ..........................................................")
print(" ......#####...######...####....####...##.......####.......")
print(" ......##..##....##....##......##..##..##......##..##......")
print(" ......##..##....##.....####...######..##......######......")
print(" ......##..##....##........##..##..##..##......##..##......")
print(" ......#####...######...####...##..##..######..##..##......")
print(" ..........................................................")
print(" ......... Telegram Channel - https://t.me/TheDisala4U ....")
print(" ..........................................................")
print(" ..Youtube Channel - https://www.youtube.com/@The_Disala ..")
print(" ..........................................................")
print("Log in PIN : 123456")
print("User Name : root")
print("User Pass : 1234")
while True:
pass
try:
if CRD_SSH_Code == "":
print("Please enter authcode from the given link")
elif len(str(Pin)) < 6:
print("Enter a pin more or equal to 6 digits")
else:
CRDSetup(username, Pin, Autostart)
except NameError as e:
print("'username' variable not found, Create a user first")