 BYTE N CRYPT, crafted by Cyber Cipherers, is a versatile Cyber Security Toolkit. It offers IP lookup, password management, encryption/decryption, password generation, strength checking, and a community chat for cybersecurity discussions.
import sys
import os
from PyQt5.QtWidgets import (
    QApplication,
    QMainWindow,
    QWidget,
    QVBoxLayout,
    QHBoxLayout,
    QLabel,
    QLineEdit,
    QPushButton,
    QTextEdit,
    QFileDialog,
    QMessageBox,
)
from PyQt5.QtGui import QFont, QColor, QPalette
from PyQt5.QtCore import Qt


class EncryptionDecryptionApp(QMainWindow):
    def __init__(self):
        super().__init__()

        self.setWindowTitle("Encryption and Decryption")
        self.setGeometry(200, 200, 600, 400)

        self.central_widget = QWidget(self)
        self.setCentralWidget(self.central_widget)

        self.layout = QVBoxLayout()
        self.central_widget.setLayout(self.layout)

        self.title_label = QLabel("Encryption and Decryption", self)
        self.title_label.setStyleSheet("font-size: 24px; font-weight: bold; margin-bottom: 20px;")
        self.layout.addWidget(self.title_label, alignment=Qt.AlignCenter)

        self.selection_layout = QHBoxLayout()
        self.layout.addLayout(self.selection_layout)

        self.encryption_button = QPushButton("Encryption", self)
        self.encryption_button.setStyleSheet(
            """
            QPushButton {
                font-size: 16px;
                padding: 10px 20px;
                background-color: #6ac5fe;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #42a5f5;
            }
            """
        )
        self.encryption_button.clicked.connect(self.select_encryption)
        self.selection_layout.addWidget(self.encryption_button)

        self.decryption_button = QPushButton("Decryption", self)
        self.decryption_button.setStyleSheet(
            """
            QPushButton {
                font-size: 16px;
                padding: 10px 20px;
                background-color: #6ac5fe;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #42a5f5;
            }
            """
        )
        self.decryption_button.clicked.connect(self.select_decryption)
        self.selection_layout.addWidget(self.decryption_button)

        self.selected_file = ""
        self.current_page = None

        self.set_palette()

    def set_palette(self):
        palette = QPalette()
        palette.setColor(QPalette.Window, QColor(240, 240, 240))
        palette.setColor(QPalette.Button, QColor(200, 200, 200))
        palette.setColor(QPalette.ButtonText, QColor(40, 40, 40))
        palette.setColor(QPalette.Base, QColor(255, 255, 255))
        palette.setColor(QPalette.Text, QColor(40, 40, 40))
        self.setPalette(palette)

    def select_encryption(self):
        self.clear_layout()
        self.create_encryption_window()

    def select_decryption(self):
        self.clear_layout()
        self.create_decryption_window()

    def create_encryption_window(self):
        self.current_page = "Encryption"

        self.file_layout = QHBoxLayout()
        self.layout.addLayout(self.file_layout)

        self.file_label = QLabel("File:", self)
        self.file_label.setStyleSheet("font-size: 14px; font-weight: bold;")
        self.file_layout.addWidget(self.file_label)

        self.file_entry = QLineEdit(self)
        self.file_entry.setReadOnly(True)
        self.file_layout.addWidget(self.file_entry)

        self.browse_button = QPushButton("Browse", self)
        self.browse_button.setStyleSheet(
            """
            QPushButton {
                font-size: 12px;
                padding: 5px 10px;
                background-color: #42a5f5;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #2196f3;
            }
            """
        )
        self.browse_button.clicked.connect(self.browse_file)
        self.file_layout.addWidget(self.browse_button)

        self.encryption_key_label = QLabel("Encryption Key:", self)
        self.encryption_key_label.setStyleSheet("font-size: 14px; font-weight: bold; margin-top: 20px;")
        self.layout.addWidget(self.encryption_key_label)

        self.encryption_key_text = QTextEdit(self)
        self.encryption_key_text.setReadOnly(True)
        self.layout.addWidget(self.encryption_key_text)

        self.generate_key_button = QPushButton("Generate Encryption Key", self)
        self.generate_key_button.setStyleSheet(
            """
            QPushButton {
                font-size: 12px;
                padding: 5px 10px;
                background-color: #42a5f5;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #2196f3;
            }
            """
        )
        self.generate_key_button.clicked.connect(self.generate_encryption_key)
        self.layout.addWidget(self.generate_key_button)

        self.encrypt_button = QPushButton("Encrypt", self)
        self.encrypt_button.setStyleSheet(
            """
            QPushButton {
                font-size: 14px;
                padding: 10px 20px;
                background-color: #4caf50;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #43a047;
            }
            """
        )
        self.encrypt_button.clicked.connect(self.encrypt_file)
        self.layout.addWidget(self.encrypt_button)

        self.back_button = QPushButton("Back", self)
        self.back_button.setStyleSheet(
            """
            QPushButton {
                font-size: 14px;
                padding: 10px 20px;
                background-color: #f44336;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #e53935;
            }
            """
        )
        self.back_button.clicked.connect(self.go_to_main_page)
        self.layout.addWidget(self.back_button)

    def create_decryption_window(self):
        self.current_page = "Decryption"

        self.file_layout = QHBoxLayout()
        self.layout.addLayout(self.file_layout)

        self.file_label = QLabel("File:", self)
        self.file_label.setStyleSheet("font-size: 14px; font-weight: bold;")
        self.file_layout.addWidget(self.file_label)

        self.file_entry = QLineEdit(self)
        self.file_entry.setReadOnly(True)
        self.file_layout.addWidget(self.file_entry)

        self.browse_button = QPushButton("Browse", self)
        self.browse_button.setStyleSheet(
            """
            QPushButton {
                font-size: 12px;
                padding: 5px 10px;
                background-color: #42a5f5;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #2196f3;
            }
            """
        )
        self.browse_button.clicked.connect(self.browse_file)
        self.file_layout.addWidget(self.browse_button)

        self.decryption_key_label = QLabel("Decryption Key:", self)
        self.decryption_key_label.setStyleSheet("font-size: 14px; font-weight: bold; margin-top: 20px;")
        self.layout.addWidget(self.decryption_key_label)

        self.decryption_key_text = QTextEdit(self)
        self.layout.addWidget(self.decryption_key_text)

        self.decrypt_button = QPushButton("Decrypt", self)
        self.decrypt_button.setStyleSheet(
            """
            QPushButton {
                font-size: 14px;
                padding: 10px 20px;
                background-color: #f44336;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #e53935;
            }
            """
        )
        self.decrypt_button.clicked.connect(self.decrypt_file)
        self.layout.addWidget(self.decrypt_button)

        self.back_button = QPushButton("Back", self)
        self.back_button.setStyleSheet(
            """
            QPushButton {
                font-size: 14px;
                padding: 10px 20px;
                background-color: #f44336;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #e53935;
            }
            """
        )
        self.back_button.clicked.connect(self.go_to_main_page)
        self.layout.addWidget(self.back_button)

    def browse_file(self):
        file_path, _ = QFileDialog.getOpenFileName(self, "Select File", "", "All Files (*.*)")
        if file_path:
            self.selected_file = file_path
            self.file_entry.setText(self.selected_file)

    def generate_encryption_key(self):
        encryption_key = os.urandom(16).hex()
        self.encryption_key_text.setText(encryption_key)

    def encrypt_file(self):
        file_path = self.selected_file
        encryption_key = self.encryption_key_text.toPlainText().strip()

        if file_path and encryption_key:
            try:
                with open(file_path, "rb+") as file:
                    original_data = file.read()

                    encrypted_data = self.xor_encrypt_decrypt(original_data, encryption_key)

                    # Go back to the beginning of the file
                    file.seek(0)
                    file.write(encrypted_data)

                    # Truncate the file to the size of the encrypted data
                    file.truncate(len(encrypted_data))

                QMessageBox.information(self, "Encryption Successful", "File encrypted successfully.")
            except Exception as e:
                QMessageBox.critical(self, "Encryption Error", f"Failed to encrypt file: {e}")
        else:
            QMessageBox.warning(self, "Missing Information", "Please enter the file path and encryption key.")

    def decrypt_file(self):
        file_path = self.selected_file
        decryption_key = self.decryption_key_text.toPlainText().strip()

        if file_path and decryption_key:
            try:
                with open(file_path, "rb+") as file:
                    encrypted_data = file.read()

                    decrypted_data = self.xor_encrypt_decrypt(encrypted_data, decryption_key)

                    # Go back to the beginning of the file
                    file.seek(0)
                    file.write(decrypted_data)

                    # Truncate the file to the size of the decrypted data
                    file.truncate(len(decrypted_data))

                QMessageBox.information(self, "Decryption Successful", "File decrypted successfully.")
            except Exception as e:
                QMessageBox.critical(self, "Decryption Error", f"Failed to decrypt file: {e}")
        else:
            QMessageBox.warning(self, "Missing Information", "Please enter the file path and decryption key.")

    def xor_encrypt_decrypt(self, data, key):
        key_length = len(key)
        key_stream = [ord(key[i % key_length]) for i in range(len(data))]
        return bytes([data[i] ^ key_stream[i] for i in range(len(data))])

    def go_to_main_page(self):
        self.clear_layout()
        self.create_main_page()

    def create_main_page(self):
        self.current_page = None

        self.title_label = QLabel("Encryption and Decryption", self)
        self.title_label.setStyleSheet("font-size: 24px; font-weight: bold; margin-bottom: 20px;")
        self.layout.addWidget(self.title_label, alignment=Qt.AlignCenter)

        self.selection_layout = QHBoxLayout()
        self.layout.addLayout(self.selection_layout)

        self.encryption_button = QPushButton("Encryption", self)
        self.encryption_button.setStyleSheet(
            """
            QPushButton {
                font-size: 16px;
                padding: 10px 20px;
                background-color: #6ac5fe;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #42a5f5;
            }
            """
        )
        self.encryption_button.clicked.connect(self.select_encryption)
        self.selection_layout.addWidget(self.encryption_button)

        self.decryption_button = QPushButton("Decryption", self)
        self.decryption_button.setStyleSheet(
            """
            QPushButton {
                font-size: 16px;
                padding: 10px 20px;
                background-color: #6ac5fe;
                color: white;
                border: none;
                border-radius: 4px;
            }
            QPushButton:hover {
                background-color: #42a5f5;
            }
            """
        )
        self.decryption_button.clicked.connect(self.select_decryption)
        self.selection_layout.addWidget(self.decryption_button)

    def clear_layout(self):
        while self.layout.count():
            child = self.layout.takeAt(0)
            if child.widget():
                child.widget().deleteLater()


