├── Games ├── FlashFlow │ ├── Dockerfile │ ├── package.json │ ├── README.md │ └── index.js └── README.md ├── README.md ├── Fun-Projects ├── IP-Interface-Info-Script │ ├── main.sh │ └── README.md └── YT-Video-Downloader │ ├── main.py │ └── README.md └── Semester_1 ├── Calculator_in_CPP ├── README.md └── main.cpp ├── Password_Generator ├── README.md └── password_generator.py └── Monoalphabetic-Cipher ├── README.md └── main.py /Games/FlashFlow/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:21 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package*.json ./ 6 | 7 | RUN npm install 8 | 9 | COPY . . 10 | 11 | CMD [ "node", "./index.js" ] 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Projects 2 | 3 | This repository houses a comprehensive collection of my endeavors, including semester projects, collaborative team efforts, and individual initiatives. I hope that you will find these contributions valuable and informative. 4 | -------------------------------------------------------------------------------- /Games/README.md: -------------------------------------------------------------------------------- 1 | # _**Overview:**_ 2 | 3 | Welcome to the Game Projects repository! 4 | 5 | This repository houses various game projects that I have developed over a long period of time. 6 | 7 | Each project is designed to showcase different technologies in game development and programming. 8 | 9 | Feel free to explore the individual folders for detailed information about each game. 10 | -------------------------------------------------------------------------------- /Games/FlashFlow/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flashflow", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "type": "module", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "chalk": "^5.3.0", 15 | "chalk-animation": "^2.0.3", 16 | "figlet": "^1.7.0", 17 | "gradient-string": "^2.0.2", 18 | "inquirer": "^9.2.12", 19 | "nanospinner": "^1.1.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Fun-Projects/IP-Interface-Info-Script/main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Checking if an argument is provided or not 4 | if [ $# -eq 0 ] 5 | then 6 | echo "Usage: $0 " 7 | exit 1 8 | fi 9 | 10 | # Getting the interface name from the command line as an argument 11 | interface="$1" 12 | 13 | # Using ip command to get information about the specified interface 14 | inet_address=$(ip addr show dev "$interface" | grep -oP 'inet \K\S+') 15 | 16 | # Checking if the provided interface has an inet address or not 17 | if [ -n "$inet_address" ]; then 18 | echo "Inet address for $interface: $inet_address" 19 | else 20 | echo "No inet address found for $interface" 21 | fi 22 | -------------------------------------------------------------------------------- /Fun-Projects/YT-Video-Downloader/main.py: -------------------------------------------------------------------------------- 1 | import os 2 | from pytube import YouTube 3 | 4 | def download_video(url, output_path='.'): 5 | try: 6 | yt = YouTube(url) 7 | video = yt.streams.filter(file_extension='mp4', progressive=True).first() 8 | print(f"Downloading: {yt.title} ({video.filesize / (1024 * 1024):.2f} MB)") 9 | 10 | video.download(output_path) 11 | print("Download Complete!!") 12 | except Exception as e: 13 | print(f"Error: {e}") 14 | 15 | if __name__ == "__main__": 16 | video_url = input("Enter the YouTube video URL: ") 17 | output_directory = input("Enter the output directory (press Enter for the current directory): ").strip() or '.' 18 | 19 | if not os.path.exists(output_directory): 20 | os.makedirs(output_directory) 21 | 22 | download_video(video_url, output_directory) 23 | -------------------------------------------------------------------------------- /Semester_1/Calculator_in_CPP/README.md: -------------------------------------------------------------------------------- 1 | # Simple Console Calculator in C++ 🧮 2 | 3 | This is a basic calculator program written in C++ that performs arithmetic operations (+, -, *, /, %) based on user input. The program uses the Windows API to set console text attributes and colors for a more visually appealing interface. 4 | 5 | ## How to Use 6 | 7 | 1. Clone the repository to your local machine: 8 | 9 | ```bash 10 | git clone https://github.com/DenialArcus/Projects.git 11 | ``` 12 | 13 | 2. Navigate to the project directory: 14 | ```bash 15 | cd Projects/Semester_1/Calculator_in_CPP 16 | ``` 17 | 18 | 3. Compile the C++ code: 19 | ```bash 20 | g++ main.cpp -o calculator 21 | ``` 22 | 23 | 4. Run the executable: 24 | ```bash 25 | ./calculator 26 | ``` 27 | 28 | ## Features 29 | 30 | - Accepts user input for two numbers and an arithmetic operation (+, -, *, /, %). 31 | - Uses console text attributes and colors to enhance the user interface. 32 | - Performs the selected operation and displays the result. 33 | 34 | ## Usage Example 35 | 36 | ```bash 37 | Please Enter Your First Number: 10 38 | Declare an Operator(+,-,x,/,%): * 39 | Please Enter Your Second Number: 5 40 | 50 41 | ``` 42 | 43 | ## Contributions 44 | 45 | Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. 46 | -------------------------------------------------------------------------------- /Fun-Projects/YT-Video-Downloader/README.md: -------------------------------------------------------------------------------- 1 | # YouTube Video Downloader 2 | 3 | ## Overview 4 | 5 | This Python script allows you to download YouTube videos easily using the pytube library. It prompts the user for a YouTube video URL and an optional output directory, then downloads the video and saves it in the specified directory. If the specified directory doesn't exist, this script will create it automatically. 6 | 7 | ## Prerequisites 8 | 9 | - Python 3.x 10 | - pytube library (`pip install pytube`) 11 | 12 | ## How to Use 13 | 14 | 1. Clone this repository: 15 | 16 | ```bash 17 | git clone https://github.com/ArcusTen/Projects.git 18 | cd Projects/Fun-Projects/YT-Video-Downloader 19 | ``` 20 | 21 | 2. Install the required dependencies: 22 | ```bash 23 | pip install pytube 24 | ``` 25 | 26 | 3. Run the script: 27 | ```bash 28 | python main.py 29 | ``` 30 | 31 | 4. Enter the YouTube video URL when prompted. 32 | 33 | 5. Optionally, enter the output directory (press Enter for the current directory). 34 | 35 | 6. The script will download the video and display progress information. 36 | 37 | ## Important Note ⚠⚠ 38 | 39 | Make sure to comply with YouTube's terms of service when using this script. 40 | 41 | Always respect copyright and intellectual property rights. 42 | 43 | Use this script responsibly and considerate of the content creators. 44 | 45 | ## Contributions 46 | 47 | Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. 48 | -------------------------------------------------------------------------------- /Semester_1/Calculator_in_CPP/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | int main() 6 | { 7 | HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); 8 | int input1; 9 | int input2; 10 | char operation; 11 | 12 | SetConsoleTextAttribute (hConsole, 1); 13 | 14 | cout << "Please Enter Your First Number: "; 15 | cin >> input1; 16 | 17 | SetConsoleTextAttribute (hConsole, 2); 18 | 19 | cout << "Declare an Operator(+,-,x,/,%): "; 20 | cin >> operation; 21 | 22 | SetConsoleTextAttribute (hConsole, 4); 23 | 24 | cout << "Please Enter Your Second Number: "; 25 | cin >> input2; 26 | 27 | system("color 2"); 28 | 29 | if (operation =='+') 30 | { 31 | SetConsoleTextAttribute (hConsole, 13); 32 | cout << (input1 + input2); 33 | } 34 | else if (operation == '-') 35 | { 36 | SetConsoleTextAttribute (hConsole, 6); 37 | cout << (input1 - input2); 38 | } 39 | else if (operation == 'x') 40 | { 41 | SetConsoleTextAttribute (hConsole, 5); 42 | cout << (input1 * input2); 43 | } 44 | else if (operation == '/') 45 | { 46 | SetConsoleTextAttribute (hConsole, 8); 47 | cout << (input1 / input2); 48 | } 49 | else if (operation == '%') 50 | { 51 | SetConsoleTextAttribute (hConsole, 11); 52 | cout << (input1 % input2); 53 | } 54 | else 55 | { 56 | SetConsoleTextAttribute (hConsole, 12); 57 | cout << "Syntax Error"< 27 | ``` 28 | 29 | ### Examples 30 | 31 | ```bash 32 | ./main.sh lo 33 | ``` 34 | 35 | ```bash 36 | ./main.sh eth0 37 | ``` 38 | 39 | ```bash 40 | ./main.sh enp0s3 41 | ``` 42 | 43 | ## Script Explanation 44 | 45 | 1. **Check for Argument:** 46 | 47 | The script checks if a command-line argument (network interface) is provided. If not, it displays a usage message and exits. 48 | 49 | 2. **Get Interface Name:** 50 | 51 | The script assigns the provided interface name from the command line argument to a variable. 52 | 53 | 3. **Retrieve Information:** 54 | 55 | It uses the ip command to obtain information about the specified interface, specifically extracting the IPv4 address. 56 | 57 | 4. **Display Results:** 58 | 59 | If an IPv4 address is found, it displays the address; otherwise, it notifies that no address was found. 60 | 61 | ## Contributions 62 | 63 | Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. 64 | -------------------------------------------------------------------------------- /Semester_1/Password_Generator/README.md: -------------------------------------------------------------------------------- 1 | # Password Generator by Arcus 2 | 3 | ## Overview 4 | This is a simple password generator written in Python using the Tkinter library for the graphical user interface. The application allows users to customize the generated passwords by specifying the minimum length and whether to include numbers and special characters. 5 | 6 | ## Features 7 | - Generate secure passwords with customizable options. 8 | - Copy the generated password to the clipboard with a single click. 9 | 10 | ## Installation 11 | 1. Ensure you have Python installed on your system. 12 | 2. Install the required packages using the following command: 13 | ```bash 14 | pip install pillow 15 | 16 | ## Usage 17 | 1. Run the script using the following command: 18 | ```bash 19 | python password_generator.py 20 | ``` 21 | 2. Enter the desired minimum length for the password. 22 | 3. Choose whether to include numbers and special characters. 23 | 4. Click the "Go" button to generate a password. 24 | 5. The generated password will be displayed on the screen. 25 | 6. Optionally, click the "Copy" button to copy the password to the clipboard. 26 | 27 | ## Screenshots 28 | 29 | ![image](https://github.com/DenialArcus/Projects/assets/147534344/50a00fd6-01b7-4703-b7b6-8500805791f7) 30 | ![image](https://github.com/DenialArcus/Projects/assets/147534344/b76c781a-b2f3-4fd8-bb54-ffbc6db5382a) 31 | 32 | ## Dependencies 33 | 34 | - Tkinter 35 | - Pillow (PIL) 36 | 37 | ## Contributing 38 | 39 | Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. 40 | 41 | ## Acknowledgments 42 | - Icon made by Arcus (replace with actual attribution) from Flaticon. You can add your own logo by inserting the path at the desired location in the source code. 43 | -------------------------------------------------------------------------------- /Semester_1/Monoalphabetic-Cipher/README.md: -------------------------------------------------------------------------------- 1 | # _**Monoalphabetic Cipher**_ 2 | 3 | A Python implementation of the Monoalphabetic Cipher by me, a simple substitution cipher that uses a fixed key to encrypt and decrypt messages. 4 | 5 | ## Table of Contents 6 | - [Overview](#overview) 7 | - [Usage](#usage) 8 | - [Key Features](#key-features) 9 | - [Testing](#Testing-the-Program-by-giving-different-inputs) 10 | - [License](#license) 11 | 12 | ## **_Overview_** 13 | 14 | The Monoalphabetic Cipher is a substitution cipher where each letter in the plaintext is replaced with a corresponding letter from the key. The key is a permutation of the uppercase alphabet. This implementation provides methods for both encryption and decryption using the Monoalphabetic Cipher. 15 | 16 | ## **_Usage_** 17 | 18 | To use this implementation, create an instance of the `MonoalphabeticCipher` class by providing a key (a permutation of the uppercase alphabet). You can then use the `encrypt` and `decrypt` methods to process messages. 19 | 20 | ## **_Key Features_** 21 | 22 | - **Encryption:** The `encrypt` method takes a plaintext string and returns the encrypted version using the Monoalphabetic Cipher. 23 | - **Decryption:** The `decrypt` method takes a ciphertext string and returns the decrypted version using the Monoalphabetic Cipher. 24 | - **User Interface:** The program includes a simple command-line interface allowing users to interactively encrypt or decrypt messages. 25 | 26 | ## _**Testing the Program by giving different inputs**:_ 27 | 28 | ![image](https://github.com/DenialArcus/Projects/assets/147534344/4fe5e743-0963-4645-8053-05cef578c638) 29 | ![image](https://github.com/DenialArcus/Projects/assets/147534344/62217f74-4467-4431-bffc-0caf94a1b918) 30 | ![image](https://github.com/DenialArcus/Projects/assets/147534344/8191b9bf-753d-4469-a03e-23dee6921615) 31 | 32 | ## _**Contributions**_ 33 | 34 | Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. 35 | -------------------------------------------------------------------------------- /Games/FlashFlow/README.md: -------------------------------------------------------------------------------- 1 | # _**FlashFlow - CLI Question/Answer Game**_ 2 | 3 | ![image](https://github.com/DenialArcus/Projects/assets/147534344/43f563f2-fc56-41ca-84a3-6865e84a743d) 4 | 5 | 6 | ## _**Description**_ 7 | 8 | Welcome to _**FlashFlow**_, a terminal-based question/answer game where you have the chance to prove your knowledge about the mysterious _**theFlash2k**_. 9 | 10 | Answer a series of questions correctly and you might just become the next _**theFlash2k**_! 11 | 12 | ## _**Installation**_ 13 | 14 | To play _**FlashFlow**_, follow these simple steps: 15 | 16 | 1. **Clone the repository:** 17 | ```bash 18 | git clone https://github.com/ArcusTen/Projects.git 19 | ``` 20 | ```bash 21 | cd Projects/Games/FlashFlow 22 | ``` 23 | 24 | 2. **Install dependencies:** 25 | ```bash 26 | npm install 27 | ``` 28 | 29 | 3. **Install Node.js and npm:** 30 | 31 | Make sure you have Node.js and npm installed on your machine. You can download them from _[here](https://nodejs.org/en)_. 32 | 33 | _**OR**_ 34 | 35 | Use your respective package manager to install the required packages. 36 | 37 | 5. **Run the game:** 38 | ```bash 39 | node index.js 40 | ``` 41 | OR 42 | ```bash 43 | node . 44 | ``` 45 | 46 | ## _**How to Play**_ 47 | 48 | Answer a series of questions about theFlash2k. 49 | 50 | Be careful! A wrong answer might end the game. 51 | 52 | ## _**Features**_ 53 | 54 | - Utilizes chalk for colorful and styled terminal text. 55 | - Uses inquirer for interactive command-line user interface. 56 | - Displays cool animations with chalk-animation and ASCII art with figlet. 57 | - Checks your knowledge related to _**theFlash2k**_. 58 | 59 | ## _**Dependencies**_ 60 | 61 | - chalk 62 | - chalk-animation 63 | - inquirer 64 | - nanospinner 65 | - figlet 66 | - gradient-string 67 | 68 | ## _**Questions**_ 69 | 70 | 1. What is theFlash2k's favourite CTF Domain? 71 | 2. What is theFlash2k's favourite Food? 72 | 3. What is theFlash2k's favourite Place to go on a trip? 73 | 4. What is theFlash2k's favourite Linux Distro? 74 | 5. What is theFlash2k's AAA Game? 75 | 6. What is theFlash2k's favourite Sports? 76 | 7. Is theFlash2k Married? 77 | 8. Who is his Inspiration? 78 | 79 | ## _**Answers**_ 80 | 81 | 1. Pwn 82 | 2. Fast-Food 83 | 3. Tokyo-Japan 84 | 4. Arch 85 | 5. God-Of-War 5 86 | 6. Esports 87 | 7. NO 88 | 8. PEPSI PU 89 | 90 | ## _**Acknowledgments**_ 91 | 92 | Special thanks to _**[theFlash2k](https://github.com/theflash2k/)**_ for inspiring this game! 93 | 94 | Logo credits: _**[Place Kitten](https://placekitten.com/)**_ 95 | 96 | ## _**Contributions**_ 97 | 98 | Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. 99 | 100 | Contribute or customize the game as you see fit. Enjoy and have fun playing _**FlashFlow**_!! 101 | -------------------------------------------------------------------------------- /Semester_1/Password_Generator/password_generator.py: -------------------------------------------------------------------------------- 1 | import tkinter as tk 2 | from tkinter import StringVar 3 | from PIL import Image, ImageTk 4 | from tkinter import ttk 5 | import random 6 | import string 7 | import pyperclip 8 | 9 | 10 | def set_icon(window, icon_path): 11 | image = Image.open(icon_path) 12 | photo = ImageTk.PhotoImage(image) 13 | window.tk.call('wm', 'iconphoto', window._w, photo) 14 | 15 | def password_generator(minimum_length, numbers = True, special_characters = True): 16 | letters = string.ascii_letters 17 | digits = string.digits 18 | special = string.punctuation 19 | 20 | characters = letters 21 | if numbers: 22 | characters += digits 23 | if special_characters: 24 | characters += special 25 | 26 | password = "" 27 | 28 | criteria_met = False 29 | has_number = False 30 | has_special = False 31 | 32 | while not criteria_met or len(password) < minimum_length: 33 | new_character = random.choice(characters) 34 | password += new_character 35 | 36 | if new_character in digits: 37 | has_number = True 38 | elif new_character in special: 39 | has_special = True 40 | 41 | criteria_met = True 42 | if numbers: 43 | criteria_met = has_number 44 | if special_characters: 45 | criteria_met = criteria_met and has_special 46 | 47 | return password 48 | 49 | def generate_password(): 50 | minimum_length = int(minimum_length_var.get()) 51 | has_number = include_numbers_var.get() 52 | has_special = include_special_var.get() 53 | 54 | generated_password = password_generator(minimum_length, has_number, has_special) 55 | 56 | generated_password_label.config(text = "Generated Password:\n" + generated_password) 57 | 58 | 59 | 60 | # GUI Setup 61 | window = tk.Tk() 62 | 63 | window.title("Password Generator by Arcus") 64 | 65 | width = 330 66 | height = 400 67 | windows_dimension = str(width) + "x" + str(height) 68 | window.geometry(windows_dimension) 69 | 70 | 71 | icon_path = r"" 72 | set_icon(window, icon_path) 73 | 74 | 75 | # Displaying text 76 | title_label = ttk.Label(master = window, text = "Enter the minimum length for password: ", font = 'Calibri 12 italic').grid(row = 0, column = 0, padx = 5, pady = 5) 77 | 78 | # Minimum Length Entry 79 | tk.Label(window, text = "Minimum Length:").grid(row = 2, column = 0, padx = 5, pady = 5) 80 | minimum_length_var = StringVar() 81 | minimum_length_entry = tk.Entry(window, textvariable = minimum_length_var) 82 | minimum_length_entry.grid(row = 1, column = 0, padx = 10, pady = 10) 83 | 84 | # Checkboxes 85 | include_numbers_var = tk.BooleanVar() 86 | include_numbers_var.set(True) 87 | include_numbers_checkbox = tk.Checkbutton(window, text = "Include Numbers", variable = include_numbers_var) 88 | include_numbers_checkbox.grid(row = 2, column = 0, padx = 10, pady = 5) 89 | 90 | include_special_var = tk.BooleanVar() 91 | include_special_var.set(True) 92 | include_special_checkbox = tk.Checkbutton(window, text = "Include Special Characters", variable = include_special_var) 93 | include_special_checkbox.grid(row = 3, column = 0, padx = 10, pady = 5) 94 | 95 | # Generate Button 96 | go_button = tk.Button(window, text = "Go ...", font = 'Calibri 10 bold italic', command = generate_password, bg = "#01cd67", fg = "white", bd = 5, relief = tk.GROOVE, borderwidth = 5, padx = 10) 97 | go_button.grid(row = 4, column = 0, columnspan = 2, pady = 10) 98 | 99 | # Result Label 100 | generated_password_label = tk.Label(window, text = "", font = 'Calibri 12 italic') 101 | generated_password_label.grid(row = 5, column = 0, columnspan = 2, pady = 10) 102 | 103 | 104 | copy_button = tk.Button(window, text="Copy", command=lambda: pyperclip.copy(generated_password_label.cget("text").split(":")[1].strip()), font = 'Calibri 10 bold italic', bg = "#01cd67", fg = "white", bd=5, relief=tk.GROOVE, borderwidth=5, padx=10) 105 | copy_button.grid(row=8, column=0, columnspan=2, pady=10) 106 | 107 | 108 | window.mainloop() 109 | -------------------------------------------------------------------------------- /Semester_1/Monoalphabetic-Cipher/main.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Monoalphabetic Cipher by ARCUS 4 | 5 | import string 6 | from sys import exit 7 | 8 | class MonoalphabeticCipher: 9 | ''' 10 | Following constructor method initializes an instance of the class. 11 | It takes a parameter (key), which is a string of the uppercase alphabet. 12 | ''' 13 | def __init__(self, key): 14 | self.key = key 15 | self.alphabet = string.ascii_uppercase 16 | 17 | 18 | ''' 19 | This method (encrypt) takes a plaintext string as input and returns the encrypted version using the monoalphabetic cipher. 20 | It iterates through each character in the plaintext and checks whether it is an alphabet character. If it is, it finds the index 21 | of the character in the alphabet and substitutes it with the corresponding character from the key. The case (uppercase or lowercase) 22 | is preserved during the substitution. 23 | ''' 24 | def encrypt(self, plaintext): 25 | ciphertext = "" 26 | for char in plaintext: 27 | if char.isalpha(): 28 | is_upper = char.isupper() 29 | index = self.alphabet.index(char.upper()) 30 | encrypted_char = self.key[index] 31 | ciphertext += encrypted_char.upper() if is_upper else encrypted_char.lower() 32 | else: 33 | ciphertext += char 34 | return ciphertext 35 | 36 | ''' 37 | This method (decrypt) takes a ciphertext string as input and returns the decrypted version using the monoalphabetic cipher. 38 | It performs the reverse process of encryption by substituting each character in the ciphertext with the corresponding character 39 | from the alphabet based on the key. 40 | ''' 41 | def decrypt(self, ciphertext): 42 | plaintext = "" 43 | for char in ciphertext: 44 | if char.isalpha(): 45 | is_upper = char.isupper() 46 | index = self.key.index(char.upper()) 47 | decrypted_char = self.alphabet[index] 48 | plaintext += decrypted_char.upper() if is_upper else decrypted_char.lower() 49 | else: 50 | plaintext += char 51 | return plaintext 52 | 53 | def main(): 54 | key = "QWERTYUIOPASDFGHJKLZXCVBNM" # You can use any permutation of the alphabet as the key 55 | cipher = MonoalphabeticCipher(key) 56 | 57 | ascii_art = r''' 58 | _______ __ __ 59 | / ____(_)___ / /_ ___ _____ / /_ __ __ 60 | / / / / __ \/ __ \/ _ \/ ___/ / __ \/ / / / 61 | / /___/ / /_/ / / / / __/ / / /_/ / /_/ / 62 | \____/_/ .___/_/ /_/\___/_/ /_.___/\__, / 63 | /_/ /____/ 64 | ___ ____ ________ _______ 65 | / | / __ \/ ____/ / / / ___/ 66 | / /| | / /_/ / / / / / /\__ \ 67 | / ___ |/ _, _/ /___/ /_/ /___/ / 68 | /_/ |_/_/ |_|\____/\____//____/ 69 | ''' 70 | 71 | print("<------------------------------------------------------------------------------------------------------------------->") 72 | print(ascii_art) 73 | print("<------------------------------------------------------------------------------------------------------------------->") 74 | 75 | while True: 76 | print("\nMonoalphabetic Cipher Program") 77 | print("1. Encrypt") 78 | print("2. Decrypt") 79 | print("3. Exit") 80 | choice = input("Enter your choice (1, 2, or 3): ") 81 | 82 | if choice == "1": 83 | plaintext = input("Enter the message to encrypt: ") 84 | encrypted_text = cipher.encrypt(plaintext) 85 | print("\nEncrypted message:", encrypted_text) 86 | elif choice == "2": 87 | ciphertext = input("Enter the message to decrypt: ") 88 | decrypted_text = cipher.decrypt(ciphertext) 89 | print("\nDecrypted message:", decrypted_text) 90 | elif choice == "3": 91 | print("\nExiting the program. Goodbye! See Ya !\n") 92 | exit() 93 | else: 94 | print("Invalid choice. Please enter 1, 2, or 3.") 95 | 96 | if __name__ == "__main__": 97 | main() 98 | -------------------------------------------------------------------------------- /Games/FlashFlow/index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import chalk from 'chalk'; 4 | import inquirer from 'inquirer'; 5 | import gradient from 'gradient-string'; 6 | import figlet from 'figlet'; 7 | import { createSpinner } from 'nanospinner'; 8 | import chalkAnimation from 'chalk-animation'; 9 | 10 | let playerName; 11 | 12 | const sleep = (ms = 2700) => new Promise((r) => setTimeout(r, ms)); 13 | 14 | async function welcome() 15 | { 16 | const rainbowTitle = chalkAnimation.rainbow('Who wants to Be the next theFlash2k ?? \n'); 17 | 18 | await sleep(); 19 | rainbowTitle.stop(); 20 | 21 | console.log(` 22 | ${chalk.bgCyan('HOW TO PLAY THIS STUPID GAME YOU MAY ASK:')} 23 | I am a processor on your computer. 24 | If you get any question wrong I will leave you just like your ${chalk.bgMagentaBright('EX')} 25 | So be Careful ... 26 | `) 27 | } 28 | 29 | async function askName() 30 | { 31 | const answers = await inquirer.prompt({ 32 | name: 'player_name', 33 | type: 'input', 34 | message: 'Sorry I forgot to ask, what is your name? \n', 35 | default() 36 | { 37 | return 'Player'; 38 | }, 39 | }) 40 | playerName = answers.player_name; 41 | } 42 | 43 | async function question_1() 44 | { 45 | const answers = await inquirer.prompt({ 46 | name: 'question_1', 47 | type: 'list', 48 | message: 'What is theFlash2k\'s favourite CTF Domain?? \n', 49 | choices: [ 50 | 'Misc', 51 | 'Pwn', 52 | 'Reversing', 53 | 'Cryptography', 54 | ] 55 | }) 56 | return handleAnswer(answers.question_1 == 'Pwn'); 57 | } 58 | 59 | 60 | async function handleAnswer(isCorrect) 61 | { 62 | const spinner = createSpinner(`Hmmm .... Lemme Check ...`).start(); 63 | await sleep(); 64 | 65 | if (isCorrect) 66 | { 67 | spinner.success({ text: `Thats Correct ${playerName}. I guess you know something about him 🧐`}); 68 | } 69 | else 70 | { 71 | spinner.error({ text: `💀 Game Over, you lost ${playerName} 💀`}); 72 | process.exit(1); 73 | } 74 | } 75 | 76 | async function question_2() 77 | { 78 | const answers = await inquirer.prompt({ 79 | name: 'question_2', 80 | type: 'list', 81 | message: 'What is theFlash2k\'s favourite Food?? \n', 82 | choices: [ 83 | 'Biryani', 84 | 'Qorma', 85 | 'Fast-Food', 86 | 'Nehari', 87 | ] 88 | }) 89 | return handleAnswer(answers.question_2 == 'Fast-Food'); 90 | } 91 | 92 | async function question_3() 93 | { 94 | const answers = await inquirer.prompt({ 95 | name: 'question_3', 96 | type: 'list', 97 | message: 'What is theFlash2k\'s favourite Place to go on a trip? \n', 98 | choices: [ 99 | 'Tokyo-Japan', 100 | 'İstanbul-Turkey', 101 | 'Rome-Italy', 102 | 'Cairo-Egypt', 103 | ] 104 | }) 105 | return handleAnswer(answers.question_3 == 'Tokyo-Japan'); 106 | } 107 | 108 | async function question_4() 109 | { 110 | const answers = await inquirer.prompt({ 111 | name: 'question_4', 112 | type: 'list', 113 | message: 'What is theFlash2k\'s favourite Linux Distro?? \n', 114 | choices: [ 115 | 'Debian', 116 | 'Gentoo', 117 | 'Fedora', 118 | 'Arch', 119 | ] 120 | }) 121 | return handleAnswer(answers.question_4 == 'Arch'); 122 | } 123 | 124 | async function question_5() 125 | { 126 | const answers = await inquirer.prompt({ 127 | name: 'question_5', 128 | type: 'list', 129 | message: 'What is theFlash2k\'s AAA Game?? \n', 130 | choices: [ 131 | 'GTA-V', 132 | 'Ghost-of-Tsushima', 133 | 'Far-Cry 5', 134 | 'God-OF-War 5', 135 | ] 136 | }) 137 | return handleAnswer(answers.question_5 == 'God-OF-War 5'); 138 | } 139 | 140 | async function question_6() 141 | { 142 | const answers = await inquirer.prompt({ 143 | name: 'question_6', 144 | type: 'list', 145 | message: 'What is theFlash2k\'s favourite Sports?? \n', 146 | choices: [ 147 | 'Football', 148 | 'Esports', 149 | 'BasketBall', 150 | 'Cricket', 151 | ] 152 | }) 153 | return handleAnswer(answers.question_6 == 'Esports'); 154 | } 155 | 156 | async function question_7() 157 | { 158 | const answers = await inquirer.prompt({ 159 | name: 'question_7', 160 | type: 'list', 161 | message: 'Is theFlash2k Married?? \n', 162 | choices: [ 163 | 'Good Question ... Next', 164 | 'Yes (Sorry Girls He is taken)', 165 | 'Maybe 🧐', 166 | 'No (US MOMENT)', 167 | ] 168 | }) 169 | return handleAnswer(answers.question_7 == 'No (US MOMENT)'); 170 | } 171 | 172 | async function question_8() 173 | { 174 | const answers = await inquirer.prompt({ 175 | name: 'question_8', 176 | type: 'list', 177 | message: 'Who is his Inspiration? \n', 178 | choices: [ 179 | 'ITAY C0HEN', 180 | 'ETIZAZ MOHSIN', 181 | 'PEPSI PU', 182 | 'FLASH', 183 | ] 184 | }) 185 | return handleAnswer(answers.question_8 == 'PEPSI PU'); 186 | } 187 | 188 | function win_screen() 189 | { 190 | console.clear(); 191 | const msg = `Congratulations ${playerName} !!! \n You can become next theFlash2k`; 192 | 193 | figlet(msg, (err, data) => { 194 | console.log(gradient.pastel.multiline(data)); 195 | }); 196 | } 197 | 198 | 199 | await welcome() 200 | await askName(); 201 | await question_1(); 202 | await question_2(); 203 | await question_3(); 204 | await question_4(); 205 | await question_5(); 206 | await question_6(); 207 | await question_7(); 208 | await question_8(); 209 | 210 | await win_screen(); 211 | --------------------------------------------------------------------------------