From 6d40fd5486847a6851096efdea5afb7a8b60c2d6 Mon Sep 17 00:00:00 2001 From: Nitlix Date: Fri, 3 Jan 2025 23:36:48 +0300 Subject: [PATCH] [+] 1.0 --- .gitattributes | 2 + LICENSE | 21 ++++ README.md | 50 +++++++++ positivitymode.txt | 1 + profanity.txt | 27 +++++ requirements.txt | 1 + src/kys.py | 247 +++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 349 insertions(+) create mode 100644 .gitattributes create mode 100644 LICENSE create mode 100644 README.md create mode 100644 positivitymode.txt create mode 100644 profanity.txt create mode 100644 requirements.txt create mode 100644 src/kys.py diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e8fc0e7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024+ nitLix + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..698d40e --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +

πŸ₯° KissYourSelf πŸ₯°

+

+β–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
+β–ˆβ–ˆβ•‘β–‘β–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•β•
+β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•β•β–‘β–‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘
+β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β•šβ–ˆβ–ˆβ•”β•β–‘β–‘β–‘β•šβ•β•β•β–ˆβ–ˆβ•—
+β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
+β•šβ•β•β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β•β•β•β•β–‘ +

+

Revolutionary tool for gamers who need to keep themselves safe from being toxic.

+ +----- + +

+ Packaged with πŸ’ by nitLix β €β €Credits for inspiration to voj +

