|
7 | 7 |
|
8 | 8 |
|
9 | 9 | clear |
10 | | -echo " |
11 | | -
|
12 | | -██╗ ██╗███████╗██████╗ ███████╗██████╗ ██╗ ██████╗ ██╗████████╗ |
13 | | -██║ ██║██╔════╝██╔══██╗██╔════╝██╔══██╗██║ ██╔═══██╗██║╚══██╔══╝ |
14 | | -██║ █╗ ██║█████╗ ██████╔╝███████╗██████╔╝██║ ██║ ██║██║ ██║ |
15 | | -██║███╗██║██╔══╝ ██╔══██╗╚════██║██╔═══╝ ██║ ██║ ██║██║ ██║ |
16 | | -╚███╔███╔╝███████╗██████╔╝███████║██║ ███████╗╚██████╔╝██║ ██║ |
17 | | - ╚══╝╚══╝ ╚══════╝╚═════╝ ╚══════╝╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝ |
18 | | -L A B S B Y O M A R S A N T O S |
19 | | -
|
20 | | -https://websploit.org |
21 | | -Author: Omar Ωr Santos |
22 | | -Twitter: @santosomar |
23 | | -Version: 4.0 |
24 | | -
|
25 | | -A collection of tools, tutorials, resources, and intentionally vulnerable |
26 | | -applications running in Docker containers. WebSploit Labs include |
27 | | -over 500 exercises to learn and practice ethical hacking (penetration testing) skills. |
28 | | --------------------------------------------------------------------------------------- |
29 | | -" |
30 | | - |
31 | 10 |
|
32 | | -read -n 1 -s -r -p "Press any key to continue the setup..." |
| 11 | +print_banner() { |
| 12 | + # Define Colors and Styles using tput |
| 13 | + local bold reset blue green yellow cyan |
| 14 | + bold=$(tput bold) |
| 15 | + reset=$(tput sgr0) # Resets all attributes |
| 16 | + |
| 17 | + # Check if terminal supports colors (at least 8) |
| 18 | + if [[ $(tput colors) -ge 8 ]]; then |
| 19 | + blue=$(tput setaf 4) |
| 20 | + # green=$(tput setaf 2) # Uncomment if you want to use green later |
| 21 | + yellow=$(tput setaf 3) # Good for prompts |
| 22 | + cyan=$(tput setaf 6) # Nice for titles or key info |
| 23 | + else |
| 24 | + # Set to empty if no color support; bold might still work |
| 25 | + blue="" |
| 26 | + green="" |
| 27 | + yellow="" |
| 28 | + cyan="" |
| 29 | + reset="" |
| 30 | + fi |
| 31 | + |
| 32 | + clear |
| 33 | + # Use cyan for the top/bottom separators and title |
| 34 | + echo "${bold}${blue}======================================================================${reset}" |
| 35 | + echo "${bold}${cyan} WebSploit Labs Installer (v4.0)${reset}" |
| 36 | + echo "${bold}${blue}======================================================================${reset}" |
| 37 | + echo # Blank line for spacing |
| 38 | + |
| 39 | + # Use bold for labels, standard text for values, blue for URL |
| 40 | + echo " ${bold}Author:${reset} Omar Ωr Santos" |
| 41 | + echo " ${bold}Web:${reset} ${blue}https://websploit.org${reset}" # Make URL stand out |
| 42 | + echo " ${bold}Twitter:${reset} @santosomar" |
| 43 | + echo # Blank line |
| 44 | + |
| 45 | + # Description in standard text |
| 46 | + echo " This script will install the tools, configurations, and Docker" |
| 47 | + echo " containers required for the WebSploit Labs learning environment." |
| 48 | + echo # Blank line |
| 49 | + echo "----------------------------------------------------------------------" |
| 50 | + echo # Blank line |
| 51 | + |
| 52 | + # Use yellow for the prompt to draw attention |
| 53 | + read -n 1 -s -r -p "${yellow}Press any key to continue the setup...${reset}" |
| 54 | + echo # Add a newline after the keypress for cleaner subsequent output |
| 55 | +} |
| 56 | + |
| 57 | +print_banner |
33 | 58 |
|
34 | 59 | set -e # Exit immediately if a command exits with a non-zero status |
35 | 60 | set -u # Treat unset variables as an error |
|
0 commit comments