widhisec

[Bash] As00PaRt6

Dec 4th, 2020 (edited)
1,199
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. # -(c) zsecc0de-crew.id ~ widhisec
  3. # -createon   : 21/04/2019
  4. # -toolsname  : shortid
  5. # fungsi buat cek info and generate shortlink
  6. GREEN=$(tput setaf 2)
  7. RED=$(tput setaf 1)
  8. NORMAL=$(tput sgr0)
  9. CYAN=$(tput setaf 6)
  10. cok="cookies.txt"
  11. user(){
  12.                P=$(curl "https://shortid.co/user/dashboard" -s -b $cok --cookie-jar $cok \
  13.                -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0" | grep "»" | tr -d "»")
  14.                printf "$P\n"
  15. }
  16. shortidlog(){
  17.                #wget -O /dev/null --keep-session-cookies --save-cookies=cookies.txt --post-data "user_email=gggleg8@gmail.com&user_pwd=" http://shortid.co/user/login  2>/dev/null
  18.                get=$(curl -s "http://shortid.co/user/login" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --data "user_email=$mail&user_pwd=$pass" -b $cok --cookie-jar $cok | grep "<br/></div>")
  19.                if [[ $get =~ "No such user with this email!" ]]; then
  20.                printf "${RED}[!]${NORMAL}login gagal\n"
  21.                rm -rf cookies.txt
  22.                fi
  23.                if [[ $get =~ "Password Salah!" ]]; then
  24.                printf "${RED}[!]${NORMAL}sepertinya password salah \n"
  25.                rm -rf cookies.txt
  26.                fi
  27. }
  28. shortlink_gen(){
  29.                 gen=$(curl "https://shortid.co/user/short" -s -b $cok --cookie-jar $cok \
  30.                 -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0" \
  31.                 --data "url=https"%"3A"%"2F"%"2F$url" | grep -o 'type="text" value=.*' | grep -Po 'value="\K.*?(?=")')
  32.                 printf "SUCCES GENERATE => %s$gen\n"
  33.                 read -p "balik ke menu (y/n) :" az
  34.                 if [[ $az == "y" ]]; then
  35.                 menu
  36.                 fi
  37. }
  38. statistik(){
  39.                 tanggal=$(curl "https://shortid.co/user/stats" -s -b $cok --cookie-jar $cok\
  40.                 -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0" | grep "</td>"| cut -d ">" -f2 |  grep "</td" | head -1 | tr -d "</td")
  41.                 klik=$(curl "https://shortid.co/user/stats" -s -b $cok --cookie-jar $cok \
  42.                 -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0" | grep "</td>"|
  43.                 cut -d ">" -f2 |  grep "</td" | grep -n "" | grep --text "2:.*" | gawk -F / '{ print $1 }' | tr -d "<2:")
  44.                 hasil=$(curl "https://shortid.co/user/stats" -s -b $cok --cookie-jar $cok \
  45.                 -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0" | grep "</td>"|cut -d ">" -f2 |  grep "</td" | grep -n "" | grep "3" | tr -d "3:</td")
  46.                 echo "------------------------------------------"
  47.                 printf "  TANGGAL - KLIK VALID - PENGHASILAN \n"
  48.                 printf "$tanggal       $klik         $hasil\n"
  49.                 read -p "balik ke menu (y/n) :" az
  50.                 if [[ $az == "y" ]]; then
  51.                 menu
  52.                 fi
  53. }
  54. mylink(){
  55.                 curl "https://shortid.co/user/mylink" -s -b $cok --cookie-jar $cok -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0" |
  56.                 grep -o "href=.*" | cut -d ">" -f1 | head -13 | sed -n 's/.*href="\([^"]*\).*/\1/p' | grep "http"
  57.                 read -p "balik ke menu (y/n) :" az
  58.                 if [[ $az == "y" ]]; then
  59.                 menu
  60.                 fi
  61. }
  62. menu () {
  63. user
  64. printf "
  65. ${RED}#############################################################################
  66. \t[CREATE BY]: WIDHISEC ~ SHORTID.CO
  67. ${NORMAL}#############################################################################
  68. "
  69. printf "(1).login | (2).shortlinkgen | (3).statistik | (4).mylink | (5).logout\n"
  70. read -p "(?) : " pl
  71. case $pl in
  72.     1)
  73.     read -p $RED'[?]'${NORMAL}'user_email :' mail
  74.     read -p $RED'[?]'${NORMAL}'user_pwd :' pass
  75.     shortidlog $mail $pass
  76.         ;;
  77.     2 )
  78.     read -p $GREEN"[*]"$NORMAL"URL HERE:" url
  79.     shortlink_gen $url
  80.     ;;
  81.     3 )
  82.     statistik
  83.     ;;
  84.     4 )
  85.     mylink
  86.     ;;
  87.     5 )
  88.     rm -rf cookies.txt
  89. esac
  90. }
  91. menu
RAW Paste Data