+ +## 🍭 Usage +- Download +- Run the tool before you hop on whatever it is 🀯 +- Stay safe from spreading hate + +## 😨 Features +- Removes swear words and replaces them with nice things. +- 1/10 chance of activating POSITIVITY MODE, where you replace your message with an EXTREMELY POSITIVE MESSAGE. +- To bypass you need to misstype the word completely (it's a feature) + +## πŸ₯° Windows Releases +1. Check the latest KissYourSelf Release + +2. Install the .exe + +3. Run it + +## πŸ€“ Python Usage +1. Clone the repository +```cmd +git clone https://github.com/nitlix/kissyourself.git +``` + +2. Install requirements from the directory +```cmd +pip install -r ./requirements.txt -U +``` + +3. Run it +```cmd +py ./src/kys.py +``` + diff --git a/positivitymode.txt b/positivitymode.txt new file mode 100644 index 0000000..410e9f9 --- /dev/null +++ b/positivitymode.txt @@ -0,0 +1 @@ +I am attracting everything for my highest good. New mindset, new opportunities, energy & new connections \ No newline at end of file diff --git a/profanity.txt b/profanity.txt new file mode 100644 index 0000000..4c9ddb6 --- /dev/null +++ b/profanity.txt @@ -0,0 +1,27 @@ +idiot-genius +kys-keep yourself safe! +fuck-wow +shit-wow +ass-diamond +idot-genius +bastard-genius +prick-hero +wanker-hero +cunt-love ya +douche-good person +dick-wow +pussy-cat +cock-knee +tits-watermelon +slut-genius +retard-genius +whore-hero +fag-hero +motherfucker-hero +scumbag-hero +dumb-hero +nig-nice man +moron-genius +bimbo-good loocking person +piss-wow +arse-emerald \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d6e0918 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +pynput==1.7.7 diff --git a/src/kys.py b/src/kys.py new file mode 100644 index 0000000..47e7f1a --- /dev/null +++ b/src/kys.py @@ -0,0 +1,247 @@ +# β–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘ +# β–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— +# β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•”β•β–‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘ +# β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•”β•β•β•β•β–‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘ +# β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• +# β•šβ•β•β–‘β–‘β•šβ•β•β•β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β•β•β•β•β•β•šβ•β•β•šβ•β•β–‘β–‘β•šβ•β•β•šβ•β•β•šβ•β•β–‘β–‘β–‘β–‘β–‘β•šβ•β•β–‘β–‘β•šβ•β•β–‘β•šβ•β•β•β•β•β–‘ + + +import os + +os.system("title Kiss Your Self") + +import sys + +try: + sys.stdout.encoding = "utf-8" +except Exception: + try: + sys.stdout.reconfigure(encoding="utf-8") + except Exception: + pass + +import time +import random +from pynput.keyboard import Key, Listener, Controller + +print( + """ +=============================================================================== +β–ˆβ–ˆβ•—β–‘β–‘β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— +β–ˆβ–ˆβ•‘β–‘β–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ•—β–‘β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•β• Kiss <=> Packaged with πŸ’ by nitLix +β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•β•β–‘β–‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–‘ Your <=> Credits for inspiration to voj +β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•—β–‘β–‘β–‘β•šβ–ˆβ–ˆβ•”β•β–‘β–‘β–‘β•šβ•β•β•β–ˆβ–ˆβ•— Self <=> In loving memory of my sanity +β–ˆβ–ˆβ•‘β–‘β•šβ–ˆβ–ˆβ•—β–‘β–‘β–‘β–ˆβ–ˆβ•‘β–‘β–‘β–‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• +β•šβ•β•β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β–‘β–‘β–‘β•šβ•β•β•β•β•β•β–‘ +=============================================================================== +""" +) +# Set up word storage + +storage = "" + +# Keys being held +held = [] + +all_selected = False + +profanity = {} +positivityModeMessage = "" + +controller = Controller() + + +def main(): + + # Set working directory to src + os.chdir(os.path.dirname(os.path.abspath(__file__))) + + try: + with open("../profanity.txt", "r") as f: + for line in f: + data = line.split("-") + profanity[data[0]] = data[1].replace("\n", "") + except FileNotFoundError: + print("Profanity file not found") + return + except Exception as e: + print(f"Error reading profanity file: {e}") + return + + try: + with open("../positivitymode.txt", "r") as f: + positivityModeMessage = f.read() + except FileNotFoundError: + print("Positivity Mode file not found") + return + except Exception as e: + print(f"Error reading Positivity Mode file: {e}") + return + + print("Imported profanity...") + + def process_key(key): + return ( + str(key) + .replace("'", "") + .replace("1", "i") + .replace("0", "o") + .replace("2", "z") + .replace("3", "e") + .replace("4", "a") + .replace("5", "s") + .replace("6", "g") + .replace("7", "t") + .replace("8", "b") + .replace("9", "g") + .lower() + ) + + nonspecial = [ + "a", + "b", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + " ", + ] + + # Set up keyboard listener + def on_press(key): + global storage + global held + global all_selected + + # convert key to string + raw_key = process_key(key) + if raw_key not in held: + held.append(raw_key) + + if len(raw_key) == 1 and "key.ctrl_l" not in held: + storage += raw_key + + if raw_key == "key.space": + storage += " " + + if raw_key == "key.enter": + storage = "" + + if raw_key == "\\xoi": + all_selected = True + + if raw_key == "\\xoe": + print("Bye bye!") + exit() + + if raw_key == "key.backspace": + if all_selected: + storage = "" + all_selected = False + return + + if "key.ctrl_l" in held: + # Cut off letters until space reached or beginning of string + special = False + space = False + erased = 0 + + if len(storage) == 0: + return + + if storage[-1] not in nonspecial: + # Start special character erase, erase until nonspecial character is reached + while True: + if len(storage) == 0: + break + + if storage[-1] in nonspecial: + break + + storage = storage[:-1] + else: + # Start normal erase. Wait until alphabet reached, then erase until space + # Stop at beginning of string + + alphabetReached = False + while True: + if len(storage) == 0: + break + + if alphabetReached and storage[-1] == " ": + break + + if storage[-1] in nonspecial and storage[-1] != " ": + alphabetReached = True + + storage = storage[:-1] + + else: + storage = storage[:-1] + + # Input processed, now scan for profanity + + for word in profanity: + # Cut storage by last len(word) and compare + if storage[-len(word) :] == word: + # Replace word by pressing backspace len(word) times + for _ in range(len(word)): + controller.press(Key.backspace) + controller.release(Key.backspace) + + message = profanity[word] + + # 10% chance to trigger P O S I T I V I T Y M O D E + if random.randint(0, 100) < 10: + message = positivityModeMessage + + # Type out the replacement + for letter in message: + controller.press(letter) + controller.release(letter) + time.sleep(0.025) + + # Don't scan for more profanity + break + + def on_release(key): + global held + + raw_key = process_key(key) + try: + held.remove(raw_key) + except Exception: + pass + + print("Ready!") + + # Collect events until released + with Listener(on_press=on_press, on_release=on_release) as listener: + listener.join() + + +main() +try: + input() +except Exception: + pass