-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
54 lines (39 loc) · 1.62 KB
/
main.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
import subprocess
import random
from tkinter import *
from tkinter.messagebox import *
from webbrowser import open_new
def callback(url):
open_new(url)
def buttonClicked():
answer = askyesno(title='Confirmation',
message='Proceed? (stop malwarebytes process before proceeding)')
if answer:
# Set the registry key and value
KEY_NAME = r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography"
VALUE_NAME = "MachineGuid"
NEW_VALUE = str(random.random())
# Change the registry value
subprocess.call(['reg', 'add', KEY_NAME, '/v', VALUE_NAME, '/t', 'REG_SZ', '/d', NEW_VALUE, '/f'])
# Confirm the change
subprocess.call(['reg', 'query', KEY_NAME, '/v', VALUE_NAME])
showinfo(title='Complete', message="Trial has been reset")
else:
pass
# Create the main window
root = Tk()
root.title("MalwareBytes trial reset")
root.iconbitmap('icon.ico')
# Create a button with the text "Click Me"
button = Button(root, text="Reset Trial", command=buttonClicked)
button.configure(width=20, height=3, font=('Verdana', 20, 'bold'))
button.pack()
# Create a label with text and place under button
label = Label(root, text="(click me)", font=('Verdana', 10))
label.place(relx=0.5, rely=0.6, anchor=CENTER)
# Create a label with small text
link = Label(root, text="github.com/ilan1009/MalwareBytesTrialReset", font=('Verdana', 10), fg="blue", cursor="hand2")
link.bind("<Button-1>", lambda e: callback("github.com/ilan1009/MalwareBytesTrialReset"))
link.pack(side='bottom') # Place the label below the button
# Start the event loop
root.mainloop()