This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Developed with help from Grok by xAI. | |
| # Prompt user for Git directory | |
| read -p "Enter the Git repository directory (e.g., $HOME/.cfg): " GIT_DIR | |
| # Validate directory exists and is a Git repo | |
| if [ ! -d "$GIT_DIR" ] || ! git --git-dir="$GIT_DIR" rev-parse --git-dir >/dev/null 2>&1; then | |
| echo "Error: '$GIT_DIR' is not a valid Git repository directory." | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def onepass( target, *secrets ) | |
| output = target | |
| secrets.select{|sec| !sec.nil?}.each do |secret| | |
| output = output.bytes.inject(''){|string,byte| string + (byte^(secret[string.length] || 0.chr).ord).chr } | |
| end | |
| output | |
| end |