diff --git a/key.sh b/key.sh new file mode 100755 index 0000000..9e111db --- /dev/null +++ b/key.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# SkeletonKey wrapper script +# This script activates the virtual environment and runs SkeletonKey + +SKELETON_DIR="$HOME/.SkeletonKey" + +# Check if SkeletonKey directory exists +if [ ! -d "$SKELETON_DIR" ]; then + echo "Error: SkeletonKey not found at $SKELETON_DIR" + exit 1 +fi + +# Check if virtual environment exists +if [ ! -d "$SKELETON_DIR/venv" ]; then + echo "Error: Virtual environment not found. Please reinstall SkeletonKey." + exit 1 +fi + +# Activate virtual environment and run SkeletonKey +cd "$SKELETON_DIR" +source venv/bin/activate +python main.py "$@" diff --git a/mods/bits.py b/mods/bits.py index e919981..9a4dbbe 100644 --- a/mods/bits.py +++ b/mods/bits.py @@ -7,7 +7,16 @@ # Variables username = getpass.getuser() # Get username header = Fore.RED + f'{username}' + Fore.WHITE + '@' + Fore.RED + 'SkeletonKey $ ' + Fore.RESET # header for user input -local_path = f'/home/{username}/.SkeletonKey' if username != 'root' else '/root/.SkeletonKey' # local path to skelkey + +# Cross-platform path detection +if os.name == 'posix': # Unix-like systems (Linux, macOS) + if sys.platform == 'darwin': # macOS + local_path = f'/Users/{username}/.SkeletonKey' if username != 'root' else '/var/root/.SkeletonKey' + else: # Linux and other Unix systems + local_path = f'/home/{username}/.SkeletonKey' if username != 'root' else '/root/.SkeletonKey' +else: # Windows + local_path = f'C:\\Users\\{username}\\.SkeletonKey' + cipher = f'{local_path}/ciphers/' # local path to ciphers # Colors