Generate random root flags
User and Root Flags Generate Script.
nano root.sh#!/bin/bash
# Generate a random string
random_string=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)
# Calculate the MD5 hash of the random string
md5_hash=$(echo -n "$random_string" | md5sum | awk '{print $1}')
# Store the MD5 hash in a file (e.g., flag.txt)
echo "$md5_hash" > root.txt
# Display the generated flag
echo "Generated flag: $md5_hash"chmod +X root.sh
bash root.sh --> Generated flag: daada8833ac2b4ebc10216ddfa7b8cc8
cat root.txt ---> daada8833ac2b4ebc10216ddfa7b8cc8PreviousAdd Index Page with Start Button Redirecting to Vulnerable CMS SetupNextCreate root.txt File Inside Docker Container Using Nginx Server
Last updated