-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbelajar-git
31 lines (31 loc) · 955 Bytes
/
belajar-git
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
MYIP=$(wget -qO- ipinfo.io/ip)
DATANAME=$(curl -sS https://raw.githubusercontent.com/ayaze01/clash/main/mm/ip | grep $MYIP | awk '{print $2}')
DATADATE=$(curl -sS https://raw.githubusercontent.com/ayaze01/clash/main/mm/ip | grep $MYIP | awk '{print $3}')
DATAIP=$(curl -sS https://raw.githubusercontent.com/ayaze01/clash/main/mm/ip | grep $MYIP | awk '{print $4}')
TODAY=$(date -I)
CEKDATE() {
exp=$DATADATE
d1=($(date -d "$DATADATE" +%s))
d2=($(date -d "$TODAY" +%s))
exp2=$(((d1 - d2) / 86400))
if [[ "$exp2" -le "0" ]]; then
echo "Expired"
sleep 5
menu
else
echo "Permission Accepted..."
fi
}
CEKIP() {
MYIP=$(curl -sS ipv4.icanhazip.com)
IZIN=$(curl -sS https://raw.githubusercontent.com/ayaze01/clash/main/mm/ip | awk '{print $4}' | grep $MYIP)
if [ "$MYIP" = "$IZIN" ]; then
CEKDATE
else
echo "Permission Denied!"
sleep 5
menu
fi
}
CEKIP