Advertisement
Wh1teDrvg0n

Untitled

Apr 23rd, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.20 KB | None | 0 0
  1.  
  2. function OODAbot(){
  3.  
  4.     declare -r link="https://t.me/OODAbot"
  5.         echo -e "\n\n${yellowColour}[*]${endColour}${turquoiseColour} Haz click en el siguiente enlace y dale a 'Start' para recibir notificaciones a través de Telegram: ${endColour}\n $link"
  6.     declare -r update="curl 'https://api.telegram.org/bot806216116:AAHeKn0tRhGAo0VmyHmRGM68ix_cZmihbyY/getUpdates'"
  7.  
  8.         if [ "$update|jq '.ok'" == 'true' ]; then
  9.             declare -A domain_id
  10.             for(( x=0; x >= $(#domain_id[*]); x++ )); do
  11.             declare -r id=$("$update" | jq '.result["$x"].message.chat.id')
  12.             domain_id=([$domainName]=$id)
  13.             x+=1
  14.             done
  15.  
  16.         declare -r token="806216116:AAHeKn0tRhGAo0VmyHmRGM68ix_cZmihbyY"
  17.         declare -r user_id=$id
  18.         declare -i timeout="10"
  19.         declare -r url="https://api.telegram.org/bot$token/sendMessage"
  20.         declare -r date="$(date "+%d %b %Y %H:%M")"
  21.     declare -r registered_domain=$new_registered_domain
  22.         declare -r text="Detectado nuevo registro a fecha $date: $registered_domain "
  23.  
  24.         curl -s --max-time $timeout -d "chat_id=$user_id&disable_web_page_preview=1&text=$text" $url > /dev/null 2>&1
  25.  
  26.     #else
  27.                  #echo -e "\n\n${redColour}[*] Error ${endColour}"
  28.  
  29.     fi
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement