Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/perimora/cve_2022_0492
Privilege EscalationVulnerability AnalysisExploitationLearning & EducationContainer Escape
GitHubperimora/cve_2022_0492

cve_2022_0492

PoC for CVE-2022-0492

View Repository
11 year agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Shell Script Template

A modern Bash script template with colorized output formatting and utility functions for creating professional command-line tools.

Features

  • 🎨 Colorized Output: Pre-defined color schemes and formatting functions
  • 📝 Standardized Messages: Consistent info, success, warning, and error message formats
  • 🔧 Utility Functions: Ready-to-use functions for common shell script operations
  • 📦 Modular Design: Separate library file for easy reuse across projects
  • ⚡ Easy Setup: Simple sourcing mechanism for immediate use

Quick Start

  1. Clone or download this template
  2. Make your script executable:
    root@kitploit:~
    chmod +x script.sh
    
  3. Run the example script:
    root@kitploit:~
    ./script.sh
    

Usage

Basic Template Structure

root@kitploit:~
#!/bin/bash

LIB="lib"
source $LIB/format.sh

section "Your Script Section"
info "Information message"
ok "Success message" 
warn "Warning message"
error "Error message"

Available Functions

Message Types

  • info "message" - Displays informational messages with cyan [i] prefix
  • ok "message" - Displays success messages with green [+] prefix
  • warn "message" - Displays warning messages with yellow [!] prefix
  • error "message" - Displays error messages with red [-] prefix (sent to stderr)

Interactive Functions

  • prompt "question" - Displays a prompt with magenta [?] prefix and waits for user input
  • section "title" - Creates a formatted section header

Text Formatting

  • bold "text" - Displays text in bold formatting

Color Constants

The following color constants are available for custom formatting:

root@kitploit:~
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
MAGENTA='\033[0;35m'
CYAN='\033[0;36m'
WHITE='\033[1;37m'
BOLD='\033[1m'
UNDERLINE='\033[4m'
RESET='\033[0m'

Example Output

When you run the example script, you'll see:

root@kitploit:~
=== Start ===
[i] Running exploit setup...
[+] Everything is ready
[!] This might break your system
[-] Something failed
[?] Continue? [y/N]:

File Structure

root@kitploit:~
shell_template/
├── script.sh          # Example script demonstrating usage
├── lib/
│   └── format.sh       # Core formatting library
├── LICENSE             # MIT License
└── README.md          # This file

Customization

Adding New Message Types

You can extend the library by adding new message types in lib/format.sh:

root@kitploit:~
DEBUG="${BLUE}[D]${RESET}"
debug() { echo -e "${DEBUG} $*"; }

Custom Colors

Define your own color schemes by modifying the color constants or creating new ones:

root@kitploit:~
PURPLE='\033[0;35m'
CUSTOM_PREFIX="${PURPLE}[*]${RESET}"
custom() { echo -e "${CUSTOM_PREFIX} $*"; }

Best Practices

  1. Always source the library: Include source $LIB/format.sh at the beginning of your scripts
  2. Use appropriate message types: Choose the right function for the context (info, ok, warn, error)
  3. Structure with sections: Use section to organize your script output
  4. Handle errors properly: Use error for error messages and redirect to stderr
  5. Make scripts executable: Don't forget chmod +x for your scripts

Contributing

Feel free to submit issues, fork the repository, and create pull requests for any improvements.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Created by Christoph Huy

Download Tool