Exemplo n.º 1
0
def request_login():
    #Get info from login input
    login_key = core.get_value("login_input")

    #Don't login if not connected
    if console_client.client.connected != True:
        create_error_text(
            "You can't login if you're not connected to a server")
        return

    #Check login key
    login_attempt = console_client.client.save_auth_token(login_key)

    #If the login succeeded
    if login_attempt.success:
        login_succeeded()

    #If login key failed, say something
    else:
        #Delete the current error text if it exists
        if core.does_item_exist("login_error_text"):
            core.delete_item("login_error_text")

        #Setup error text
        error_text = "There was an error checking your key!"

        if login_attempt.message == "file_editing":
            error_text = "There was an error editing the key file on disk"

        if login_attempt.message == "non_key":
            error_text = "The key you entered wasn't a key..."

        #Finally, add error
        create_error_text(error_text)
Exemplo n.º 2
0
    def __init__(self, *, name_id: Optional[str] = None, **kwargs: Any):
        if name_id is not None:
            self._name_id = name_id
        else:
            self._name_id = _generate_id(self)

        if dpgcore.does_item_exist(self.id):
            self._setup_preexisting()
        else:
            # at no point should a Widget object exist for an item that hasn't
            # actually been added, so if the item doesn't exist we need to add it now.

            # labels are handled specially because they are very common
            if 'label' in kwargs and kwargs['label'] is None:
                kwargs['label'] = self.id

            # subclasses will pass both config values and keywords to _setup_add_widget()
            # separate them now
            config_props = self._get_config_properties()
            config_args = {}
            for name, value in list(kwargs.items()):
                prop = config_props.get(name)
                if prop is not None and not prop.no_init:
                    config_args[prop] = kwargs.pop(name)

            # just keywords left in kwargs
            self._setup_add_widget(kwargs)

            config_data = {}
            for prop, value in config_args.items():
                config_data.update(prop.fconfig(self, value))

            dpgcore.configure_item(self.id, **config_data)

        _register_item(self.id, self)
Exemplo n.º 3
0
    def show(self) -> None:
        if core.does_item_exist(self._win_name):
            self.destroy(self._win_name)

        obj_name = self._entry.get_object_name()

        with simple.window(self._win_name,
                           label=f"{obj_name}",
                           on_close=self.destroy,
                           width=400):
            ts = self._entry.get_timestamp_str()
            age = self._entry.get_age()

            core.add_label_text(self._win_name + "ts",
                                label=f"Timestamp",
                                default_value=f"{ts}")
            core.add_label_text(self._win_name + "age",
                                label=f"Age",
                                default_value=f"{age}")
            core.add_label_text(self._win_name + "freq",
                                label=f"Frequency",
                                default_value=f"0.0 Hz")
            core.add_text("")
            core.add_label_text(self._win_name + "content",
                                default_value=str(self._entry.get_object()),
                                label="")

        self._freq_thread.start()
Exemplo n.º 4
0
def open_overlay():
    """
    Open the Elo Overlay
    But first check if the FACEIT name is set
    If the FACEIT name isn't correct return
    If changes be made and not saved, return with a warning
    """
    global iChanges
    faceit_name = config_functions.get_faceit_name_from_db()
    if faceit_name:
        if core.does_item_exist("Error##ErrorNoFACEITName"):
            return
        if iChanges == 1:
            set_warning("Configuration not saved, press Apply Configuration")
        else:
            web = webFunctions.get_web()
            if web[0]:
                overlayWeb.open_browser_and_fill_with_content()
            if web[1]:
                overlayWeb.open_browser_and_fill_with_content()
                open_app_overlay(faceit_name)
            if not web[0] and not web[1]:
                open_app_overlay(faceit_name)
    else:
        set_error("No FACEIT Name configured")
Exemplo n.º 5
0
    def _resolve_sender(sender: str) -> Any:
        if dpgcore.does_item_exist(sender):
            if sender in _ITEM_LOOKUP:
                return _ITEM_LOOKUP[sender]

            # warning, this will segfault if sender does not exist!
            sender_type = dpgcore.get_item_type(sender)
            return _create_item_wrapper(sender, sender_type)
Exemplo n.º 6
0
 def create_tab(self, sender, data):
     tab_name = dpg.get_value("NewTabName")
     dpg.delete_item("NewPopup")
     if dpg.does_item_exist("inittext"):
         dpg.delete_item("inittext")
     tab = trackers.Tab(tab_name, "tab_bar_1")
     self.tab_tracker.add_tab(tab)
     page = Page(f"{tab_name}Page", f"tab{tab.id}")
     tab.render(page)
