#!/bin/bash # Prompt user for Prefix value read -p "Enter the prefix for the hostname: " Prefix files=( "clear.txt" "eicar.txt" "eicar_com.zip" "eicarcom2.zip" ) for file in "${files[@]}" do if [ ! -f "$file" ]; then if [ "$file" == "clear.txt" ]; then echo "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vel nunc ut velit porttitor congue nec a orci. Ut in massa ut sapien laoreet gravida in ac sem. Quisque et ipsum orci. Fusce diam quam, vulputate in finibus sed, pellentesque in nibh. Fusce sit amet augue quis diam ultrices auctor vel eu sem. Fusce rhoncus sit amet lectus et sollicitudin. Duis in laoreet dolor, quis porta ante. Nam pharetra nibh velit, sit amet venenatis turpis bibendum posuere. Proin volutpat sem sit amet magna scelerisque, nec eleifend neque tristique. Pellentesque in sapien sit amet magna lacinia sagittis. Aenean eget tincidunt risus, et mollis libero. Aenean vitae nisi ac velit volutpat faucibus. Proin dolor neque, congue non dictum ut, placerat vel justo. Sed pretium iaculis augue vitae dapibus. Aenean sed libero a dui ullamcorper blandit vitae eget elit. Quisque erat urna, suscipit at cursus eu, pellentesque non tortor. Mauris rutrum porttitor ex, eu posuere nunc vehicula id. Praesent ultricies laoreet odio, non aliquam risus dapibus nec. Integer sed congue ipsum, et pellentesque mauris. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla sollicitudin augue aliquet, egestas urna eget, tincidunt arcu. Etiam luctus semper dignissim. Praesent nec ligula eu mauris laoreet accumsan." > "$file" elif [ "$file" == "eicar.txt" ]; then wget https://secure.eicar.org/eicar.com.txt -O "$file" &> /dev/null else wget "https://secure.eicar.org/$file" &> /dev/null fi fi done # Set default values for filename and hostname filename=${1:-"eicar.txt"} hostname=${2:-"${Prefix}malware.appsec-akaed.com"} # Ask user for input for filename, with default and example displayed read -e -p "Enter the filename (eicar.txt, eicar_com.zip, eicarcom2.zip, clear.txt): " input # Use user input if provided, otherwise use default filename=${input:-$filename} # Ask user for input for hostname, with default and example displayed read -p "Enter the hostname (default: $hostname): " input # Use user input if provided, otherwise use default hostname=${input:-$hostname} # Call upload_file.sh script with provided or default filename and hostname echo "Running the command: ./upload_file.sh --file \"$filename\" --host \"$hostname\"" ./upload_file.sh --file "$filename" --host "$hostname"