-
Notifications
You must be signed in to change notification settings - Fork 0
/
jadwal-solat.sh
59 lines (51 loc) · 2.19 KB
/
jadwal-solat.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Jadwal Sholat CLI by Muhammad Fazriansyah Ramadhan
# Indoxploit team - BSSN.RI
# color
cyan='\e[0;36m'
green='\e[0;34m'
yellow='\e[1;33m'
red='\e[1;31m'
white='\e[1;37m'
# user agent
useragent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
# getAPI
ambil(){
curl -s -A "${useragent}" "https://time.siswadi.com/pray/${kota}" >> result.lst
if [[ $(cat result.lst) =~ "invalid address g88" ]]; then
echo "[!] Kota Salah ..."
else
LozShubuh=$(cat result.lst | grep -Po '(?<="Fajr": ").*?(?=")')
LozDzuhur=$(cat result.lst | grep -Po '(?<="Dhuhr": ").*?(?=")')
LozAshar=$(cat result.lst | grep -Po '(?<="Fajr": ").*?(?=")')
LozMaghrib=$(cat result.lst | grep -Po '(?<="Maghrib": ").*?(?=")')
LozIsya=$(cat result.lst | grep -Po '(?<="Isha": ").*?(?=")')
Lozstm=$(cat result.lst | grep -Po '(?<="SepertigaMalam": ").*?(?=")')
Loztm=$(cat result.lst | grep -Po '(?<="TengahMalam": ").*?(?=")')
Lozdtm=$(cat result.lst | grep -Po '(?<="DuapertigaMalam": ").*?(?=")')
echo -e $green"Tanggal : $red`date`"
echo -e $green"Kota : $red$kota"
echo -e $white"======================================================"
echo -e $cyan"Shubuh : $red$LozShubuh $cyan Magrib : $red$LozMaghrib"
echo -e $cyan"Dzuhur : $red$LozDzuhur $cyan Sepertiga Malam : $red$Lozstm"
echo -e $cyan"Ashar : $red$LozAshar $cyan Duapertiga Malam : $red$Lozdtm"
echo -e $cyan"Isya : $red$LozIsya"
fi
}
# banner
banner(){
echo -e $yellow" _ "
echo -e $yellow" ( ) "
echo -e $green" _ ____ ___ _ _ _ ____ _ ____ _ _ ____ _ ____ ___ $yellow( ) "
echo -e $green" | |__| | \ | | | |__| | [__ |__| | | | |__| | $yellow| | "
echo -e $green"_| | | |__/ |_|_| | | |___ ___] | | |__| |___ | | | $yellow| | "
echo -e $yellow" (TTTTT) "
echo -e $green" author $red<3$green Muhammad Fazriansyah"
echo ""
}
clear
read -p "Nama Kota: " kota;
clear
banner
ambil
rm -f result.lst