Exemplo n.º 7
0
def create_error_text(error):
    #Delete the current error text if it exists
    if core.does_item_exist("login_error_text"):
        core.delete_item("login_error_text")

    core.add_text("login_error_text",
                  default_value=error,
                  before="login_button",
                  wrap=0)
Exemplo n.º 8
0
    def _render_callback(self, sender, data):
        self._render_update_cnt += 1

        if self._render_update_cnt % 20 == 0:
            self._render_update_cnt = 0
                
            # fields that are most probably always updated
            for pool_name, pool in self._pools.items():
                max_size = str(pool.get_max_size()) if pool.get_max_size() else "inf"
                core.set_value(f"Objects_{pool_name}##total", str(pool.length()) + " / " + max_size)
                core.set_value(f"Objects_{pool_name}##subscribers", str(pool.n_subscriptions()))
                # update table
                if core.does_item_exist(f"Objects_{pool_name}##table"):
                    table_data = self._get_table_data(pool)
                    for entry in table_data:
                        obj_name = entry[0].get_object_name()
                        n_objs = entry[1]
                        btn_name = f"Button_{pool_name}_{obj_name}"
                        if not core.does_item_exist(btn_name):
                            core.add_button(btn_name, label=f"{obj_name} :\t{n_objs}", width=200, parent=f"Objects_{pool_name}##table", callback=self._show_object_details, callback_data=(entry[0], pool_name))
                        else:
                            simple.set_item_label(btn_name, f"{obj_name} :\t{n_objs}")

                # update details window
                for win in self._details_windows:
                    if win.get_pool_name() == pool_name:
                        for obj_id, lst in pool.get_queue().items():
                            if obj_id == win.get_obj_id():
                                win.update(lst[-1])
                                continue
                    win.update_static()
                
            mem_usage_mb = self._pid.memory_info().rss / 1000.0 / 1000.0
            core.set_value("Pools##memory", "{:.2f}".format(mem_usage_mb))
            core.set_value("Pools##cpu", "{:.2f}".format(self._pid.cpu_percent()))

            if not self._ui_dirty:
                return

            # rebuild UI
            self._ui_dirty = False
            self._reset()
            self._build()
Exemplo n.º 9
0
 def cancel_workout(self):
     if core.does_item_exist("example_image"):
         core.delete_item("example_image")
     core.delete_item("buttons")
     core.delete_item("workout_table")
     simple.show_item("workout_composition_group")
     if core.get_value("Results successfully saved"):
         core.delete_item("Results successfully saved")
     if core.get_value("Error happened while saving the result"):
         core.delete_item("Results successfully saved")
Exemplo n.º 10
0
    def run(self):
        """
        Cycle function to update the Overlay every minute
        """
        global start_threading
        while 1:
            refresh_rate = config_functions.get_refresh()
            sleep(refresh_rate)
            try:
                name = sqlite3db.TExecSqlReadMany(
                    DBNAME, """
                                    SELECT name FROM CFG_FACEIT_NAME
                                    """)
                if name:
                    if start_threading == 1:
                        refreshSymbol = config_functions.get_refresh_sign()
                        logging.info("Get stats and refresh them")
                        winLoss = config_functions.get_win_loss()
                        if winLoss[0][0] == "1":
                            mode = 0
                        else:
                            mode = 1
                        if refreshSymbol in "True":
                            core.configure_item("##reload_same_line",
                                                show=True)
                            core.configure_item("##reload_image", show=True)
                        self.iElo, self.acEloToday, self.iRank, \
                        self.acResult, self.acScore, self.acKd, \
                        self.acMap, self.iStreak, self.iMatches, \
                        self.iMatchesWon, self.acEloDiff, self.iKills, \
                        self.iDeath, self.iWin, self.iLoss = faceit_api.get_faceit_data_from_api(mode)
                        core.set_value("elotoday##", f"{self.acEloToday}")
                        core.set_value("streak##", f"{self.iStreak}")
                        core.set_value("map##", f"\t{self.acMap}:")
                        core.set_value("result##", f"{self.acResult}")
                        core.set_value("elo##", f"{self.iElo}")
                        core.set_value("rank##", f"{self.iRank}")
                        core.set_value("score##", f"{self.acScore}")
                        core.set_value("matches##", f"{self.iMatches}")
                        core.set_value("matcheswon##", f"{self.iMatchesWon}")
                        core.set_value("elodiffmap##", f"{self.acEloDiff}")
                        core.set_value("kill##", f"{self.iKills}")
                        core.set_value("death##", f"{self.iDeath}")
                        core.set_value("kd##", f"{self.acKd}")
                        core.set_value("Win/LossperDay##",
                                       f"{self.iWin} / {self.iLoss}")
                        core.set_value("Win/LossperWeek##",
                                       f"{self.iWin} / {self.iLoss}")
                        if core.does_item_exist("##reload_same_line"):
                            core.configure_item("##reload_same_line",
                                                show=False)
                            core.configure_item("##reload_image", show=False)

            except:
                self.run()
