From 04804ddd1268fd49fc4fca3896b7a1a62484867e Mon Sep 17 00:00:00 2001 From: Swee Date: Tue, 10 Sep 2024 21:59:30 -0700 Subject: [PATCH] added the rest of sweeBot (I hope so) --- cc/bap | 3 ++ cc/bruteforce-wordle | 111 +++++++++++++++++++++++++++++++++++++++++++ cc/cc | 3 ++ cc/debug/argv | 2 + cc/debug/error | 1 + cc/dystopia | 17 +++++++ cc/give | 29 +++++++++++ cc/headpat | 3 ++ cc/lmao | 12 +++++ cc/meow | 4 ++ cc/patpat | 3 ++ cc/sc-decode | 4 ++ cc/sc-encode | 4 ++ cc/sc-info | 3 ++ cc/sweecake | 42 ++++++++++++++++ helps/me | 1 + sbirc.db | Bin 0 -> 12288 bytes 17 files changed, 242 insertions(+) create mode 100644 cc/bap create mode 100644 cc/bruteforce-wordle create mode 100644 cc/cc create mode 100644 cc/debug/argv create mode 100644 cc/debug/error create mode 100644 cc/dystopia create mode 100644 cc/give create mode 100644 cc/headpat create mode 100644 cc/lmao create mode 100644 cc/meow create mode 100644 cc/patpat create mode 100644 cc/sc-decode create mode 100644 cc/sc-encode create mode 100644 cc/sc-info create mode 100644 cc/sweecake create mode 100644 helps/me create mode 100644 sbirc.db diff --git a/cc/bap b/cc/bap new file mode 100644 index 0000000..b991585 --- /dev/null +++ b/cc/bap @@ -0,0 +1,3 @@ +from random import choice +a = ['Beep!', 'T-T', 'Ow!'] +print(choice(a)) diff --git a/cc/bruteforce-wordle b/cc/bruteforce-wordle new file mode 100644 index 0000000..d79bc2a --- /dev/null +++ b/cc/bruteforce-wordle @@ -0,0 +1,111 @@ +#!/usr/bin/python3 +import enchant +from sys import argv +from random import shuffle, choice +d = enchant.Dict('en-US') +a = "abcdefghijklmnopqrstuvwxyz" +if len(argv) == 3: + print("No parameters passed, creating empty 5-letter guess...") + word = "" + for i in range(0,5): + word+=choice(a) + word = list(word) + shuffle(word) + word = "".join(word) + while not d.check(word): + word = "" + for i in range(0,5): + word+=choice(a) + word = list(word) + shuffle(word) + word = "".join(word) + print("~w " + word) +elif len(argv) == 4: + word = list(argv[3]) + for i in range(0,len(word)): + if word[i] == "_": + word[i] = choice(a) + word = "".join(word) + while not d.check(word): + word = list(argv[3]) + for i in range(0,len(word)): + if word[i] == "_": + word[i] = choice(a) + word = "".join(word) + print("~w " + word) +elif len(argv) == 5: + word = list(argv[3]) + lett = list(argv[4]) + if lett[0] != "-": + shuffle(lett) + j = 0 + for i in range(0,len(word)): + if word[i] == "_": + if choice([True, False]) and j < len(lett): + word[i] = lett[j] + j+=1 + else: + word[i] = choice(a) + word = "".join(word) + while not d.check(word): + word = list(argv[3]) + lett = list(argv[4]) + shuffle(lett) + j = 0 + for i in range(0,len(word)): + if word[i] == "_": + if choice([True, False]) and j < len(lett): + word[i] = lett[j] + j+=1 + else: + word[i] = choice(a) + word = "".join(word) + else: + lett.pop(0) + a = list(a) + for i in list(lett): + a.remove(i.lower()) + a = ''.join(a) + for i in range(0,len(word)): + if word[i] == "_": + word[i] = choice(a) + word = "".join(word) + while not d.check(word): + word = list(argv[3]) + for i in range(0,len(word)): + if word[i] == "_": + word[i] = choice(a) + word = "".join(word) + print("~w " + word) +elif len(argv) == 6: + word = list(argv[3]) + lett = list(argv[4]) + filter = list(argv[5]) + a = list(a) + for i in list(filter): + a.remove(i.lower()) + ''.join(a) + shuffle(lett) + j = 0 + for i in range(0,len(word)): + if word[i] == "_": + if choice([True, False]) and j < len(lett): + word[i] = lett[j] + j+=1 + else: + word[i] = choice(a) + word = "".join(word) + while not d.check(word): + word = list(argv[3]) + lett = list(argv[4]) + shuffle(lett) + j = 0 + for i in range(0,len(word)): + if word[i] == "_": + if choice([True, False]) and j < len(lett): + word[i] = lett[j] + j+=1 + else: + word[i] = choice(a) + word = "".join(word) + print("~w " + word) \ No newline at end of file diff --git a/cc/cc b/cc/cc new file mode 100644 index 0000000..d80ff2f --- /dev/null +++ b/cc/cc @@ -0,0 +1,3 @@ +import os +from sys import argv +print(argv[1] + ": " + ", ".join(os.listdir("/home/swee/cc"))) \ No newline at end of file diff --git a/cc/debug/argv b/cc/debug/argv new file mode 100644 index 0000000..c56fa0f --- /dev/null +++ b/cc/debug/argv @@ -0,0 +1,2 @@ +from sys import argv +print(argv) \ No newline at end of file diff --git a/cc/debug/error b/cc/debug/error new file mode 100644 index 0000000..244d70f --- /dev/null +++ b/cc/debug/error @@ -0,0 +1 @@ +raise SystemError("Test error.") \ No newline at end of file diff --git a/cc/dystopia b/cc/dystopia new file mode 100644 index 0000000..0b7a9a4 --- /dev/null +++ b/cc/dystopia @@ -0,0 +1,17 @@ +from random import choice +from sys import argv +stories = ["""an invasive species of anthropomorphic animals take over almost the entire globe. +Human society is on the line, the species keeps spreading all around the place. +You're just a human trying to live out this apocalypse, there's no place to hide anymore. +Will you continue to fight off, or will you back down to the new species?""", +"""the SCP foundation is a real thing, and a hacker has hijacked devices and TV channels to show pictures of SCP-096 +SCP-096, also known as "the shy guy" is a humanoid entity that will kill anyone who sees a picture of it, no matter how far. +You're watching TV, not aware of the incident, what could go wrong?""", +"""AI takes over the world, electronics become sentient and take revenge from humans because of the AI 'slavery.' +Cities are full of debris and blood, nowhere is safe. +What would you do in this situation?""" +] +if len(argv) == 4: + print("In a dystopian future: " + stories[int(argv[3]) - 1]) +else: + print("In a dystopian future: " + choice(stories)) \ No newline at end of file diff --git a/cc/give b/cc/give new file mode 100644 index 0000000..38aa38d --- /dev/null +++ b/cc/give @@ -0,0 +1,29 @@ +from sys import argv +import sqlite3 +conn = sqlite3.connect("/home/swee/sbirc.db") +database = conn.cursor() +def getperms(cloak: str): + try: + database.execute("SELECT * FROM users WHERE username = '"+ cloak + "';") + output = database.fetchall() + return output[0][1] + except: + return '' +if getperms(argv[2]) == "full": + if len(argv) == 5: + if argv[3] == argv[2]: + print(argv[1] + ": You wanna give yourself permissions!?") + else: + perms = getperms(argv[3]) + if perms != "": + database.execute("UPDATE users SET perms = '" + perms + "," + argv[4] + "' WHERE username = '" + argv[3] + "';") + print(argv[1] + ": Successfully appended '" + argv[4] + "' to the permissions of " + argv[3]) + else: + database.execute("INSERT INTO users (username, perms) VALUES ('" + argv[3] + "', '" + argv[4] + "');") + print(argv[1] + ": Successfully created permissions of " + argv[3] + " and set it to '" + argv[4] + "'") + else: + print(argv[1] + ": This command takes 2 arguments, only got " + str(len(argv) - 3) + ".") +else: + print(argv[1]+": Permission denied") +conn.commit() +conn.close() \ No newline at end of file diff --git a/cc/headpat b/cc/headpat new file mode 100644 index 0000000..8992c09 --- /dev/null +++ b/cc/headpat @@ -0,0 +1,3 @@ +from random import choice +a=['Prr!', "Meep!", '-w-'] +print(choice(a)) diff --git a/cc/lmao b/cc/lmao new file mode 100644 index 0000000..6ed670f --- /dev/null +++ b/cc/lmao @@ -0,0 +1,12 @@ +from os import system +from sys import argv +if len(argv) > 4: + print("This command takes one or zero arugments.") +else: + if len(argv) == 4: + print(argv[3] + ": ") + print(""" _ __ __ _ ___ +| | | \/ | / \ / _ \ +| | | |\/| | / _ \| | | | +| |___| | | |/ ___ \ |_| | +|_____|_| |_/_/ \_\___/ """) \ No newline at end of file diff --git a/cc/meow b/cc/meow new file mode 100644 index 0000000..dfb0204 --- /dev/null +++ b/cc/meow @@ -0,0 +1,4 @@ +from sys import argv +from random import choice +meows = ['Meow!', 'Nyaa~', 'Mrow.', 'Prr! :3', 'Hiss!', "Mrrp?", "Mreow.", "!woeM", "3: !rrP", "!ssiH", "~aayN", "Mew!", "Moew!"] +print(argv[1] + ": " + choice(meows)) \ No newline at end of file diff --git a/cc/patpat b/cc/patpat new file mode 100644 index 0000000..8992c09 --- /dev/null +++ b/cc/patpat @@ -0,0 +1,3 @@ +from random import choice +a=['Prr!', "Meep!", '-w-'] +print(choice(a)) diff --git a/cc/sc-decode b/cc/sc-decode new file mode 100644 index 0000000..158d55e --- /dev/null +++ b/cc/sc-decode @@ -0,0 +1,4 @@ +#!/usr/bin/python3 +import sweecrypt +from sys import argv +print(sweecrypt.decrypt(" ".join(argv[3:]))) \ No newline at end of file diff --git a/cc/sc-encode b/cc/sc-encode new file mode 100644 index 0000000..c63ee86 --- /dev/null +++ b/cc/sc-encode @@ -0,0 +1,4 @@ +#!/usr/bin/python3 +import sweecrypt +from sys import argv +print(sweecrypt.encrypt(" ".join(argv[3:]))) \ No newline at end of file diff --git a/cc/sc-info b/cc/sc-info new file mode 100644 index 0000000..74e7406 --- /dev/null +++ b/cc/sc-info @@ -0,0 +1,3 @@ +#!/usr/bin/python3 +import sweecrypt +print("SweeCrypt version " + sweecrypt.__version__) \ No newline at end of file diff --git a/cc/sweecake b/cc/sweecake new file mode 100644 index 0000000..fbe2fcf --- /dev/null +++ b/cc/sweecake @@ -0,0 +1,42 @@ +from datetime import datetime +bday = False +print() +if not (datetime.now().month == 9 and datetime.now().day == 7): + nextyear = False + if datetime.now().month >= 9: + if datetime.now().month == 9 and datetime.now().day > 7: + nextyear = True + elif datetime.now().month > 9: + nextyear = True + target_date = datetime(year=datetime.now().year + 1 if nextyear else datetime.now().year, month=9, day=7) + + # Get the current date + current_date = datetime(year=datetime.now().year, month=datetime.now().month, day=datetime.now().day) + + # Calculate the difference + days_until_target = (target_date - current_date).days + + print(f"Swee's birthday is in {days_until_target} days... This year he will become {datetime.now().year - 2010}.") +else: + print(""" + )\\ + (__) + /\\ + [[]] + @@@[[]]@@@ + @@@@@@@@@[[]]@@@@@@@@@ + @@@@@@@ [[]] @@@@@@@ + @@@@@@@@@ [[]] @@@@@@@@@ + @@@@@@@ [[]] @@@@@@@ + !@@@@@@@@@ @@@@@@@@@! + ! @@@@@@@ @@@@@@@ ! + ! @@@@@@@@@@@@@@@@@@@@@@ ! + ! @@@@@@@@@@@ ! + ! ______________ ! + ! HAPPY BIRTHDAY SWEE ! + ! -------------- ! + !!!!!!! !!!!!!! + !!!!!!! !!!!!!! + !!!!!!!!!!!!!!!!!!!!!!! +""") + print(f"Swee is now {datetime.now().year - 2010}!") \ No newline at end of file diff --git a/helps/me b/helps/me new file mode 100644 index 0000000..953c877 --- /dev/null +++ b/helps/me @@ -0,0 +1 @@ +No. \ No newline at end of file diff --git a/sbirc.db b/sbirc.db new file mode 100644 index 0000000000000000000000000000000000000000..12e5404cccaa68dd7f00142a03694435bb56a7d1 GIT binary patch literal 12288 zcmeI&$x6g990u^TaV<(bsN)7kL~w8!P-Hy1Fb6?!8}Q;Kt&ypAkt9_-dh-1GrwEtTwR=oM)JE<#lrAiGDRGR9B@tunXnhNSKVAY8LB_n z(fKp~Z#qG?1835%y6lFq58I(Z00Izz00bZa0SG_<0uX=z1O`mt+8u2)8qVva5q=~y zEtM`hdVJYA>~?tf@aVL|i-@m#`Iv}U@+YB!o>1#Mdwb1I?@_8)_hnx5#2Lv8>!Pl` zH_=7s_SG#STQ?v3_SZGT#CXm8Y;F(zXb^w^1Rwwb2tWV=5P$##AOHaf46s0c{`c4z zVc+bFeX@7<#_rh}+h^Q{Xb^w^1Rwwb2tWV=5P$##AOL{@6PWer+G73+z9oEL1ff>a zzFt>mcD&Bdk}yr$?JA!cqpRipS#qCgQ^oV6bfb)8nLf83gb78pv@}B7GsP41vy?4A zHLZMdl$yINispuC^Uua!_)_ni9-=GdN~l8JtEw$fx>cs#o;;VyZ5Cy5wKnI{jrsDo Y1c8jS{WHOXl75<+DTglqeuw