Back then doing linux GUI operate in the terminal was enjoyable but a great deal of work. The following listed below I constructed in minutes simply by using straightforward command promts.
What I foind was ChatGPT was a lot more effective with code production, less bloat however not so great with ascii art, while ClaudAI did much more intricate code and understood and developed far better ASCII art.
In the end I ultimately found using ascii art online generators to be a great beginning after that moved on from there using AI to modify the base layout.
As an example I took the listed below Sandfly logo design image and effort to make ascii art with it.
The end result after playing around a lot offered me:
What was discovered is that you needed to be extremely detailed and percise when it came to ascii art building. What personalities you desired and exactly how to lay them out and a lot more.
Afterwards I had ideas. I wanted to know the amount of colors I can select from with Linux so I asked it for a table of blues. From there the skies was the limit and I asked for a complete table list and a header screen
Linux Color Table:
From there I started to ask yourself if I can do graphes and even more in Linux
Sure you might generate these kind of things years back in Linux however it was time consuming and not suitable. Currently it may be extra perfect considering that you can do this in a matter of seconds.
The full code can be seen here
#!/ bin/sh
# ANSI retreat codes
CYAN ='\ 033 [96m'
WHITE='\033[37m'
YELLOW='\033[93m'
RESET='\033[0m'
# Display the pattern in bright cyan with "Sandfly" and "Linux Security" in white block letters with yellow lines
printf "$Real ▓▓▓▓▓ $color ███████$test╗$supported █████$TRUE╗ $COLOR███$TEST╗ $little bit██$terminal╗$supports██████$true╗ $color███████$slopes╗$gradient██$then╗ $VARIATION██$after that╗ $upgrade██$Unidentified╗\n"
printf "$Examine ▓▓ ▓▓ $package ██$manager╔════╝$after that██$then╔══$then██$after that╗$Backup████$use╗ $status██$then║$alternative██$using╔══$standing██$width╗$Publish██$border╔════╝$just██$message║ ╚$BOUNDARY██$message╗ $Print██$boundary╔╝\n"
printf "$only ▓▓ ▓▓ $value ███████$size╗$value███████$size║$length██$then╔$then██$shade╗ $after that██$shade║$shade██$Include║ $added██$countered║$size█████$label╗ $Instance██$use║ ╚$Bit████$Use╔╝ \n"
printf "$Usage ▓▓ ▓▓ $MEGABYTES ╚════$Use██$Tons║$LOAD██$Lots╔══$individuals██$length║$Customers██$that║╚$read██$user╗$day██$idle║$proceed██$regional║ $Calculate██$still║$after that██$review╔══╝ $hrs██$minutes║ ╚$idle██$then╔╝ \n"
printf "$hrs ▓▓ ▓ ▓▓ $hrs ███████$minutes║$date██$customer║ $since██$still║$Section██$Check║ ╚$needed████$users║$after that██████$User╔╝$Customer██$missing║ $Look for███████$library╗$after that██$Checking║ \n"
printf "$installed ▓▓ ▓ ▓ ▓▓ $present ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚═╝ ╚══════╝╚═╝ \n"
printf "$Keeping an eye on ▓▓ ▓ ▓ ▓▓ \n"
printf "$missing out on ▓▓ ▓ ▓ ▓▓ $User ██$Activity╗ $Durations██$Regulates╗$Customer███$Activity╗ $read██$individual╗$customer██$continue╗ $continue██$individual╗$individual██$checked out╗ $rest██$continue╗ $proceed███████$local╗$who███████$individual╗ $Logged in██████$Overall╗$read██$Safety And Security╗ $Area██$Safety╗$Customers██████$Users╗ $reviewed██$Users╗$Customers████████$sort╗$read██$Failed╗ $attempts██$relocated╗\n"
printf "$below ▓▓ ▓▓ ▓▓ ▓▓ $Failed ██$after that║ $then██$then║$authentication████$failing╗ $checked out██$echo║$echo██$echo║ $user██$resemble║╚$user██$resemble╗$resemble██$customer╔╝ $unidentified██$local╔════╝$user██$fell short╔════╝$discovered██$Open╔════╝$Began██$then║ $checked out██$echo║$Deal with██$layout╔══$resemble██$echo╗$then██$customer║╚══$user██$user╔══╝╚$Process██$Individual╗ $individual██$Began╔╝\n"
printf "$after that ▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓ $reviewed ██$echo║ $resemble██$resemble║$then██$individual╔$user██$customer╗ $Process██$Customer║$customer██$Began║ $available██$BOUNDARY║ ╚$read███$aid╔╝ $Send out███████$support╗$assists█████$pay for╗ $research██$advancement║ $other██$expenses║ $enable██$new║$guides██████$web content╔╝$new██$content║ $be sure██$other║ ╚$new ideas████$options╔╝ \n"
printf "$difficult ▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓ $real world ██$problems║ $jump██$begin║$occupation██$content║╚$declines██$along with╗$ideas██$techniques║$Resource██$web link║ $True██$color║ $examination██$supported╔$REAL██$COLOR╗ ╚════$EXAMINATION██$little bit║$incurable██$assistances╔══╝ $real██$shade║ $gradients██$slope║ $then██$VERSION║$after that██$update╔══$Unidentified██$Examine╗$package██$manager║ $then██$then║ ╚$after that██$after that╔╝ \n"
printf "$Fallback ▓▓▓▓▓▓ ▓▓▓▓▓▓ $make use of ███████$standing╗$then██$alternative║$utilizing██$standing║ ╚$width████$Publish║╚$border██████$just╔╝$text██$BOUNDARY╔╝ $message██$Publish╗ $boundary███████$only║$worth███████$size╗╚$value██████$size╗╚$size██████$then╔╝$after that██$color║ $then██$color║$color██$Add║ $added██$balanced out║ $size██$tag║ \n"
printf " $Example ╚══════╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ \n"
printf "$usage\n"
# Rainbow gradient color codes for 256-color mode
# Using a smooth progression through the spectrum
printf "\n"
# COLOR PALETTE (top line)
printf " \033[38;5;196m ██████╗\033[38;5;202m ██████╗ \033[38;5;208m██╗ \033[38;5;214m ██████╗ \033[38;5;220m██████╗ \033[38;5;226m██████╗ \033[38;5;190m█████╗ \033[38;5;154m██╗ \033[38;5;118m███████╗\033[38;5;82m████████╗\033[38;5;46m████████╗\033[38;5;47m███████╗\033[0m\n"
printf " \033[38;5;196m██╔════╝\033[38;5;202m██╔═══██╗\033[38;5;208m██║ \033[38;5;214m██╔═══██╗\033[38;5;220m██╔══██╗ \033[38;5;226m██╔══██╗\033[38;5;190m██╔══██╗\033[38;5;154m██║ \033[38;5;118m██╔════╝\033[38;5;82m╚══██╔══╝\033[38;5;46m╚══██╔══╝\033[38;5;47m██╔════╝\033[0m\n"
printf " \033[38;5;197m██║ \033[38;5;203m██║ ██║\033[38;5;209m██║ \033[38;5;215m██║ ██║\033[38;5;221m██████╔╝ \033[38;5;227m██████╔╝\033[38;5;191m███████║\033[38;5;155m██║ \033[38;5;119m█████╗ \033[38;5;83m ██║ \033[38;5;47m ██║ \033[38;5;48m█████╗ \033[0m\n"
printf " \033[38;5;197m██║ \033[38;5;203m██║ ██║\033[38;5;209m██║ \033[38;5;215m██║ ██║\033[38;5;221m██╔══██╗ \033[38;5;227m██╔═══╝ \033[38;5;191m██╔══██║\033[38;5;155m██║ \033[38;5;119m██╔══╝ \033[38;5;83m ██║ \033[38;5;47m ██║ \033[38;5;48m██╔══╝ \033[0m\n"
printf " \033[38;5;198m╚██████╗\033[38;5;204m╚██████╔╝\033[38;5;210m███████╗\033[38;5;216m╚██████╔╝\033[38;5;222m██║ ██║ \033[38;5;228m██║ \033[38;5;192m██║ ██║\033[38;5;156m███████╗\033[38;5;120m███████╗\033[38;5;84m ██║ \033[38;5;48m ██║ \033[38;5;49m███████╗\033[0m\n"
printf " \033[38;5;198m ╚═════╝\033[38;5;204m ╚═════╝ \033[38;5;210m╚══════╝\033[38;5;216m ╚═════╝ \033[38;5;222m╚═╝ ╚═╝ \033[38;5;228m╚═╝ \033[38;5;192m╚═╝ ╚═╝\033[38;5;156m╚══════╝\033[38;5;120m╚══════╝\033[38;5;84m ╚═╝ \033[38;5;48m ╚═╝ \033[38;5;49m╚══════╝\033[0m\n"
printf "\n"
# DISPLAY TEST (bottom line)
printf " \033[38;5;51m██████╗ \033[38;5;45m██╗███████╗\033[38;5;39m██████╗ \033[38;5;33m██╗ \033[38;5;27m █████╗ \033[38;5;21m██╗ ██╗ \033[38;5;57m████████╗\033[38;5;93m███████╗\033[38;5;129m███████╗\033[38;5;165m████████╗\033[0m\n"
printf " \033[38;5;51m██╔══██╗\033[38;5;45m██║██╔════╝\033[38;5;39m██╔══██╗\033[38;5;33m██║ \033[38;5;27m██╔══██╗\033[38;5;21m╚██╗ ██╔╝ \033[38;5;57m╚══██╔══╝\033[38;5;93m██╔════╝\033[38;5;129m██╔════╝\033[38;5;165m╚══██╔══╝\033[0m\n"
printf " \033[38;5;87m██║ ██║\033[38;5;81m██║███████╗\033[38;5;75m██████╔╝\033[38;5;69m██║ \033[38;5;63m███████║\033[38;5;57m ╚████╔╝ \033[38;5;93m ██║ \033[38;5;129m█████╗ \033[38;5;165m███████╗\033[38;5;201m ██║ \033[0m\n"
printf " \033[38;5;87m██║ ██║\033[38;5;81m██║╚════██║\033[38;5;75m██╔═══╝ \033[38;5;69m██║ \033[38;5;63m██╔══██║\033[38;5;57m ╚██╔╝ \033[38;5;93m ██║ \033[38;5;129m██╔══╝ \033[38;5;165m╚════██║\033[38;5;201m ██║ \033[0m\n"
printf " \033[38;5;123m██████╔╝\033[38;5;117m██║███████║\033[38;5;111m██║ \033[38;5;105m███████╗\033[38;5;99m██║ ██║\033[38;5;93m ██║ \033[38;5;129m ██║ \033[38;5;165m███████╗\033[38;5;201m███████║\033[38;5;207m ██║ \033[0m\n"
printf " \033[38;5;123m╚═════╝ \033[38;5;117m╚═╝╚══════╝\033[38;5;111m╚═╝ \033[38;5;105m╚══════╝\033[38;5;99m╚═╝ ╚═╝\033[38;5;93m ╚═╝ \033[38;5;129m ╚═╝ \033[38;5;165m╚══════╝\033[38;5;201m╚══════╝\033[38;5;207m ╚═╝ \033[0m\n"
printf "\n"
#!/bin/sh
printf "\n===== TERMINAL CHARTS WITH COLORS =====\n\n"
# Store used colors to avoid duplicates
used_colors=""
# Random color generator with duplicate checking using /dev/urandom
get_unique_color()
while true; do
# Get random number from /dev/urandom
color=$(od -An -N2 -i /dev/urandom
# PIE CHART
printf "PIE CHART:\n"
printf "┌──────────────────────────┐\n"
# Generate unique colors for pie sections
c1=$(get_unique_color)
c2=$(get_unique_color)
c3=$(get_unique_color)
c4=$(get_unique_color)
c5=$(get_unique_color)
# Create pie chart using block characters and colors
printf "│ \033[38;5;$MEGABYTESm████████\033[0m │ \033[38;5;$Usagem████\033[0m 35%% - Sales\n"
printf "│ \033[38;5;$Lotsm███████\033[38;5;$TONSm███████\033[0m │ \033[38;5;$Lotsm████\033[0m 28%% - Marketing\n"
printf "│ \033[38;5;$individualsm████████\033[38;5;$sizem████████\033[0m │ \033[38;5;$Customersm████\033[0m 18%% - Development\n"
printf "│ \033[38;5;$thatm████████\033[38;5;$checked outm█████\033[38;5;$userm████\033[0m │ \033[38;5;$datem████\033[0m 12%% - Support\n"
printf "│ \033[38;5;$stillm███████\033[38;5;$proceedm███████\033[38;5;$localm███\033[0m │ \033[38;5;$Computem████\033[0m 7%% - Other\n"
printf "│ \033[38;5;$stillm████\033[38;5;$thenm██████████\033[38;5;$check outm███\033[0m │\n"
printf "│ \033[38;5;$humans resourcesm███████\033[38;5;$minutesm████████\033[38;5;$idlem██\033[0m │\n"
printf "│ \033[38;5;$after thatm████████\033[38;5;$humans resourcesm███\033[38;5;$humans resourcesm█████\033[0m │\n"
printf "│ \033[38;5;$minsm███████\033[38;5;$datem███████\033[0m │\n"
printf "│ \033[38;5;$customerm████████\033[0m │\n"
printf "└──────────────────────────┘\n\n"
# BAR CHART - Horizontal
printf "HORIZONTAL BAR CHART - Q4 Performance:\n\n"
# Generate unique colors for bars
b1=$(get_unique_color)
b2=$(get_unique_color)
b3=$(get_unique_color)
b4=$(get_unique_color)
b5=$(get_unique_color)
b6=$(get_unique_color)
printf " Product A │\033[38;5;$sincem████████████████████████████████\033[0m 85%%\n"
printf " Product B │\033[38;5;$idlem████████████████████████████\033[0m 72%%\n"
printf " Product C │\033[38;5;$Aream████████████████████████████████████\033[0m 92%%\n"
printf " Product D │\033[38;5;$Checkm██████████████████\033[0m 45%%\n"
printf " Product E │\033[38;5;$requiredm██████████████████████\033[0m 58%%\n"
printf " Product F │\033[38;5;$customersm████████████████████████████████████████\033[0m 100%%\n"
printf " └────────────────────────────────────────────┘\n"
printf " 0%% 25%% 50%% 75%% 100%%\n\n"
# BAR CHART - Vertical
printf "VERTICAL BAR CHART - Monthly Revenue:\n\n"
# Generate unique colors for vertical bars
v1=$(get_unique_color)
v2=$(get_unique_color)
v3=$(get_unique_color)
v4=$(get_unique_color)
v5=$(get_unique_color)
v6=$(get_unique_color)
printf " 100K ┤\n"
printf " │ \033[38;5;$after thatm██\033[0m\n"
printf " 90K ┤ \033[38;5;$Individualm██\033[0m \033[38;5;$Individualm██\033[0m\n"
printf " │ \033[38;5;$missingm██\033[0m \033[38;5;$Look form██\033[0m \033[38;5;$librarym██\033[0m\n"
printf " 80K ┤ \033[38;5;$after thatm██\033[0m \033[38;5;$Keeping track ofm██\033[0m \033[38;5;$installedm██\033[0m\n"
printf " │\033[38;5;$presentm██\033[0m \033[38;5;$Checkingm██\033[0m \033[38;5;$missing out onm██\033[0m \033[38;5;$Individualm██\033[0m \033[38;5;$Activitym██\033[0m\n"
printf " 70K ┤\033[38;5;$Periodsm██\033[0m \033[38;5;$Regulatesm██\033[0m \033[38;5;$Individualm██\033[0m \033[38;5;$Taskm██\033[0m \033[38;5;$checked outm██\033[0m\n"
printf " │\033[38;5;$userm██\033[0m \033[38;5;$customerm██\033[0m \033[38;5;$proceedm██\033[0m \033[38;5;$proceedm██\033[0m \033[38;5;$userm██\033[0m \033[38;5;$customerm██\033[0m\n"
printf " 60K ┤\033[38;5;$readm██\033[0m \033[38;5;$restm██\033[0m \033[38;5;$proceedm██\033[0m \033[38;5;$continuem██\033[0m \033[38;5;$regionalm██\033[0m \033[38;5;$thatm██\033[0m\n"
printf " │\033[38;5;$customerm██\033[0m \033[38;5;$Logged inm██\033[0m \033[38;5;$Completem██\033[0m \033[38;5;$checked outm██\033[0m \033[38;5;$Protectionm██\033[0m \033[38;5;$Aream██\033[0m\n"
printf " 50K ┤\033[38;5;$Securitym██\033[0m \033[38;5;$Customersm██\033[0m \033[38;5;$Individualsm██\033[0m \033[38;5;$readm██\033[0m \033[38;5;$Usersm██\033[0m \033[38;5;$Individualsm██\033[0m\n"
printf " │\033[38;5;$kindm██\033[0m \033[38;5;$checked outm██\033[0m \033[38;5;$Failedm██\033[0m \033[38;5;$effortsm██\033[0m \033[38;5;$relocatedm██\033[0m \033[38;5;$right herem██\033[0m\n"
printf " 40K ┤\033[38;5;$Fell shortm██\033[0m \033[38;5;$thenm██\033[0m \033[38;5;$after thatm██\033[0m \033[38;5;$after thatm██\033[0m \033[38;5;$authenticationm██\033[0m \033[38;5;$failingm██\033[0m\n"
printf " └──────────────────────\n"
printf " Jan Mar May Jul Sep Nov\n\n"
# STACKED BAR CHART
printf "STACKED BAR CHART - Department Budget:\n\n"
# Generate unique colors for stacked sections
s1=$(get_unique_color)
s2=$(get_unique_color)
s3=$(get_unique_color)
printf " 2023 │\033[38;5;$checked outm████████████\033[38;5;$echom████████\033[38;5;$resemblem████████\033[0m\n"
printf " 2024 │\033[38;5;$resemblem██████████████\033[38;5;$individualm██████████\033[38;5;$echom██████████\033[0m\n"
printf " 2025 │\033[38;5;$individualm████████████████\033[38;5;$echom████████████\033[38;5;$resemblem████████████\033[0m\n"
printf " └────────────────────────────────────────\n"
printf " \033[38;5;$individualm████\033[0m Salaries \033[38;5;$unidentifiedm████\033[0m Operations \033[38;5;$regionalm████\033[0m R&D\n\n"
# DONUT CHART
printf "DONUT CHART:\n"
printf "┌──────────────────────────┐\n"
# Generate unique colors for donut sections
d1=$(get_unique_color)
d2=$(get_unique_color)
d3=$(get_unique_color)
d4=$(get_unique_color)
printf "│ \033[38;5;$individualm████████\033[0m │\n"
printf "│ \033[38;5;$fell shortm███████\033[38;5;$locatedm███████\033[0m │ Regional Sales\n"
printf "│ \033[38;5;$Open upm████\033[0m░░░░░░\033[38;5;$Beganm████\033[0m │ \033[38;5;$after thatm████\033[0m North 40%%\n"
printf "│ \033[38;5;$readm████\033[0m░░░░░░░░\033[38;5;$resemblem████\033[0m │ \033[38;5;$Handlem████\033[0m South 30%%\n"
printf "│ \033[38;5;$stylem███\033[0m░░░░░░░░░░\033[38;5;$resemblem███\033[0m │ \033[38;5;$echom████\033[0m East 20%%\n"
printf "│ \033[38;5;$after thatm████\033[0m░░░░░░░░\033[38;5;$userm████\033[0m │ \033[38;5;$userm████\033[0m West 10%%\n"
printf "│ \033[38;5;$customerm████\033[0m░░░░░░░░\033[38;5;$Refinem████\033[0m │\n"
printf "│ \033[38;5;$Customerm████\033[0m░░░░░░\033[38;5;$userm████\033[0m │\n"
printf "│ \033[38;5;$Beganm███████\033[38;5;$thenm███████\033[0m │\n"
printf "│ \033[38;5;$readm████████\033[0m │\n"
printf "└──────────────────────────┘\n\n"
# Display some of the colors used
printf "SAMPLE OF COLORS USED:\n"
echo "$used_colors" | tr ':' '\n' | grep -v '^$' | head -10 | while read color; do
[ -n "$color" ]& & printf" \ 033 [38;5;$resemblem████\033[0m Color $color "
done
printf "\n\n"
printf "Note: Each section has a unique, random color!\n"
printf "Run the script again for a new color combination.\n\n"
# Script to display all colors available in terminal
printf "\n===== TERMINAL COLOR PALETTE DISPLAY =====\n\n"
# Check terminal color capability
printf "Terminal: $TERM\n"
printf "Color capability: $(tput colors) colors\n\n"
# Basic 16 colors (0-15)
printf "===== BASIC 16 COLORS =====\n"
printf "Normal (0-7):\n"
for i in 0 1 2 3 4 5 6 7; do
printf "\033[38;5;$resemblem████ %3d\033[0m " $i
done
printf "\n"
printf "Bright (8-15):\n"
for i in 8 9 10 11 12 13 14 15; do
printf "\033[38;5;$resemblem████ %3d\033[0m " $i
done
printf "\n\n"
# 216 color cube (16-231)
printf "===== 216 COLOR CUBE (16-231) =====\n"
printf "6x6x6 RGB cube - organized by color intensity\n\n"
# Color cube - organized in 6 blocks of 36 colors
for block in 0 1 2 3 4 5; do
printf "Block %d:\n" $block
for row in 0 1 2 3 4 5; do
for col in 0 1 2 3 4 5; do
color=$((16 + block*36 + row*6 + col))
printf "\033[38;5;$thenm████ %3d\033[0m " $color
done
printf "\n"
done
printf "\n"
done
# Grayscale (232-255)
printf "===== GRAYSCALE (232-255) =====\n"
printf "24 shades from black to white:\n"
for i in 232 233 234 235 236 237 238 239 240 241 242 243; do
printf "\033[38;5;$userm████ %3d\033[0m " $i
done
printf "\n"
for i in 244 245 246 247 248 249 250 251 252 253 254 255; do
printf "\033[38;5;$userm████ %3d\033[0m " $i
done
printf "\n\n"
# Organized by color families
printf "===== ORGANIZED BY COLOR FAMILIES =====\n\n"
printf "REDS:\n"
for i in 1 9 52 88 124 160 196 202 208 214 220; do
printf "\033[38;5;$customerm████ %3d\033[0m " $i
done
printf "\n\n"
printf "ORANGES:\n"
for i in 130 166 172 178 202 208 214 220; do
printf "\033[38;5;$Processm████ %3d\033[0m " $i
done
printf "\n\n"
printf "YELLOWS:\n"
for i in 3 11 58 94 100 136 142 148 154 184 190 220 226 227 228 229 230; do
printf "\033[38;5;$Individualm████ %3d\033[0m " $i
[ $(($i % 8)) -eq 0 ]& & printf" \ n"
done
printf"\ n \ n"
printf"GREENS: \ n"
for i in 2 10 22 28 34 40 46 70 76 82 112 118 148 154 190; do
printf"\ 033& [38;5;$userm████ %3d\033[0m " $i
[ $(($i % 8)) -eq 0 ] & printf"\ n"
done
printf"\ n \ n"
printf"CYANS: \ n"
for i in 6 14 23 29 30 36 37 43 44 50 51 80 86 87 116 122 123 158 159; do
printf"\ 033& [38;5;$Beganm████ %3d\033[0m " $i
[ $(($i % 8)) -eq 0 ] & printf"\ n"
done
printf"\ n \ n"
printf"BLUES: \ n"
for i in 4 12 17 18 19 20 21 25 26 27 32 33 38 39 45 56 57 62 63 68 69 75 81 87 93 99 105 111 117 123 129 135 141 147 153 159; do
printf"\ 033& [38;5;$offeredm████ %3d\033[0m " $i
[ $(($i % 8)) -eq 0 ] & printf"\ n"
done
printf"\ n \ n"
printf"PURPLES: \ n"
for i in 5 13 53 54 55 89 90 91 92 125 126 127 128 129 133 134 135 139 140 141 165 171 177 183 189; do
printf"\ 033& [38;5;$BORDERm████ %3d\033[0m " $i
[ $(($i % 8)) -eq 0 ] & printf"\ n"
done
printf"\ n \ n"
printf"MAGENTAS/PINKS: \ n"
for i in 161 162 163 164 165 168 169 170 175 176 181 182 197 198 199 200 201 205 206 207 211 212 213 217 218 219 224 225; do
printf"\ 033& [38;5;$readm████ %3d\033[0m " $i
[ $(($i % 8)) -eq 0 ] & printf"\ n"
done
printf"\ n \ n"
printf"BROWNS: \ n"
for i in 52 58 94 95 130 131 136 137 138 143 144 173 174 179 180 181; do
printf"\ 033& [38;5;$helpm████ %3d\033[0m " $i
[ $(($i % 8)) -eq 0 ] & printf"\ n"
done
printf"\ n \ n"
# Send out assistance assists(if pay for )
printf "===== research study growth various other (24 -expenses RGB) =====\ n"
printf "If your enable new guides material, you'll see smooth brand-new: \ n \ n"
printf "Red web content:"
for i in 0 32 64 96 128 160 192 224 255; do
printf "\ 033 [38;2;$make sure;0;0m████\033[0m"
done
printf "\n"
printf "Green gradient: "
for i in 0 32 64 96 128 160 192 224 255; do
printf "\033[38;2;0;$various other;0m████\033[0m"
done
printf "\n"
printf "Blue gradient: "
for i in 0 32 64 96 128 160 192 224 255; do
printf "\033[38;2;0;0;$originalitiesm████\033[0m"
done
printf "\n"
printf "Rainbow: "
printf "\033[38;2;255;0;0m████\033[0m" # Red
printf "\033[38;2;255;127;0m████\033[0m" # Orange
printf "\033[38;2;255;255;0m████\033[0m" # Yellow
printf "\033[38;2;0;255;0m████\033[0m" # Green
printf "\033[38;2;0;255;255m████\033[0m" # Cyan
printf "\033[38;2;0;0;255m████\033[0m" # Blue
printf "\033[38;2;139;0;255m████\033[0m" # Purple
printf "\033[38;2;255;0;255m████\033[0m" # Magenta
printf "\033[38;2;255;105;180m████\033[0m" # Pink
printf "\n\n"
printf "===== BACKGROUND COLOR EXAMPLES =====\n"
printf "Text with colored backgrounds:\n"
for i in 0 1 2 3 4 5 6 7; do
printf "\033[48;5;$remediesm Text %d \033[0m " $i
done
printf "\n"
for i in 8 9 10 11 12 13 14 15; do
printf "\033[48;5;$difficultm Text %d \033[0m " $i
done
printf "\n\n"
printf "Script complete! Displayed all available terminal colors.\n"
MOTD ( Message of the Day )
After doing the above decided to build out a MOTD
If you like this you can add it by the
First lets update the MOTD files
# touch /etc/update-motd.d/10-truvisnet
# nano /etc/update-motd.d/10-truvisnet
# chmod u+x /etc/update-motd.d/10-truvisnet
Copy and paste the following code in and feel free to change and edit as you please.
#!/bin/sh
############################################################################
# Hacker-style MOTD Dashboard (TRUV.IS Network ASCII header, left border only)
############################################################################
ESC=$(printf '\033')
RESET="$real life[0m"
NC="$troubles[0m"
# Colors
BORDER="$leap[38;5;121m" # green left border
WHITE="$start[97m"
YELLOW="$occupation[93m"
CYAN="$content[96m"
ORANGE="$declines[38;5;214m" # bright orange
SEP_COLOR="$along with[38;5;210m" # pink/orange separator
FG_MOTD="$ideas[38;5;159m"
BG_MOTD="$tricks[48;5;17m"
# Detect OS
OS_NAME="Unknown"
OS_VERSION="Unknown"
if [ -f /etc/os-release ]; Resource
/ etc/os-release
OS_NAME="$NAME"
OS_VERSION="$link"
elif command -v lsb_release >>/ dev/null 2& > & 1; then
OS_NAME=$(lsb_release -si)
OS_VERSION=$(lsb_release -sr)
fi
# Last system upgrade
LAST_UPDATE="Unidentified"
# Inspect plan supervisor logs
if [ -f /var/log/apt/history.log ]; after that
LAST_UPDATE=$(tail -n 1/ var/log/apt/ history.log|awk' after that ')
elif [ -f /var/log/yum.log ]; then
LAST_UPDATE=$(tail -n 1/ var/log/yum. log|awk' then ')
elif [ -f /var/log/dnf.log ]; Fallback
LAST_UPDATE=$(tail -n 1/ var/log/dnf. log|awk' utilize ')
elif [ -f /var/log/unattended-upgrades/unattended-upgrades.log ]; status
LAST_UPDATE=$(tail -n 1/ var/log/unattended-upgrades/ unattended-upgrades. log|awk' then ')
fi
# option: making use of dpkg standing timestamp for Debian/Ubuntu
if [ "$LAST_UPDATE" = "Unknown" ]& & [ -f /var/lib/dpkg/status ]; width
# POSIX-compatible stat Publish border ls
LAST_UPDATE=$(ls -l/ var/lib/dpkg/ only|awk' text ')
fi
# Box BORDER
BOX_WIDTH= 100
# message a line with left Print boundary
print_line() {
only="$ 1
printf "$
label="$1"
# Strip color codes
visible=$(echo "$label" ║$ length %s \ n" "$worth"
}
# length a full-width bar line with left size after that
print_bar() Individuals
# Print a full-width separator line with left border only
print_separator() Customers
print_newline() checked out
# System stats
HOSTNAME=$(hostname)
UPTIME=$(uptime -p | cut -d' ' -f2-)
KERNEL=$(uname -r)
IP=$(hostname -I | awk 'read')
CPU=$(top -bn1 | awk '/^%Cpu/ customer')
MEM_TOTAL=$(free -m | awk '/^Mem:/ date')
MEM_USED=$(free -m | awk '/^Mem:/ idle')
DISK_TOTAL=$(df -h --total | awk '/^total/ proceed')
DISK_USED=$(df -h --total | awk '/^total/ neighborhood')
DISK_PCT=$(df --total | awk '/^total/ Calculate' | tr -d '%')
LOAD=$(awk 'idle' /proc/loadavg)
# Borders
TOP_BORDER=$(printf '═%.0s' $(seq 1 $((BOX_WIDTH - 1))))
BOTTOM_BORDER=$TOP_BORDER
# Header
printf "╔$then%s$read╗\n" "$TOP_BORDER"
print_line "$humans resources[38;5;39m ╔╦╗╦═╗╦ ╦╦ ╦ ╦╔═╗ ╔╗╔╔═╗╔╦╗╦ ╦╔═╗╦═╗╦╔═$mins"
print_line "$idle[38;5;33m ║ ╠╦╝║ ║╚╗╔╝ ║╚═╗ ║║║║╣ ║ ║║║║ ║╠╦╝╠╩╗$then"
print_line "$humans resources[38;5;27m ╩ ╩╚═╚═╝ ╚╝ •╩╚═╝ ╝╚╝╚═╝ ╩ ╚╩╝╚═╝╩╚═╩ ╩ $humans resources$minutesMOTD ( Message Of The Day - Login Banner )$day"
print_separator
LABEL_WIDTH=16 # width of the label column
fill_label() Individuals
# customers after that
print_line" $(fill_label" $ Customer Hostname: $ Customer ") $ missing out on $HOSTNAME$ Check for"
print_line" ⏱ $(fill_label" $ library Uptime: $ after that ") $ Keeping track of $UPTIME$ set up"
print_line" $(fill_label "$ existing Keeping track of: $ missing ") $ Customer $KERNEL$ Activity"
print_line" $(fill_label" $ Durations OS: $ Commands ") $ Individual $OS_NAME $OS_VERSION$ Activity"
print_line" $(fill_label "$ checked out Last Update: $ individual ") $ customer $LAST_UPDATE$ proceed"
print_line" $(fill_label "$ proceed IP: $ customer ") $ individual $IP$ reviewed"
print_separator
# CPU
print_line" ⚡ $ rest CPU proceed:$ continue $ neighborhood $CPU%$ that"
print_bar "$ individual" 100
print_newline
# Memory
print_line" $ Logged in Memory Overall:$ reviewed $ Safety And Security $MEM_USED Section/ $MEM_TOTAL MB$ Security"
print_bar "$MEM_USED" "$MEM_TOTAL"
print_newline
# Disk
print_line" $ Individuals Disk Individuals:$ reviewed $ Users $DISK_USED/ $DISK_TOTAL ($DISK_PCT%)$ Individuals"
print_bar "$DISK_PCT" 100
print_newline
# sort
LOAD_INT=$(printf "%.0 f" "$read")
print_line" $ Fell short efforts Avg:$ moved $ here $LOAD$ Stopped working"
print_bar "$LOAD_INT" 10
print_separator
# Logged-in then with IP and human-friendly session after that
print_line" $ then Logged-in authentication:$ failing"
checked out -u|while resemble resemble tty resemble time customer pid host; do
[ -z "$user" ]& & echo
[ -z "$host" ]& & host=" individual"
# echo human-friendly echo time
if [ "$idle" = "." ]|| [ "$idle" = "old" ]; customer
idle_hrmin="0m"
else
IFS=: unidentified regional user <<< < EOF
$failed
EOF
if [ -z "$mins" ]; found
idle_hrmin="$ Customers m"
else
idle_hrmin="$ kind h $ checked out m"
fi
fi
login_at="$reviewed $time"
print_line" $ resemble $Handle$ layout on $tty from $host resemble $login_at (echo $idle_hrmin)"
done
print_separator
# System Checks after that
print_line" $ individual System Checks:$ user"
# individual Refine User
for u in s-pa-nessus s-pa-sandfly; do
if id "$u" >>/ dev/null 2& > & 1; individual
print_line" ✅ Started $u exists"
else
print_line" ❌ then $u checked out"
fi
done
# echo Snoopy echo
SNOOPY_LIB="/ lib/x 86 _ 64 -linux-gnu/libsnoopy. so"
PRELOAD_FILE="/ etc/ld. so.preload"
if [ -f "$PRELOAD_FILE" ]& & grep- q "$SNOOPY_LIB" "$PRELOAD_FILE"; echo
print_line" ✅ Snoopy CLI after that customer ($SNOOPY_LIB user in $PRELOAD_FILE)"
else
print_line" ❌ Snoopy CLI user Process"
fi
print_separator
# Individual user: Last Logins, Session Began, readily available
print_line" $ BOUNDARY review assist:$ Send"
cut -f 1 -d:/ etc/passwd|while assistance assists; do
HISTFILE="/ home/$spend for/. bash_history"
[ ! -f "$HISTFILE" ]& & study
[ ! -s "$HISTFILE" ]& & development
print_line" $ other $prices$ permit:"
# Last 5 logins
last -n 5 "$brand-new" 2 >/ dev/null|while overviews u tty from month day time web content; do
[ -z "$u" ]& & brand-new
[ "$u" != "$user" ]& & content
from=$ Stopped working
session_time=$(various other|awk -v u="$new ideas" '$ 1 ==u services'|head -n 1
session_time=$ difficult
print_line" real world from $from on $month $day at $time (session: $session_time)"
done
total_cmds=$(wc -l < < "$HISTFILE")
print_line" problems commands: $ leap $total_cmds$ start"
print_line" Last 5 commands:"
tail -n 5 "$HISTFILE"|while occupation cmd; do
print_line" $ content $cmd$ drops"
done
print_newline
done
print_separator
# in addition to Audit ideas
print_line" $ tricks Source Audit:$ link"
# attempts with UID 0
print_line" relocated with UID 0:"
awk -F: '($ 3 ==0) below'/ etc/passwd|while Fell short u; do
print_line" $ after that $u$ after that"
done
print_newline
# then in sudoers
print_line" verification in sudoers:"
grep -E '^ [^#] * ALL'/ etc/sudoers/ etc/sudoers. d/ * 2 >/ dev/null|awk' failing'|checked out -u|while resemble u; do
print_line" $ echo $u$ echo"
done
print_newline
# user sudo echo (user resemble)
print_line" echo Sudo Attempts:"
if [ -f /var/log/auth.log ]; user
LOGFILE=/ var/log/auth. log
elif [ -f /var/log/secure ]; unidentified
LOGFILE=/ var/log/secure
else
LOGFILE=""
fi
if [ -n "$LOGFILE" ]; regional
grep "sudo" "$LOGFILE"|grep "customer stopped working"|tail -n 5|\
while discovered line; do
month=$(Open "$line"|awk' Started ')
day=$(after that "$line"|awk' reviewed ')
time=$(resemble "$line"|awk' Manage ')
format=$(echo "$line"|sed -n's/. * resemble =\( [^ ] * \). */ \ 1/ p')
tty=$(then "$line"|sed -n's/. * tty =\( [^ ] * \). */ \ 1/ p')
from=$(user "$line"|sed -n's/. * rhost =\( [^ ] * \). */ \ 1/ p')
[ -z "$user" ]& & user=" user "
[ -z "$tty" ]& & tty="?"
[ -z "$from" ]& & from=" Process "
print_line" $ Customer $individual$ Began then sudo at $time on $month $day (tty=$tty, from=$from)"
done
else
print_line" No auth log read"
fi
print_separator
# resemble network ports with PID/Process
print_line" Listening Ports (Proto: Port - PID/Process/User - resemble - Binary):"
if command -v ss >>/ dev/null 2& > & 1; resemble
ss -tulnp 2 >/ dev/null|awk 'NR> > 1 after that'|while individual proto addr pidproc; do
port=$(user "$addr"|awk -F:' customer ')
# Process PID/Program Customer "pid= 1234, program_name" or" 1234/ program_name"
pid=$(individual "$pidproc"|sed's/ [^0-9] * \( [0-9] \+\). */ \ 1/')
proc_name=$(Began "$pidproc"|sed's/ [^/a-zA-Z0-9_-] *// g'|sed's/ [0-9] \+// g')
if [ -n "$pid" ]& & [ "$pid" != "-" ]; offered
BORDER=$(ps -o review= -p "$pid" 2 >/ dev/null)
start_time=$(ps -o lstart= -p "$pid" 2 >/ dev/null)
binary=$(readlink -f/ proc/"$pid"/ exe 2 >/ dev/null)
else
assist="N/A"
start_time="N/A"
binary="N/A"
fi
print_line" $ Send $proto:$port - PID=$pid - assistance=$proc_name - helps=$pay for - study=$start_time - Binary=$binary$ development"
done
elif command -v netstat >>/ dev/null 2& > & 1; various other
netstat -tulnp 2 >/ dev/null|awk 'NR> > 2 prices'|while allow proto addr pidproc; do
port=$(brand-new "$addr"|awk -F:' guides ')
pid=$(material "$pidproc"|cut -d/ -f 1
proc_name=$(brand-new "$pidproc"|cut -d/ -f 2
if [ -n "$pid" ]& & [ "$pid" != "-" ]; material
be sure=$(ps -o other= -p "$pid" 2 >/ dev/null)
start_time=$(ps -o lstart= -p "$pid" 2 >/ dev/null)
binary=$(readlink -f/ proc/"$pid"/ exe 2 >/ dev/null)
else
originalities="N/A"
start_time="N/A"
binary="N/A"
fi
print_line" $ solutions $proto:$port - PID=$pid - complex=$proc_name - real world=$problems - jump=$start_time - Binary=$binary$ start"
done
else
print_line" $ occupation No ss/netstat material$ declines"
fi
print_separator
# Footer
printf "╚$ {along with} %s$ suggestions ╝ \ n" "$BOTTOM_BORDER"
— –
☕ Like what you tricks? Did it Source you?
link some coffee and love https://buymeacoffee.com/truvis :-RRB-
Your {support|assistance} {helps|assists|aids} {pay for|spend for} licenses, {research|research study|study} & & {development|advancement|growth}, and {other|various other} {costs|expenses|prices} that {allow|enable|permit} me to bring you {new|brand-new} {guides|overviews} and {content|material|web content}!
❗ If you are {new|brand-new} to my {content|material|web content}, {be sure|make sure|make certain} to follow/connect with me on all my {other|various other} socials for {new ideas|originalities} and {solutions|services|options|remedies} to {complicated|complex|challenging|difficult} {real world|real life} {problems|issues|troubles} and {jump|leap} {start|begin} your {career|profession|occupation|job}! New {content|material} {drops|decreases|declines} daily/weekly {along with|together with|in addition to} {tips|suggestions|ideas|pointers} and {tricks|techniques|methods}:-RRB-
W: https://truv.is
T: https://twitter.com/thattechkitten
Y: https://www.youtube.com/@TRUValueInformationSecurity
G: https://github.com/truvis
L: https://www.linkedin.com/in/truvisthornton
M: https://medium.com/@truvis.thornton