Exemplo n.º 11
0
def show_version():
    """Show version of this app.
    """
    window_name = 'Version info##version_info_window'
    if not core.does_item_exist(window_name):
        with simple.window(window_name,
                           on_close=lambda: core.delete_item(window_name),
                           autosize=True,
                           no_resize=True):
            core.add_text('##version_info_0',
                          default_value=f'Password Manager v{VERSION}')
Exemplo n.º 12
0
 def show_example(self, link):
     if core.does_item_exist("example_image"):
         core.delete_item("example_image")
     response = requests.get(link)
     if response.status_code == 200:
         open(EXAMPLE_IMAGE_FILE_PATH, "wb").write(response.content)
         core.add_image(
             "example_image",
             EXAMPLE_IMAGE_FILE_PATH,
             parent="workout_execution_group",
         )
Exemplo n.º 13
0
def delete_error():
    """
    Error handling ; delete
    delete error/warning messages
    call reset_error to set the COL_List back
    """
    item = core.get_all_items()
    for i in item:
        if "Error" in i or "Warning" in i:
            if core.does_item_exist(i):
                reset_error(i)
Exemplo n.º 14
0
 def __restore_tab(self, data):
     try:
         if dpg.does_item_exist("inittext"):
             dpg.delete_item("inittext")
         tab = trackers.Tab(data["pagename"].replace("Page", ""),
                            "tab_bar_1")
         self.tab_tracker.add_tab(tab)
         page = Page(data["pagename"], f"tab{tab.id}", data["path"],
                     data["filename"])
         tab.render(page, data)
     except Exception as e:
         # TODO: Actually do something about this
         raise e
Exemplo n.º 15
0
def try_get_item_by_id(name: str) -> Optional[Widget]:
    """Retrieve an item using its unique name or ``None``.

    Similar to :func:`.get_item_by_id`, but returns ``None`` if the wrapper object could not be retrieved."""
    if not dpgcore.does_item_exist(name):
        return None

    item = _ITEM_LOOKUP.get(name)
    if item is not None:
        return item

    item_type = dpgcore.get_item_type(name) ## WARNING: this will segfault if name does not exist
    return _create_item_wrapper(name, item_type)
Exemplo n.º 16
0
    def __tableRefresh(self):
        if core.does_item_exist("table"):
            core.delete_item("table")

        # build the data model so we can search it
        core.add_table("table", self.__headers, parent="panel")
        search = core.get_value("filter")
        search = re.compile(filter, re.I)
        for row in self.__rows:
            for cell in row:
                if search.search(cell):
                    core.add_row("table", row)
                    break
Exemplo n.º 17
0
def set_warning(warningTxt):
    """
    Warning handling ; set
    add a collapsing_header to display the Warning Message
    """
    if not core.does_item_exist("Warning##Warning"):
        with simple.collapsing_header("Warning##Warning",
                                      parent="##GroupStats",
                                      default_open=True,
                                      closable=False,
                                      bullet=True):
            core.add_text("Warning",
                          default_value=warningTxt,
                          color=(255, 255, 0, 255))
Exemplo n.º 18
0
    def __render(self):
        for x in ["press", "down", "release"]:
            kid = f"{x}-kid"
            if core.does_item_exist(kid):
                core.delete_item(kid)
            with simple.group(kid, parent=x, width=250):
                core.add_text(f'{x}-text', default_value=' ')

        for k, v in self.__keymap.items():
            if v['val'] == 1:
                core.add_text(v['name'], parent="press-kid")
            if v['val'] == 2:
                core.add_text(v['name'], parent="down-kid")
            if v['val'] == 4:
                core.add_text(v['name'], parent="release-kid")
                self.__keymap[k]['val'] = 0
