Пример #1
0
def decode_submit():
    decode_store = text_box_.get(1.0, "end")
    window_2.destroy()
    # creating a window to display the decode.
    decode_submit_window = Toplevel(window)
    decode_submit_window.title("PyDcoder_Adjustable-GUI by __ilprofessore ")
    decode_submit_window.geometry("200x200")
    decode_submit_window.iconbitmap("icon/image.ico")
    decode_submit_window.resizable(height=False, width=False)
    # the below line is solely responsible for using the 'decode' module to decode the encryption.
    decode_store = decode.decode_module(decode_store)
    # creating necessary labels and buttons.
    Label(decode_submit_window, text="").pack()
    __my_label = Label(decode_submit_window, text="Decryption", padx=5, pady=5, font=("arial", "12"), bg="grey", fg="blue")
    __my_label.pack(padx=5, pady=5)
    Label(decode_submit_window, text="ctrl+a", fg="red").pack()
    Label(decode_submit_window, text="ctrl+c", fg="red").pack()
    Label(decode_submit_window, text="").pack()
    final__display = Entry(decode_submit_window, width=25)
    final__display.pack()
    b1_ = Button(decode_submit_window, text="exit", fg="red", command=decode_submit_window.destroy, padx=10, pady=5)
    b1_.pack(padx=10, pady=10)
    final__display.insert(0, decode_store)

    decode_submit_window.mainloop()
Пример #2
0
def login_user():
    global user_name
    user_name = user_login_info.get()
    pass_word = pass_login_info.get()
    user_name = user_name.lower()

    if user_name == "":
        user_name = "public"
    if pass_word == "":
        pass_word = "147"

    for i in chars:  # this piece of code will be fundamental in enabling encryption.
        for k in str(pass_word):
            if i == k:
                sys.exit()

    pass_word = decode.decode_module(pass_word)

    user_login_info.delete(0, END)
    pass_login_info.delete(0, END)

    dir_files_list = os.listdir("files")  # my innovation !
    if user_name + ".ilprofessore" in dir_files_list:
        login_file = open("files/" + user_name + ".ilprofessore", "r")
        login_file_read = login_file.read().splitlines()  # good one !
        if pass_word in login_file_read:
            login_success()
        else:
            pass_error()
    else:
        login_error()
Пример #3
0
def register_user():
    username = user_info.get()
    password = pass_info.get()
    username = username.lower()

    for i in chars:  # this piece of code will be fundamental in enabling encryption.
        for k in str(password):
            if i == k:
                sys.exit()

    if username == "":
        username = "******"
    if password == "":
        password = "******"

    dir_files_list_reg = os.listdir("files")
    if username + ".ilprofessore" in dir_files_list_reg:
        sys.exit()  # program exits if a username is repeated for registration

    password = decode.decode_module(password)

    container = open("files/" + username + ".ilprofessore", "w")
    container.write(username + "\n")
    container.write(password)
    Label(register_window, text="Registration Successful", fg="green", font=12).pack()
    container.close()
    user_info.delete(0, END)
    pass_info.delete(0, END)
Пример #4
0
def session():
    global user_name
    login_window.destroy()
    session_window = Toplevel(window)
    session_window.resizable(width=False, height=False)
    session_window.iconbitmap("icon/image.ico")
    session_window.geometry("600x400")
    session_window.title("dashboard window __ilprofessore ")

    var = " and welcome to your Dashboard"
    db = Label(session_window, text="Hello " + user_name + var, bg="grey", padx=400, pady=15, font=12)
    db.pack()
    kar = " your most recent notification is displayed below:"
    lAbeL = Label(session_window, text=user_name + "," + kar, padx=5, pady=5, font=10, fg="red")
    lAbeL.pack(padx=5, pady=5)
    notification_file = open("files/" + user_name + "_notif" + ".ilprofessore", "r")
    notification_file_read = notification_file.read()

    notification_file_read = decode.decode_module(notification_file_read)

    Label(session_window, text="").pack()

    my_text_box = Entry(session_window, width=100)
    my_text_box.insert(0, notification_file_read)
    my_text_box.pack(padx=20, pady=20)

    Label(session_window, text="").pack()
    Label(session_window, text="ctrl+c", fg="red").pack()
    Label(session_window, text="to copy", fg="red").pack()
    Label(session_window, text="").pack()

    Button(session_window, text="exit", fg="red", padx=70, pady=10, command=session_window.destroy).pack(padx=10, pady=10)

    session_window.mainloop()
Пример #5
0
 def encrypt_decrypt_submit(self, choice):
     if choice == 'encrypt':
         global encrypt  # as long as global works, im fine.
         encrypt = self.ids.encrypt_input.text
         encrypt = encode_module(encrypt)
     elif choice == 'decrypt':
         global decrypt  # not a bad thing.
         decrypt = self.ids.decrypt_input.text
         decrypt = decode_module(decrypt)
# imported the modules i made earlier.
import codekey
import decode
print()
print("CODER AND DECODER V1.0 modular | by __ilprofessore ")
# taking the decision of the user.
decision = input("enter 0 to code or 1 to decode: ")
if decision == "0":
    codekey.code_module()
    input("press any key to exit;")
elif decision == "1":
    decode.decode_module()
    input("press any key to exit;")
else:
    print("wrong input, try again.")
# simple code, so far.
Пример #7
0
 def decrypt_submit(self):
     global decrypt
     decrypt = self.decrypt_input.text
     decrypt = decode_module(decrypt)