A ZSH-based interactive tool for managing environment variables and credential sets commonly used in penetration testing workflows, particularly for OSCP+ scenarios.
- Interactive Variable Management: Easy-to-use interface for setting and managing 11 common penetration testing variables
- Credential Set Management: Store and switch between multiple credential sets with different authentication methods
- Export Functionality: Export credentials to files for use with other tools
- Persistent Storage: Variables and credential sets are saved to
~/.config/.my_vars.env - Color-coded Interface: Easy-to-read colored output for better user experience
- Multiple Authentication Types: Support for passwords, NT hashes, and AES keys
OUTDIR- Output directory for exportsC2- Command & Control serverTARGET- Target IP/hostnameTARGETS- Multiple targetsCIDR- Network CIDR notationDC- Domain ControllerDOMAIN- Domain nameUSER- UsernamePASSWORD- PasswordNT_HASH- NT hash for pass-the-hash attacksAES_KEY- AES key for Kerberos authentication
- ZSH shell (version 5.0 or higher)
- Standard Unix tools:
grep,mv,rm,mkdir,printf - Terminal with color support (recommended)
- Clone the repository:
git clone https://github.com/yourusername/var-tool.git
cd var-tool- Make the script executable:
chmod +x var.sh- Source the script:
source var.shStart the interactive interface:
source var.sh# Show help
source var.sh -h
# List all variables and credential sets
source var.sh -l
# Source environment file and show variables
source var.sh -s
# Delete all data
source var.sh -dOnce in interactive mode:
- 1-11: Edit variables by number
- 12+: Load credential sets by number
- A: Add new credential set
- E: Edit existing credential set
- D: Delete credential set
- X: Export credentials to files
- C: Clear all data
- Q: Exit
Credential sets allow you to store and quickly switch between different user credentials. Each set can contain:
- Username
- Password (for password authentication)
- NT Hash (for pass-the-hash attacks)
- AES Key (for Kerberos authentication)
- Target (optional associated target)
The export feature creates two files in your specified OUTDIR:
users.txt- List of usernamespasswords.txt- List of passwords
This is useful for tools that require separate user and password files.
- The configuration file is stored at
~/.config/.my_vars.env - Ensure proper file permissions on your config directory
- Be cautious when storing sensitive credentials
- Consider using the tool in isolated environments for testing
# Start the tool
source var.sh
# Set basic variables
1 # Enter OUTDIR: /home/user/output
2 # Enter C2: 192.168.1.100
3 # Enter TARGET: 192.168.1.50
7 # Enter DOMAIN: example.local
# Add credential set
A # Add credential set
# Name: admin-creds
# Username: administrator
# Password: Password123!# Source saved variables
source var.sh -s
# Or start interactive mode to switch credential sets
source var.sh- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is intended for authorized penetration testing and educational purposes only. Users are responsible for complying with applicable laws and regulations.
If you encounter any issues or have questions, please open an issue on GitHub.