Exemplo n.º 19
0
def window_crud_maintenance(sender, data):
    log_info(f'Function: CRUD Maintenance Window, {sender}, {data}')
    if does_item_exist(f'{data}##window'):
        log_info(f'Already exist {data}##window')
        pass
    else:
        if data == 'Key Values':
            table_headers = ['Key', 'Value', 'Comment']
        elif data == 'Plex Shows':
            table_headers = ['Show Name', 'Show Id', 'Cleaned Show Name']
        elif data == 'Plex Episodes':
            table_headers = [
                'Show Name', 'Season', 'Episode', 'Date Watched',
                'TVM Updated', 'TVM Update Status'
            ]
        else:
            table_headers = ['Unknown']
        with window(name=f'{data}##window',
                    width=2130,
                    height=650,
                    x_pos=5,
                    y_pos=45):
            add_input_text(name=f'{data}_input',
                           no_spaces=True,
                           multiline=False,
                           decimal=False,
                           label=data,
                           width=200)
            add_same_line(spacing=10)
            add_button(name=f'Search##{data}',
                       callback=func_crud_search,
                       callback_data=data)
            if data == 'Key Values' or data == 'Plex Shows':
                add_same_line(spacing=10)
                add_button(name=f"Add New##{data}")
            add_same_line(spacing=10)
            add_button(name=f"Edit##{data}")
            if data == 'Key Values':
                add_same_line(spacing=10)
                add_button(name=f"Delete##{data}")
            add_same_line(spacing=10)
            add_button(name=f"Clear##{data}",
                       callback=func_crud_clear,
                       callback_data=f'Table##{data}')
            add_separator(name=f'##{data}SEP1')
            add_table(name=f'Table##{data}', headers=table_headers)
            add_separator(name=f'##{data}SEP1')
Exemplo n.º 20
0
    def set_rows(self, nrows):
        """ "Set the rows in the table

        Each row has two columns. The first column is the grid number. The second column is a list
        of applications to snap to the grid. We use a table to enable multiselect
        """
        dpg_core.log_info(f"Refreshing rows for table {self.id}")
        for row in range(1, nrows + 1):
            name = f"{self._id}_{row}"
            # If the row already exists, we don't need to do anything else
            if dpg_core.does_item_exist(name):
                continue

            with dpg_simple.managed_columns(name,
                                            len(self.HEADER),
                                            parent=self.parent):
                # The first column is the grid number
                dpg_core.add_input_int(
                    f"##{self._id}_{row}_number",
                    default_value=row,
                    readonly=True,
                    step=0,
                    parent=name,
                )

                # The second column is the table. Wrap in a collapsing header so the screen isn't
                # too full the entire time.
                with dpg_simple.collapsing_header(f"##{self._id}_{row}_header",
                                                  parent=name):
                    dpg_core.add_table(
                        f"{self._id}_{row}_table",
                        [""],  # no headers
                        callback=self.selected,
                        parent=f"##{self._id}_{row}_header",
                    )
                    # populate the table with the names of available windows
                    for window_name in sorted(self.ACTIVE_WINDOWS):
                        dpg_core.add_row(f"{self._id}_{row}_table",
                                         [window_name])

            # Separate each row with a line
            dpg_core.add_separator(name=f"{self._id}_{row}_sep", parent=name)

        self._nrows = nrows
        dpg_core.log_info(f"Refreshed rows for table {self.id}")
Exemplo n.º 21
0
def set_error(errTxt):
    """
    Error handling ; set
    set the defined Button to Red
    add a collapsing_header to display the Error Message
    """
    core.set_item_color("Start", mvGuiCol_Button, (255, 0, 0, 255))
    core.set_item_color("Start", mvGuiCol_ButtonActive, (255, 0, 0, 255))
    core.set_item_color("Start", mvGuiCol_ButtonHovered, (255, 0, 0, 255))
    if not core.does_item_exist("Error##ErrorNoFACEITName"):
        with simple.collapsing_header("Error##ErrorNoFACEITName",
                                      parent="##GroupStats",
                                      default_open=True,
                                      closable=False,
                                      bullet=True):
            core.add_text("ErrorText",
                          default_value=errTxt,
                          color=(255, 0, 0, 255))
