Skip to content

Instantly share code, notes, and snippets.

@henriqueutsch
Last active August 29, 2015 14:13
Show Gist options
  • Save henriqueutsch/a4b66963b23db2df3b77 to your computer and use it in GitHub Desktop.
Save henriqueutsch/a4b66963b23db2df3b77 to your computer and use it in GitHub Desktop.
#http://hacktracking.blogspot.com.br/2013/02/yowsup-cli-send-whatsapp-messages-from.html
#https://github.com/tgalal/yowsup
#https://github.com/tgalal/yowsup/wiki/%5BLegacy%5D-yowsup-cli
#http://penselinux.com.br/yowsup-whatsapp-em-terminal-linux/
#https://github.com/tgalal/yowsup/issues/183
#https://github.com/tgalal/yowsup/issues/500
#http://stackoverflow.com/questions/9780717/bash-pip-command-not-found
#http://stackoverflow.com/questions/2941995/python-ignore-incorrect-padding-error-when-base64-decoding
#https://sunilsharma3639.wordpress.com/2014/09/30/send-push-notifications-from-rails-server-to-ios-devices/
#http://www.vivaolinux.com.br/dica/Usando-o-Yowsup-para-enviar-comandos-ao-Shell
sudo apt-get update
sudo apt-get install -y python python-dateutil python-argparse python-setuptools python-dev
sudo easy_install pip
sudo pip install python-axolotl
wget https://github.com/tgalal/yowsup/archive/master.zip
unzip master.zip
touch /home/pi/yowsup-master/yowsup-cli.config
echo "Digite o código do seu país:"
read codigo
echo "cc=$codigo" >> /home/pi/yowsup-master/yowsup-cli.config
echo "Digite o seu numero da sua cidade e o número do telefone Ex:3188880000:"
read telefone
echo "phone=$codigo$telefone" >> /home/pi/yowsup-master/yowsup-cli.config
echo "id=" >> /home/pi/yowsup-master/yowsup-cli.config
chmod +x /home/pi/yowsup-master/yowsup-cli
cd /home/pi/yowsup-master/
./yowsup-cli registration -C "$codigo" -p "$codigo$telefone" --requestcode sms -c yowsup-cli.config
echo "Digite o WhatsApp code enviado para o seu celular:"
read whatsappcode
./yowsup-cli registration -C "$codigo" -p "$codigo$telefone" -R "$whatsappcode" >> /home/pi/yowsup-master/passwhatsapp
pass=$(sed -n '3p' /home/pi/yowsup-master/passwhatsapp)
pass=${pass//pw: /}
echo "password=$pass" >> /home/pi/yowsup-master/yowsup-cli.config
rm passwhatsapp
echo "Digite o numero que deseja testar ex: 55dddnumero 553199999999:"
read numero
./yowsup-cli demos -s "$numero" "Olá" -c yowsup-cli.config
./yowsup-cli demos -e -c yowsup-cli.config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment