123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #!/bin/bash
- reset
- echo -e "\e[1;33m==============================================================="
- echo -e "\e[1;36m AutoScriptVPS by Badboy "
- echo -e "\e[1;36m Redfox VPN "
- echo -e "\e[1;33m==============================================================="
- read -p "bug : " bughost
- IP=$(wget -qO- icanhazip.com);
- sleep 1
- echo Ping Host
- echo Cek Hak Akses...
- sleep 0.5
- echo Permission Accepted
- clear
- sleep 0.5
- clear
- apt install jq curl -y
- DOMAIN=aidan.my
- Bug=$bughost
- sub=$(</dev/urandom tr -dc a-z0-9 | head -c4)
- SUB_DOMAIN=${Bug}.${sub}.aidan.my
- CF_ID=irwan@aidan.my
- CF_KEY=ff3d540666c202facbd936ba3d0d0110
- set -euo pipefail
- IP=$(wget -qO- icanhazip.com);
- echo "Updating DNS for ${SUB_DOMAIN}..."
- ZONE=$(curl -sLX GET "https://api.cloudflare.com/client/v4/zones?name=${DOMAIN}&status=active" \
- -H "X-Auth-Email: ${CF_ID}" \
- -H "X-Auth-Key: ${CF_KEY}" \
- -H "Content-Type: application/json" | jq -r .result[0].id)
- RECORD=$(curl -sLX GET "https://api.cloudflare.com/client/v4/zones/${ZONE}/dns_records?name=${SUB_DOMAIN}" \
- -H "X-Auth-Email: ${CF_ID}" \
- -H "X-Auth-Key: ${CF_KEY}" \
- -H "Content-Type: application/json" | jq -r .result[0].id)
- sleep 0.2
- clear
- if [[ "${#RECORD}" -le 10 ]]; then
- RECORD=$(curl -sLX POST "https://api.cloudflare.com/client/v4/zones/${ZONE}/dns_records" \
- -H "X-Auth-Email: ${CF_ID}" \
- -H "X-Auth-Key: ${CF_KEY}" \
- -H "Content-Type: application/json" \
- --data '{"type":"A","name":"'${SUB_DOMAIN}'","content":"'${IP}'","ttl":120,"proxied":false}' | jq -r .result.id)
- fi
- RESULT=$(curl -sLX PUT "https://api.cloudflare.com/client/v4/zones/${ZONE}/dns_records/${RECORD}" \
- -H "X-Auth-Email: ${CF_ID}" \
- -H "X-Auth-Key: ${CF_KEY}" \
- -H "Content-Type: application/json" \
- --data '{"type":"A","name":"'${SUB_DOMAIN}'","content":"'${IP}'","ttl":120,"proxied":false}')
- echo "Host : $SUB_DOMAIN"
- echo $SUB_DOMAIN > /root/domain
- rm -f /root/cf.sh
|