Exemplo n.º 22
0
def get_item_by_id(name: str) -> Widget:
    """Retrieve an item using its unique name.

    If the item was created by instantiating a :class:`.Widget` object, this will return that
    object. Otherwise, a new wrapper object will be created for that item and returned. Future calls
    for the same ID will return the same object.

    Raises:
        KeyError: if name refers to an item that is invalid (deleted) or does not exist.
    """
    if not dpgcore.does_item_exist(name):
        raise KeyError(f"'{name}' item does not exist")

    item = _ITEM_LOOKUP.get(name)
    if item is not None:
        return item

    item_type = dpgcore.get_item_type(name) ## WARNING: this will segfault if name does not exist
    return _create_item_wrapper(name, item_type)
Exemplo n.º 23
0
def edit_request():
    #Get info from login input
    login_key = core.get_value("key_input")

    #Check login key
    login_attempt = console_client.client.save_auth_token(login_key)

    #Delete the current error text if it exists
    if core.does_item_exist("key_error_text"):
        core.delete_item("key_error_text")

    #If the login succeeded
    if login_attempt.success:
        #Add success text
        core.add_text("key_error_text",
                      default_value="Key successfully changed :)",
                      before="edit_button",
                      wrap=0)

        #Change token display
        core.delete_item("token_display")
        core.add_text("token_display",
                      default_value="Current token: {}...".format(
                          console_client.client.auth_token[:10]),
                      before="key_input")

    #If login key failed, say something
    else:
        #Setup error text
        error_text = "There was an error checking your key!"

        if login_attempt.message == "file_editing":
            error_text = "There was an error editing the key file on disk"

        if login_attempt.message == "non_key":
            error_text = "The key you entered wasn't a key..."

        #Finally, add error
        core.add_text("key_error_text",
                      default_value=error_text,
                      before="edit_button",
                      wrap=0)
Exemplo n.º 24
0
def create_widget():
    #If this widget exists, kill it
    if core.does_item_exist("edit_token"):
        core.delete_item("edit_token")

    #Create widget
    with simple.window("edit_token"):
        core.add_text("Use dis to edit token")
        core.add_text("token_display",
                      default_value="Current token: {}...".format(
                          console_client.client.auth_token[:10]))

        core.add_input_text("key_input",
                            hint="auth key",
                            password=True,
                            label="")
        core.add_text("key_error_text",
                      default_value=" ",
                      before="edit_button")

        core.add_button("edit_button", label="Edit", callback=edit_request)
Exemplo n.º 25
0
 def remove(self):
     if dpg.does_item_exist(self.group):
         dpg.delete_item(self.group)
Exemplo n.º 26
0
def items_remover(items):
    for item in items:
        if(core.does_item_exist(item) == True):
            core.delete_item(item)
Exemplo n.º 27
0
 def remove(self):
     """
     Remove the Category object from the screen
     """
     if dpg.does_item_exist(self.group):
         dpg.delete_item(self.group)
Exemplo n.º 28
0
 def is_valid(self) -> bool:
     """This property is ``False`` if the GUI item has been deleted."""
     return dpgcore.does_item_exist(self.id)
Exemplo n.º 29
0
def encrypt(sender, data):
    pt = str(core.get_value("Input"))
    core.configure_item("Cannot Decrypt with plaintext", show=False)
    core.configure_item("Input must be < 128 bits and key must be 64 bits", show=False)
    # selected plain text
    if (core.get_value("RadioButton##widget") == 1):
        pt = pt.encode().hex()
    # padding
    if len(pt) > 16:
        while len(pt) < 32:
            pt += "0"
        pt2 = pt[16:32]
        pt = pt[:16]
    else:
        while len(pt) < 16:
            pt += "0"
    key = str(core.get_value("Key"))
    # selected plain text
    if (core.get_value("RadioButton##widget1") == 1):
        key = key.encode().hex()
    # padding
    while len(key) < 16:
        key += "0"
    if not check_inputs(key, pt):
        core.configure_item("Input must be < 128 bits and key must be 64 bits", show=True)
        return
    if "pt2" in locals():
        if not check_inputs(key, pt2):
            core.configure_item("Input must be < 128 bits and key must be 64 bits", show=True)
            return
    window_name = "Encryption"
    other_window_name = "Decryption"
    window_name2 = "Encryption2"
    other_window_name2 = "Decryption2"
    if core.does_item_exist(window_name):
        core.delete_item(window_name)
    if core.does_item_exist(window_name2):
        core.delete_item(window_name2)
    if core.does_item_exist(other_window_name):
        core.delete_item(other_window_name)
    if core.does_item_exist(other_window_name2):
        core.delete_item(other_window_name2)
    key, left, right = get_initial_values(key)
    rk, rkb = get_rk_rkb(left, right)
    perm_str, round_str, cipher_text = des.encrypt(pt, rkb, rk)
    with simple.window(window_name, width=450, height=360, x_pos=351, y_pos=0):
        core.add_text(perm_str)
        core.add_text("Round #    Left     Right")
        for i in range(len(round_str)):
            core.add_text(round_str[i])
        core.add_text("Cipher Text (after final permuation): " + cipher_text)
    if "pt2" in locals():
        perm_str2, round_str2, cipher_text2 = des.encrypt(pt2, rkb, rk)
        combined_cipher_text = cipher_text + cipher_text2 
        with simple.window(window_name2, width=460, height=375, x_pos=801, y_pos=0):
            core.add_text(perm_str2)
            core.add_text("Round #    Left     Right")
            for i in range(len(round_str2)):
                core.add_text(round_str2[i])
            core.add_text("Cipher Text2 (after final permuation): " + cipher_text2)  
            core.add_text("Combined Cipher Text: " + combined_cipher_text)  