if __name__ == "__main__":
    app = QApplication(sys.argv)

    # Set the font globally for the application
    font = QFont("Arial", 12)
    app.setFont(font)

    window = EncryptionDecryptionApp()
    window.show()
    sys.exit(app.exec_())

encry_decry.py
HackStyx/Byte-N-Crypt
import sys
import requests
from PyQt5.QtWidgets import QApplication, QLabel, QLineEdit, QVBoxLayout, QWidget, QMessageBox, QScrollArea, QHBoxLayout, QPushButton
from PyQt5.QtGui import QFont, QIcon, QColor, QPalette
from PyQt5.QtCore import Qt


class IPLookupTool(QWidget):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("IP Lookup Tool")
        self.setWindowIcon(QIcon("icon.png"))  # Add an icon for the window
        self.layout = QVBoxLayout()
        self.init_ui()

    def init_ui(self):
        self.ip_label = QLabel("Enter IP Address:")
        self.ip_label.setFont(QFont("Arial", 12))
        self.ip_label.setAlignment(Qt.AlignCenter)

        self.ip_input = QLineEdit()
        self.ip_input.setFont(QFont("Arial", 12))
        self.ip_input.setAlignment(Qt.AlignCenter)
        self.ip_input.setPlaceholderText("Enter an IP address")

        # Styling the text box
        palette = self.ip_input.palette()
        palette.setColor(QPalette.Base, QColor("#FFFFFF"))  # Set background color
        palette.setColor(QPalette.Text, QColor("#000000"))  # Set text color
        palette.setColor(QPalette.PlaceholderText, QColor("#AAAAAA"))  # Set placeholder text color
        self.ip_input.setPalette(palette)
        self.ip_input.setStyleSheet(
            "QLineEdit { border: 1px solid #999999; border-radius: 5px; padding: 8px; }"
        )

        self.result_label = QLabel()
        self.result_label.setWordWrap(True)
        self.result_label.setFont(QFont("Arial", 12))
        self.result_label.setAlignment(Qt.AlignCenter)

        self.lookup_button_layout = QHBoxLayout()
        self.lookup_button_layout.setAlignment(Qt.AlignCenter)

        self.lookup_button = QPushButton("Lookup")
        self.lookup_button.setFont(QFont("Arial", 12))
        self.lookup_button.setStyleSheet(
            "QPushButton { background-color: #4CAF50; color: white; border-radius: 5px; padding: 10px; min-width: 100px; }"
            "QPushButton:hover { background-color: #45a049; }"
        )
        self.lookup_button.clicked.connect(self.lookup_ip)

        self.lookup_button_layout.addWidget(self.lookup_button)

        self.layout.addWidget(self.ip_label)
        self.layout.addWidget(self.ip_input)
        self.layout.addLayout(self.lookup_button_layout)
        self.layout.addWidget(self.result_label)

        widget = QWidget()
        widget.setLayout(self.layout)
        scroll_area = QScrollArea()
        scroll_area.setWidgetResizable(True)
        scroll_area.setWidget(widget)

        self.setWindowFlag(Qt.WindowMinimizeButtonHint)  # Allow minimizing the window
        self.setWindowFlag(Qt.WindowMaximizeButtonHint)  # Allow maximizing the window
        self.resize(600, 400)  # Set the initial size of the window

        main_layout = QVBoxLayout(self)
        main_layout.addWidget(scroll_area)
        main_layout.setAlignment(Qt.AlignCenter)

    def closeEvent(self, event):
        reply = QMessageBox.question(self, 'Confirm Exit', 'Are you sure you want to exit?',
                                     QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
        if reply == QMessageBox.Yes:
            event.accept()
        else:
            event.ignore()

    def lookup_ip(self):
        ip_address = self.ip_input.text()
        if not ip_address:
            ip_address = requests.get('https://api.ipify.org').text  # Get user's own IP address

        try:
            response = requests.get(f"https://ipapi.co/{ip_address}/json/")
            data = response.json()
            if "error" in data:
                QMessageBox.critical(self, "Error", data["reason"])
            else:
                result = f"<b>IP:</b> {data['ip']}<br>" \
                         f"<b>City:</b> {data['city']}<br>" \
                         f"<b>Region:</b> {data['region']}<br>" \
                         f"<b>Country:</b> {data['country_name']}<br>" \
                         f"<b>Postal Code:</b> {data['postal']}<br>" \
                         f"<b>Latitude:</b> {data['latitude']}<br>" \
                         f"<b>Longitude:</b> {data['longitude']}<br>" \
                         f"<b>Service Provider:</b> {data['org']}<br>"  # Add service provider details
                self.result_label.setText(result)
        except requests.exceptions.RequestException:
            QMessageBox.critical(self, "Error", "An error occurred while fetching IP details.")


if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = IPLookupTool()
    window.setStyleSheet(
        "background-color: #F2F2F2;"
        "QPushButton { font-size: 14px; }"
        "QLineEdit { padding: 8px; border-radius: 5px; border: 1px solid #ccc; }"
    )
    window.show()
    sys.exit(app.exec_())

ip_lookup_latest.py
HackStyx/Byte-N-Crypt
import sys
import subprocess
import time
from PyQt5.QtWidgets import QApplication, QMainWindow, QSplashScreen, QWidget, QPushButton, QTextEdit, QVBoxLayout, QMessageBox, QGridLayout, QLabel
from PyQt5.QtGui import QFont, QPixmap, QPalette, QImage, QBrush
from PyQt5.QtCore import Qt, QTimer

class AnimationWindow:
    def __init__(self):
        self.app = QApplication(sys.argv)
        
        splash_pixmap = QPixmap(r"loading screen2.jpg")
        self.splash = QSplashScreen(splash_pixmap, Qt.WindowStaysOnTopHint)
        self.splash.setMask(splash_pixmap.mask())
        self.splash.show()

        # Simulate a loading delay (you can replace this with your actual loading process)
        QTimer.singleShot(1691, self.load_main_window)
        
        
    def load_main_window(self):
        self.splash.hide()
        
        self.window = QMainWindow()
        self.window.setWindowTitle("BYTE N CRYPT")
        self.window.setGeometry(100, 100, 1800, 1200)
      

        # Load your custom background image here
        background_image = QImage(r"homepage.png")
        background_image = background_image.scaled(1950, 1000)  # Scale to match window size
        palette = QPalette()
        palette.setBrush(QPalette.Background, QBrush(background_image))
        self.window.setPalette(palette)

        self.central_widget = QWidget()
        self.window.setCentralWidget(self.central_widget)

        self.create_main_window()

    def create_main_window(self):
        layout = QVBoxLayout()

        grid_layout = QGridLayout()
        community_post_button = QPushButton("Community Post")
        community_post_button.setFont(QFont("Arial", 18))
        community_post_button.clicked.connect(self.open_community_post)
        community_post_button.setStyleSheet("background-color: rgba(0, 0, 0, 0); color: white; border: 2px solid white; padding: 10px; text-align: center;")
        community_post_button.setCursor(Qt.PointingHandCursor)  
        community_post_button.setObjectName("community_button")
        grid_layout.addWidget(community_post_button, 0, 0, 1, 1, Qt.AlignRight)

        toolkit_button = QPushButton("Toolkit")
        toolkit_button.setFont(QFont("Arial", 18))
        toolkit_button.clicked.connect(self.open_toolkit)
        toolkit_button.setStyleSheet("background-color: rgba(0, 0, 0, 0); color: white; border: 2px solid white; padding: 10px; text-align: center;")
        toolkit_button.setCursor(Qt.PointingHandCursor)  # Change cursor on hover
        toolkit_button.setObjectName("toolkit_button")
        grid_layout.addWidget(toolkit_button, 1, 0, 1, 1, Qt.AlignRight)
        grid_layout.setSpacing(40)
        
        

        layout.addLayout(grid_layout)
        self.central_widget.setLayout(layout)
        
    
        self.window.closeEvent = self.confirm_quit
        
        self.window.show()
        
    def confirm_quit(self, event):
        confirm = QMessageBox.question(self.window, 'Exit Confirmation', 'Are you sure you want to quit?',
                                       QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
        if confirm == QMessageBox.Yes:
            event.accept()
        else:
            event.ignore()



    def open_community_post(self):
        self.community_post_window = QMainWindow()
        self.community_post_window.setWindowTitle("Community Post(beta)")
        self.community_post_window.setGeometry(100, 100, 400, 300)

        central_widget = QWidget()
        self.community_post_window.setCentralWidget(central_widget)

        layout = QVBoxLayout()

        name_entry = QTextEdit()
        layout.addWidget(name_entry)

        post_text = QTextEdit()
        layout.addWidget(post_text)

        create_button = QPushButton("Create Post")
        create_button.clicked.connect(self.create_post)
        layout.addWidget(create_button)

        read_button = QPushButton("Read Post")
        read_button.clicked.connect(self.read_post)
        layout.addWidget(read_button)

        clear_button = QPushButton("Clear Fields")
        clear_button.clicked.connect(self.clear_fields)
        layout.addWidget(clear_button)

        central_widget.setLayout(layout)

        self.community_post_window.show()

    def create_post(self):
        name = self.name_entry.toPlainText()  # Use toPlainText() to get text
        post = self.post_text.toPlainText()
        if name and post:
            self.save_post(name, post)
            QMessageBox.information(self.community_post_window, "Success", "Post created and saved successfully.")
            self.clear_fields()
        else:
            QMessageBox.critical(self.community_post_window, "Error", "Please enter both name and post.")

    def save_post(self, name, post):
        file_path = "community_posts.txt"
        with open(file_path, "a") as file:
            file.write(f"Name: {name}\n")
            file.write(f"Post: {post}\n\n")

    def read_post(self):
        file_path = "community_posts.txt"
        with open(file_path, "r") as file:
            self.post_text.setPlainText(file.read())  # Set text using setPlainText

    def clear_fields(self):
        self.name_entry.clear()
        self.post_text.clear()

    def open_toolkit(self):
        self.toolkit_window = QMainWindow()
        self.toolkit_window.setWindowTitle("Toolkit")
        self.toolkit_window.setGeometry(100, 100, 600, 400)
        
        background_image = QPixmap(r"toolkit back.jpg")
        background_image = background_image.scaled(1900, 900)
        palette = QPalette()
        palette.setBrush(QPalette.Background, QBrush(background_image))
        self.toolkit_window.setPalette(palette)
        
        central_widget = QWidget()
        self.toolkit_window.setCentralWidget(central_widget)

        layout = QVBoxLayout()
        layout.setAlignment(Qt.AlignCenter)

        password_manager_button = QPushButton("Password Manager")
        password_manager_button.setFont(QFont("Arial", 14))
        password_manager_button.clicked.connect(self.password_manager)
        password_manager_button.setStyleSheet("background-color: #5733FF; color: white; border: none; padding: 10px; text-align: center;")
        password_manager_button.setCursor(Qt.PointingHandCursor)  # Change cursor on hover
        password_manager_button.setObjectName("Password Manager")
        layout.addWidget(password_manager_button)

        password_generator_button = QPushButton("Password Generator")
        password_generator_button.setFont(QFont("Arial", 14))
        password_generator_button.clicked.connect(self.password_generator)
        password_generator_button.setStyleSheet("background-color: #5733FF; color: white; border: none; padding: 10px; text-align: center;")
        password_generator_button.setCursor(Qt.PointingHandCursor)  # Change cursor on hover
        password_generator_button.setObjectName("Password Generator")
        layout.addWidget(password_generator_button)

        password_strength_checker_button = QPushButton("Password Strength Checker")
        password_strength_checker_button.setFont(QFont("Arial", 14))
        password_strength_checker_button.clicked.connect(self.password_strength_checker)
        password_strength_checker_button.setStyleSheet("background-color: #5733FF; color: white; border: none; padding: 10px; text-align: center;")
        password_strength_checker_button.setCursor(Qt.PointingHandCursor)  # Change cursor on hover
        password_strength_checker_button.setObjectName("Password Strength Checker")
        layout.addWidget(password_strength_checker_button)

        ip_lookup_button = QPushButton("IP Lookup")
        ip_lookup_button.setFont(QFont("Arial", 14))
        ip_lookup_button.clicked.connect(self.ip_look)
        ip_lookup_button.setStyleSheet("background-color: #5733FF; color: white; border: none; padding: 10px; text-align: center;")
        ip_lookup_button.setCursor(Qt.PointingHandCursor)  # Change cursor on hover
        ip_lookup_button.setObjectName("IP Lookup")
        layout.addWidget(ip_lookup_button)

        encryption_decryption_button = QPushButton("Encryption/Decryption")
        encryption_decryption_button.setFont(QFont("Arial", 14))
        encryption_decryption_button.clicked.connect(self.encryption_decryption)
        encryption_decryption_button.setStyleSheet("background-color: #5733FF; color: white; border: none; padding: 10px; text-align: center;")
        encryption_decryption_button.setCursor(Qt.PointingHandCursor)  # Change cursor on hover
        encryption_decryption_button.setObjectName("Encryption/Decryption")
        layout.addWidget(encryption_decryption_button)

        back_button = QPushButton("Back")
        back_button.setFont(QFont("Arial", 14))
        back_button.clicked.connect(self.toolkit_window.close)
        back_button.setStyleSheet("background-color: #000000; color: white; border: none; padding: 10px; text-align: center;")
        back_button.setCursor(Qt.PointingHandCursor)  # Change cursor on hover
        back_button.setObjectName("Back")
        layout.addWidget(back_button)

        central_widget.setLayout(layout)
        

        self.toolkit_window.show()

    def password_manager(self):
        subprocess.Popen(["python", r"password_manager.py"])

    def password_generator(self):
        subprocess.Popen(["python", r"password_generator"])

    def password_strength_checker(self):
        subprocess.Popen(["python", r"password_strength.py"])

    def ip_look(self):
        subprocess.Popen(["python", r"ip_lookup_latest.py"])

    def encryption_decryption(self):
        subprocess.Popen(["python", r"encry_decry.py"])

    def run(self):
        sys.exit(self.app.exec_())
        

if __name__ == "__main__":
    app = AnimationWindow()
    app.run()


main.py
HackStyx/Byte-N-Crypt
import sys
import random
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QPushButton, QLineEdit, QMessageBox, QCheckBox, QVBoxLayout, QHBoxLayout, QWidget
from PyQt5.QtGui import QFont
from PyQt5.QtCore import Qt


class PasswordGenerator(QMainWindow):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("Password Generator")
        self.setGeometry(100, 100, 400, 300)

        # Create the central widget and layout
        self.central_widget = QWidget(self)
        self.setCentralWidget(self.central_widget)
        self.layout = QVBoxLayout(self.central_widget)
        self.layout.setAlignment(Qt.AlignCenter)

        # Create the length label and entry field
        self.length_label = QLabel("Password Length:", self)
        self.length_label.setFont(QFont("Arial", 10, QFont.Bold))
        self.layout.addWidget(self.length_label)
        self.length_entry = QLineEdit(self)

        # Create the options checkboxes
        self.uppercase_checkbox = QCheckBox("Include Uppercase Letters", self)
        self.lowercase_checkbox = QCheckBox("Include Lowercase Letters", self)
        self.digits_checkbox = QCheckBox("Include Digits", self)
        self.special_chars_checkbox = QCheckBox("Include Special Characters", self)

        # Create the generate button
        self.generate_button = QPushButton("Generate Password", self)
        self.generate_button.clicked.connect(self.generate_password)
        self.generate_button.setStyleSheet("background-color: #4CAF50; color: white;")

        # Create the password label and entry field
        self.password_label = QLabel("Generated Password:", self)
        self.password_entry = QLineEdit(self)
        self.password_entry.setEchoMode(QLineEdit.Password)
        self.password_entry.setStyleSheet("background-color: #F0F0F0;")

        # Create the save and view buttons
        self.save_button = QPushButton("Save Password", self)
        self.save_button.clicked.connect(self.save_password)
        self.save_button.setStyleSheet("background-color: #2196F3; color: white;")
        self.view_button = QPushButton("View Password", self)
        self.view_button.clicked.connect(self.view_password)
        self.view_button.setStyleSheet("background-color: #9C27B0; color: white;")

        # Create a horizontal layout for the buttons
        button_layout = QHBoxLayout()
        button_layout.addWidget(self.save_button)
        button_layout.addWidget(self.view_button)

        # Add widgets to the main layout
        self.layout.addWidget(self.length_entry)
        self.layout.addWidget(self.uppercase_checkbox)
        self.layout.addWidget(self.lowercase_checkbox)
        self.layout.addWidget(self.digits_checkbox)
        self.layout.addWidget(self.special_chars_checkbox)
        self.layout.addWidget(self.generate_button)
        self.layout.addWidget(self.password_label)
        self.layout.addWidget(self.password_entry)
        self.layout.addLayout(button_layout)

        # Set the main layout for the central widget
        self.central_widget.setLayout(self.layout)

    def closeEvent(self, event):
        reply = QMessageBox.question(self, "Quit", "Are you sure you want to quit?", QMessageBox.Yes | QMessageBox.No, QMessageBox.No)
        if reply == QMessageBox.Yes:
            event.accept()
        else:
            event.ignore()

    def generate_password(self):
        length_text = self.length_entry.text()

        if not length_text.isdigit():
            QMessageBox.warning(self, "Warning", "Password length should be a valid positive integer.")
            return

        length = int(length_text)

        if length <= 0:
            QMessageBox.warning(self, "Warning", "Password length should be greater than 0.")
            return

        use_uppercase = self.uppercase_checkbox.isChecked()
        use_lowercase = self.lowercase_checkbox.isChecked()
        use_digits = self.digits_checkbox.isChecked()
        use_special_chars = self.special_chars_checkbox.isChecked()

        characters = ""
        if use_uppercase:
            characters += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
        if use_lowercase:
            characters += "abcdefghijklmnopqrstuvwxyz"
        if use_digits:
            characters += "0123456789"
        if use_special_chars:
            characters += "!@#$%^&*()_+=-{}[]|:;<>,.?/~"

        if not characters:
            QMessageBox.warning(self, "Warning", "Please select at least one character type.")
            return

        password = "".join(random.choice(characters) for _ in range(length))

        self.password_entry.setText(password)

    def save_password(self):
        password = self.password_entry.text()

        if len(password) == 0:
            QMessageBox.warning(self, "Warning", "No password generated.")
            return

        file_path = r"C:\toolkit\pass.txt.txt"

        try:
            with open(file_path, "w") as file:
                file.write(password)
            QMessageBox.information(self, "Success", "Password saved successfully.")
        except Exception as e:
            QMessageBox.critical(self, "Error", str(e))

    def view_password(self):
        file_path = r"C:\toolkit\pass.txt.txt"

        try:
            with open(file_path, "r") as file:
                password = file.read()
            QMessageBox.information(self, "Password", password)
        except Exception as e:
            QMessageBox.critical(self, "Error", str(e))


app = QApplication(sys.argv)
window = PasswordGenerator()
window.show()
sys.exit(app.exec_())

password_generator.py
HackStyx/Byte-N-Crypt
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QPushButton, QMessageBox, QListWidget, QListWidgetItem
from PyQt5.QtGui import QFont, QPalette, QColor


class PasswordManager(QMainWindow):
    def __init__(self):
        super().__init__()

        self.setWindowTitle("Password Manager")
        self.setGeometry(100, 100, 400, 400)

        self.passwords = {}

        self.setup_ui()
        self.load_passwords()

    def setup_ui(self):
        # Main layout
        main_widget = QWidget(self)
        self.setCentralWidget(main_widget)

        main_layout = QVBoxLayout()
        main_layout.setContentsMargins(20, 20, 20, 20)
        main_widget.setLayout(main_layout)

        # Password list
        password_list = QListWidget()
        main_layout.addWidget(password_list)

        # Password entry layout
        entry_layout = QVBoxLayout()
        entry_widget = QWidget()
        entry_widget.setStyleSheet("background-color: #E0EBF5; padding: 20px;")
        entry_widget.setLayout(entry_layout)
        main_layout.addWidget(entry_widget)

        label_font = QFont("Arial", 12)

        website_label = QLabel("Website:")
        website_label.setFont(label_font)
        entry_layout.addWidget(website_label)

        self.website_input = QLineEdit()
        self.website_input.setStyleSheet("background-color: white;")
        entry_layout.addWidget(self.website_input)

        username_label = QLabel("Username:")
        username_label.setFont(label_font)
        entry_layout.addWidget(username_label)

        self.username_input = QLineEdit()
        self.username_input.setStyleSheet("background-color: white;")
        entry_layout.addWidget(self.username_input)

        password_label = QLabel("Password:")
        password_label.setFont(label_font)
        entry_layout.addWidget(password_label)

        self.password_input = QLineEdit()
        self.password_input.setStyleSheet("background-color: white;")
        self.password_input.setEchoMode(QLineEdit.Password)
        entry_layout.addWidget(self.password_input)

        # Buttons layout
        buttons_layout = QHBoxLayout()
        buttons_layout.setSpacing(10)
        main_layout.addLayout(buttons_layout)

        add_button = QPushButton("Add")
        add_button.setStyleSheet("background-color: #4CAF50; color: white;")
        add_button.clicked.connect(self.add_password)
        buttons_layout.addWidget(add_button)

        view_button = QPushButton("View Password")
        view_button.setStyleSheet("background-color: #2196F3; color: white;")
        view_button.clicked.connect(self.view_password)
        buttons_layout.addWidget(view_button)

        edit_button = QPushButton("Edit Password")
        edit_button.setStyleSheet("background-color: #FF9800; color: white;")
        edit_button.clicked.connect(self.edit_password)
        buttons_layout.addWidget(edit_button)

        delete_button = QPushButton("Delete")
        delete_button.setStyleSheet("background-color: #F44336; color: white;")
        delete_button.clicked.connect(self.delete_password)
        buttons_layout.addWidget(delete_button)

        clear_button = QPushButton("Clear")
        clear_button.setStyleSheet("background-color: #9E9E9E; color: white;")
        clear_button.clicked.connect(self.clear_fields)
        buttons_layout.addWidget(clear_button)

    def add_password(self):
        website = self.website_input.text()
        username = self.username_input.text()
        password = self.password_input.text()

        if website and username and password:
            if website in self.passwords:
                reply = QMessageBox.question(
                    self,
                    "Website already exists",
                    f"The website '{website}' already exists. Do you want to overwrite the existing password?",
                    QMessageBox.Yes | QMessageBox.No,
                    QMessageBox.No,
                )

                if reply == QMessageBox.Yes:
                    self.passwords[website] = (username, password)
                    self.update_password_list()
                    self.save_passwords()
            else:
                self.passwords[website] = (username, password)
                self.update_password_list()
                self.save_passwords()
        else:
            QMessageBox.warning(self, "Missing Information", "Please enter website, username, and password.")

    def view_password(self):
        selected_items = self.centralWidget().layout().itemAt(0).widget().selectedItems()

        if selected_items:
            website = selected_items[0].text()
            username, password = self.passwords[website]
            QMessageBox.information(self, "View Password", f"Website: {website}\nUsername: {username}\nPassword: {password}")

    def edit_password(self):
        selected_items = self.centralWidget().layout().itemAt(0).widget().selectedItems()

        if selected_items:
            website = selected_items[0].text()
            username, password = self.passwords[website]
            self.website_input.setText(website)
            self.username_input.setText(username)
            self.password_input.setText(password)

    def delete_password(self):
        selected_items = self.centralWidget().layout().itemAt(0).widget().selectedItems()

        if selected_items:
            website = selected_items[0].text()
            reply = QMessageBox.question(
                self,
                "Delete Password",
                f"Are you sure you want to delete the password for '{website}'?",
                QMessageBox.Yes | QMessageBox.No,
                QMessageBox.No,
            )

            if reply == QMessageBox.Yes:
                del self.passwords[website]
                self.update_password_list()
                self.save_passwords()

    def clear_fields(self):
        self.website_input.clear()
        self.username_input.clear()
        self.password_input.clear()

    def update_password_list(self):
        password_list = self.centralWidget().layout().itemAt(0).widget()
        password_list.clear()

        for website, (username, _) in self.passwords.items():
            item = QListWidgetItem(website)
            item.setToolTip(f"Username: {username}")
            password_list.addItem(item)

    def save_passwords(self):
        with open("passwords.txt", "w") as file:
            for website, (username, password) in self.passwords.items():
                file.write(f"{website},{username},{password}\n")

    def load_passwords(self):
        try:
            with open("passwords.txt", "r") as file:
                lines = file.readlines()

                for line in lines:
                    data = line.strip().split(",")
                    if len(data) == 3:
                        website, username, password = data
                        self.passwords[website] = (username, password)

            self.update_password_list()

        except FileNotFoundError:
            return


if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = PasswordManager()
    window.show()
    sys.exit(app.exec_())

password_manager.py
HackStyx/Byte-N-Crypt
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QLineEdit, QPushButton, QVBoxLayout, QWidget, QMessageBox
from PyQt5.QtGui import QFont, QColor, QPalette
from PyQt5.QtCore import Qt


class PasswordStrengthChecker(QMainWindow):
    def __init__(self):
        super().__init__()

        self.setWindowTitle("Password Strength Checker")
        self.setGeometry(0, 0, 600, 400)

        main_widget = QWidget(self)
        self.setCentralWidget(main_widget)

        layout = QVBoxLayout(main_widget)
        layout.setAlignment(Qt.AlignCenter)

        self.password_label = QLabel("Enter Password:", self)
        self.password_label.setFont(QFont("Arial", 12))
        layout.addWidget(self.password_label)

        self.password_input = QLineEdit(self)
        self.password_input.setEchoMode(QLineEdit.Password)
        self.password_input.setFixedWidth(300)
        layout.addWidget(self.password_input)

        self.view_button = QPushButton("Show", self)
        self.view_button.setFixedWidth(60)
        self.view_button.setStyleSheet("QPushButton { background-color: #F2F2F2; border: 1px solid #DADADA; border-radius: 5px; padding: 5px; }"
                                        "QPushButton:hover { background-color: #E6E6E6; }"
                                        "QPushButton:pressed { background-color: #DADADA; }")
        layout.addWidget(self.view_button)

        self.check_button = QPushButton("Check Strength", self)
        self.check_button.setFixedWidth(150)
        self.check_button.setStyleSheet("QPushButton { background-color: #4CAF50; color: white; border-radius: 5px; padding: 5px; }"
                                        "QPushButton:hover { background-color: #45A049; }"
                                        "QPushButton:pressed { background-color: #3C893D; }")
        layout.addWidget(self.check_button)

        self.result_label = QLabel(self)
        self.result_label.setFont(QFont("Arial", 12))
        layout.addWidget(self.result_label)

        self.check_button.clicked.connect(self.check_password_strength)
        self.view_button.clicked.connect(self.view_password)

        self.password_input.returnPressed.connect(self.check_button.click)

    def check_password_strength(self):
        password = self.password_input.text()
        strength = self.calculate_password_strength(password)
        if strength == 0:
            self.result_label.setText("Weak Password")
            self.result_label.setStyleSheet("color: red")
        elif strength == 1:
            self.result_label.setText("Medium Password")
            self.result_label.setStyleSheet("color: orange")
        else:
            self.result_label.setText("Strong Password")
            self.result_label.setStyleSheet("color: green")

    def view_password(self):
        if self.password_input.echoMode() == QLineEdit.Password:
            self.password_input.setEchoMode(QLineEdit.Normal)
            self.view_button.setText("Hide")
        else:
            self.password_input.setEchoMode(QLineEdit.Password)
            self.view_button.setText("Show")

    @staticmethod
    def calculate_password_strength(password):
        # Password strength criteria implementation
        length = len(password)
        if length < 8:
            return 0  # Weak password
        elif length < 12:
            return 1  # Medium password
        else:
            return 2  # Strong password

    def closeEvent(self, event):
        confirm_exit = self.confirmExit()
        if confirm_exit:
            event.accept()
        else:
            event.ignore()

    @staticmethod
    def confirmExit():
        choice = QMessageBox.question(None, "Exit Confirmation",
                                      "Are you sure you want to exit?", 
                                      QMessageBox.Yes | QMessageBox.No)
        return choice == QMessageBox.Yes


if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = PasswordStrengthChecker()
    
    # Setting the background color
    palette = window.palette()
    palette.setColor(QPalette.Window, QColor(240, 240, 240))
    window.setPalette(palette)
    
    window.show()
    sys.exit(app.exec_())
 
password_strength.py
HackStyx/Byte-N-Crypt