This repository has been archived by the owner on Dec 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathurl
63 lines (62 loc) · 2.3 KB
/
url
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
60
61
62
63
#!/bin/bash
banner() {
clear
printf "\e[0m\n"
printf "\e[0m\e[1;93m _____ _ _ \e[0m\e[1;92m _ _ _____ _ \e[0m\n"
printf "\e[0m\e[1;93m / ____| | | | \e[0m\e[1;92m| | | | __ \| | \e[0m\n"
printf "\e[0m\e[1;93m | (___ | |__ ___ _ __| |_ \e[0m\e[1;92m| | | | |__) | | \e[0m\n"
printf "\e[0m\e[1;93m \___ \| _ \ / _ \| __| __| \e[0m\e[1;92m| | | | _ /| | \e[0m\n"
printf "\e[0m\e[1;93m ____) | | | | (_) | | | |_ \e[0m\e[1;92m| |__| | | \ \| |____ \e[0m\n"
printf "\e[0m\e[1;93m |_____/|_| |_|\___/|_| \__| \e[0m\e[1;92m \____/|_| \_\______|\e[0m\n"
printf "\e[0m\n"
printf "\e[0m\e[1;93m Created By HTR-TECH \e[0m\e[1;91m( \e[0m\e[1;92mTahmid Rayat \e[0m\e[1;91m)\e[0m\n"
printf "\e[0m\n"
printf "\e[0m\e[1;93m Github :\e[0m\e[1;96m htr-tech \e[0m\e[1;97m| \e[0m\e[1;93mInstagram :\e[0m\e[1;96m @tahmid.rayat\e[0m\n"
}
menu() {
printf "\e[0m\n"
printf " \e[0m\e[1;91m[\e[0m\e[1;97m01\e[0m\e[1;91m]\e[0m\e[1;93m Short Url\e[0m\n"
printf " \e[0m\e[1;91m[\e[0m\e[1;97m02\e[0m\e[1;91m]\e[0m\e[1;93m More From Us\e[0m\n"
printf " \e[0m\e[1;91m[\e[0m\e[1;97m03\e[0m\e[1;91m]\e[0m\e[1;93m Exit\e[0m\n"
printf "\e[0m\n"
read -p $' \e[1;31m[\e[0m\e[1;77m~\e[0m\e[1;31m]\e[0m\e[1;92m Select an option: \e[0m\e[1;96m\en' option
if [[ $option == 1 || $option == 01 ]]; then
shorturl
elif [[ $option == 2 || $option == 02 ]]; then
sleep 1
xdg-open https://github.com/htr-tech/
sleep 2
banner
menu
elif [[ $option == 3 || $option == 03 ]]; then
sleep 1
printf "\e[0m\n"
printf "\e[0m\n"
exit 1
else
printf " \n\e[1;91m[\e[0m\e[1;97m!\e[0m\e[1;91m]\e[0m\e[1;93m Invalid option \e[1;91m[\e[0m\e[1;97m!\e[0m\e[1;91m]\e[0m\n"
sleep 1
banner
menu
fi
}
shorturl() {
printf "\e[0m\n"
printf "\e[0m\n"
read -p $' \e[1;31m[\e[0m\e[1;77m~\e[0m\e[1;31m]\e[0m\e[1;92m Input The Url : \e[0m\e[1;96m\en' inpurl
printf "\e[0m\n"
printf " \e[0m\e[1;91m[\e[0m\e[1;97m~\e[0m\e[1;91m]\e[0m\e[1;93m Shorting Url...\e[0m\n"
shorturl=$(curl -s http://tinyurl.com/api-create.php?url=$inpurl)
sleep 2
printf "\e[0m\n"
printf " \e[0m\e[1;91m[\e[0m\e[1;97m~\e[0m\e[1;91m]\e[0m\e[1;93m Done !!\e[0m\n"
printf "\e[0m\n"
printf ' \e[0m\e[1;91m[\e[0m\e[1;97m~\e[0m\e[1;91m]\e[0m\e[1;92m Shortned Url :\e[0m\e[1;93m %s \n' $shorturl
printf "\e[0m\n"
sleep 2
printf "\e[0m\n"
printf "\e[0m\n"
exit 1
}
banner
menu