Exemplo n.º 30
0
def decrypt(sender, data):
    core.configure_item("Cannot Decrypt with plaintext", show=False)
    core.configure_item("Input must be < 128 bits and key must be 64 bits", show=False)
    cipher_text = str(core.get_value("Input"))
    if (core.get_value("RadioButton##widget") == 1):
        core.configure_item("Cannot Decrypt with plaintext", show=True)
        return
    # padding
    if len(cipher_text) > 16:
        while len(cipher_text) < 32:
            cipher_text += "0"
        cipher_text2 = cipher_text[16:32]
        cipher_text = cipher_text[:16]
    else:
        while len(cipher_text) < 16:
            cipher_text += "0"
    key = str(core.get_value("Key"))
    # selected plain text
    if (core.get_value("RadioButton##widget1") == 1):
        key = key.encode().hex()
    # padding
    while len(key) < 16:
        key += "0"
    if not check_inputs(key, cipher_text):
        core.configure_item("Input must be < 128 bits and key must be 64 bits", show=True)
        return
    if "cipher_text2" in locals():
        if not check_inputs(key, cipher_text2):
            core.configure_item("Input must be < 128 bits and key must be 64 bits", show=True)
            return
    window_name = "Decryption"
    other_window_name = "Encryption"
    if core.does_item_exist(window_name):
        core.delete_item(window_name)
    if core.does_item_exist(other_window_name):
        core.delete_item(other_window_name)
    window_name2 = "Decryption2"
    other_window_name2 = "Encryption2"
    if core.does_item_exist(window_name2):
        core.delete_item(window_name2)
    if core.does_item_exist(other_window_name2):
        core.delete_item(other_window_name2)
    key, left, right = get_initial_values(key)
    rk, rkb = get_rk_rkb(left, right)
    rkb_rev = rkb[::-1]
    rk_rev = rk[::-1]
    perm_str, round_str, text = des.encrypt(cipher_text, rkb_rev, rk_rev)
    with simple.window(window_name, width=450, height=380, x_pos=351, y_pos=0):
        core.add_text(perm_str)
        core.add_text("Round #    Left     Right")
        for i in range(len(round_str)):
            core.add_text(round_str[i])
        core.add_text("Plain Text in hex (after final permuation): " + text)
        plaintext = bytes.fromhex(text.lower()).decode('utf-8', "replace")
        core.add_text("Plain Text in clear text (after final permuation): " + plaintext)
    if "cipher_text2" in locals():
        perm_str2, round_str2, text2 = des.encrypt(cipher_text2, rkb_rev, rk_rev)
        with simple.window(window_name2, width=450, height=390, x_pos=801, y_pos=0):
            core.add_text(perm_str2)
            core.add_text("Round #    Left     Right")
            for i in range(len(round_str2)):
                core.add_text(round_str2[i])
            core.add_text("Plain Text2 in hex (after final permuation): " + text2)
            plaintext2 = bytes.fromhex(text2.lower()).decode('utf-8', "replace")
            core.add_text("Plain Text2 in clear text (after final permuation): " + plaintext2)
            core.add_text("Combined Plain Text: " + plaintext + plaintext2)