printf"[*] If you have multiple T-Pots running, give them each a unique NUMBER, e.g. '2' for your second T-Pot installation. Enter unique number for THIS T-Pot: "
read indexNumber
if ! [["$indexNumber"=~ ^[0-9]+$ ]]
then
echo"Sorry integers only. You have to start over..."
printf"[*] Currently, your honeypot is configured to transmit data the default backend at 'https://community.sicherheitstacho.eu/ews-0.1/alert/postSimpleMessage'. Do you want to change this API endpoint? Only do this if you run your own PEBA backend instance? (N/y): "
read replyAPI
if[[$replyAPI=~ ^[Yy]$ ]]
then
printf"[*] Enter your API endpoint URL and make sure it contains the full path, e.g. 'https://myDomain.local:9922/ews-0.1/alert/postSimpleMessage': "
read apiURL
fi
echo""
echo"[*] Recap! You defined: "
echo"############################"
echo"API User: "$apiUser
echo"API Token: "$apiToken
echo"API URL: "$apiURL
echo"Unique numeric ID for your T-Pot Installation: "$indexNumber
echo"Specific honeypot-IDs will look like : <honeypotType>-"$apiUser"-"$indexNumber
echo"############################"
echo""
printf"[*] Is the above correct (y/N)? "
read reply
if[[ ! $reply=~ ^[Yy]$ ]]
then
echo"OK, then run this again..."
exit1
fi
echo""
echo"[+] Creating config file with API UserID '$apiUser' and API Token '$apiToken'."
echo"[+] Fetching config file from github. Outgoing https requests must be enabled!"