repl.it
Pygame

I’ll change the name sometimes.

fork
loading
Files
  • main.py
  • chat.txt
  • nohup.out
  • note.txt
  • Waitlistlogin.txt
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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# @Foster_Bryant:
# (I will do this too) all edits will be included up here in this format:
# Line: <line>
# Edit: <short description>
# Edited By: <username>
# ---------------------------------------------------------------------

import tkinter as tk
from tkinter import messagebox
import webbrowser
import webbot
import os
import time
import random
from getkey import *

master = tk.Tk()

# hide main window
loggedin = tk.Tk()


loggedin.withdraw()


# message box reference
# messagebox.showerror("Error", "")
# messagebox.showwarning("Warning","Warning message")
# messagebox.showinfo("Information","Informative message")
# messagebox.askyesno(
#	   message='Are you sure you want to install SuperVirus?'
#	   icon='question' title='Install')
# earlier chat project. maybe could be ressurected
class chat():
    def changechat(self, bool):
        global run
        run = bool

    def chat(self, text):
        file = open("chat.txt", "a")
        file.write(text)
    # -----------------------------------------------------------------------------


tk.Label(master,
         text="    ").grid(row=0, column=10)


def notepad():
    loggedin.title("notepad")
    lol.destroy()
    global note, hi
    note = tk.Entry(loggedin)
    hi = tk.Button(loggedin,
                   text='Save Note',
                   command=save)
    term = tk.Button(loggedin,
                     text="Terminate NotePad")
    note.pack()
    hi.pack()


def gglchrome():
    webbrowser.open('https://www.google.com/chrome/')


def searchnow():
    queryget = query.get()
    url = "https://www.google.co.in/search?q=" + (str(queryget)) + "&oq=" + (
        str(queryget)) + "&gs_l=serp.12..0i71l8.0.0.0.6391.0.0.0.0.0.0.0.0..0.0....0...1c..64.serp..0.0.0.UiQhpfaBsuU"
    print(url)
    driver = webbot.Browser()
    driver.go_to(url)
    


def google():
    loggedin.title("search")
    tk.Label(master,
             text="search:").grid(row=5, column=0)
    global query
    query = tk.Entry(loggedin)
    query.pack()
    searchh = tk.Button(loggedin,
                        text="Search",
                        command=searchnow)
    searchh.pack()

def openb():
    driver = webbot.Browser()
    driver.go_to("https://google.com")
def browser():
    loggedin.title("browser")
    openweb = tk.Button(loggedin,
                        text="Open Chromium",
                        command=openb)
    
    gogl = tk.Button(loggedin,
                     text="Open Search",
                     command=google)
    goglechrom = tk.Button(loggedin,
                           text="Download Google Chrome For Your Computer",
                           command=gglchrome)
    goglechrom.pack()
    gogl.pack()
global helpp
helpp = tk.Tk()
helpp.withdraw()
#after login screen
class ayuda():
  def request():
    pass
  def loginrequest():
    seenndd = tk.Button(loggedin,
                     text="request a login",
                     command=request)

    append = open("chat.txt", "a")
    append.write(text)


def welcome():
    helpp.deiconify()
    lolh = ayuda()
      
    helpp.title("!help!")
    
    loggedin.deiconify()
    messagebox.showwarning("Not Complete", "This Project is not complete")
    #sets the title 
    loggedin.title("menu")
    #-------------set height and width of the window
    window_height = 380
    window_width = 570

    screen_width = loggedin.winfo_screenwidth()
    screen_height = loggedin.winfo_screenheight()

    x_cordinate = int((screen_width / 2) - (window_width / 2))
    y_cordinate = int((screen_height / 2) - (window_height / 2))

    loggedin.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
    #-----------------------menu options------------------------------------------------
    global lol
    ntbtn = tk.Button(loggedin,
                    text='Start Notepad',
                    command=notepad)
    #pack the note button
    ntbtn.pack()
    brwsr = tk.Button(loggedin,
                      text="Open Browser",
                      command=browser)
    #browser button
    brwsr.pack()


def save():
    text = note.get()  # gets the input when the user clicks "Save Note"
    file1 = open("note.txt", "a+")  # opens the note txt file
    exist = file1.read()  # reads the note
    messagebox.showwarning("Existing Text", exist)  # (supposed)show existing text before write...
    yesno = messagebox.askyesno(  # yes/no prompt
        message='Are you sure you want to append the note?',
        icon='question', title='Append Confirm')
    if yesno == "yes":  # if the user presses yes
        file1.write("\n" + text)
    elif yesno == "no":  # user presses no
        messagebox.showinfo("Confirmed", "message write canceled")
    else:  # user presses something unknown
        messagebox.showerror("???", "Something Weird Happened")


# terminate the note function
def terminate():
    note.destroy
    hi.destroy()



# ----------------------initial login screen----------------------------
#-----username and password label------
tk.Label(master,
         text="Username").grid(row=1, column=8)
tk.Label(master,
         text="Password").grid(row=2, column=8)


def login():  # I really need to find a better way to validate the login
    if e1.get() == "lolheck" or "testinguser" or "admin1":
        if e2.get() == "password" or "thisistest" or "2dm1n":
            messagebox.showinfo("Login", "Welcome")
            master.withdraw()
            welcome()
        else:
            messagebox.showerror("Error", "Incorrect Password")
    else:
        messagebox.showerror("Error", "Incorrect Username")

#the username and password 
e1 = tk.Entry(master)
e2 = tk.Entry(master)
e1.grid(row=1, column=9)
e2.grid(row=2, column=9)
# -------------------------
master.title("log in")

master.resizable(False, False)  # This code helps to disable windows from resizing
window_height = 580
window_width = 770

screen_width = master.winfo_screenwidth()
screen_height = master.winfo_screenheight()

x_cordinate = int((screen_width / 2) - (window_width / 2))
y_cordinate = int((screen_height / 2) - (window_height / 2))

master.geometry("{}x{}+{}+{}".format(window_width, window_height, x_cordinate, y_cordinate))
# -------
tk.Button(master,
          text='Quit',
          command=master.quit).grid(row=4,
                                    column=8,
                                    sticky=tk.W,
                                    pady=4)
tk.Button(master,
          text='log in', command=login).grid(row=4,
                                             column=9,
                                             sticky=tk.W,
                                             pady=4)
tk.Label(master,
         text="                                                         ").grid(row=0, column=0)
print("\n\n\n\nNOTICE:\nUsername: lolheck\nPassword: password\n\n\n\n")
tk.mainloop()
Fetching token
?