62 lines
1.3 KiB
Bash
Executable File
62 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
export DISPLAY="${DISPLAY:-:0}"
|
|
|
|
read -rp "Select create account from the menu, press enter to continue." continue
|
|
echo
|
|
|
|
# Read email address
|
|
echo "Enter email address:"
|
|
read -r email
|
|
|
|
# Validate email address format
|
|
if [[ "$email" =~ ^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$ ]]; then
|
|
# Type email address
|
|
xdotool type --delay=75 "$email"
|
|
# Press tab
|
|
xdotool sleep 0.5 key --delay=75 Tab
|
|
# Press enter
|
|
xdotool sleep 0.5 key --delay=75 Return
|
|
else
|
|
echo "Invalid email format. Exiting."
|
|
exit 1
|
|
fi
|
|
|
|
# Press tab
|
|
|
|
#xdotool sleep 0.5 key --delay=75 Tab
|
|
# Press enter
|
|
#xdotool sleep 0.5 key --delay=75 Return
|
|
|
|
echo "Please check your email for the verification code."
|
|
|
|
# Read verification code
|
|
echo "Enter verification code:"
|
|
read -r code
|
|
|
|
# Type verification code
|
|
xdotool type --delay=1000 $code
|
|
# press tab
|
|
xdotool sleep 0.5 key --delay=75 Tab
|
|
# Press enter
|
|
xdotool sleep 0.5 key --delay=75 Return
|
|
|
|
# Read password
|
|
echo "Enter password between 6 and 16 characters, 1 uppercase letter 1 number required:"
|
|
read -r password
|
|
|
|
# Type password
|
|
xdotool type --delay=500 "$password"
|
|
# Press tab
|
|
xdotool sleep 0.5 key --delay=75 Tab
|
|
# Type password again
|
|
xdotool sleep 0.5 type --delay=500 "$password"
|
|
# Press tab
|
|
xdotool sleep 0.5 key --delay=75 Tab
|
|
# Press enter
|
|
xdotool sleep 0.5 key --delay=75 Return
|
|
|
|
echo "Account created!"
|
|
|
|
exit 0
|