Yowsup – WhatsApp em terminal Linux

Yowsup – WhatsApp em terminal Linux

CentOS 6

yowsup-cli v2.0.9

Using yowsup v2.2.78

Fontes:

http://www.vivaolinux.com.br/artigo/Nagios-enviando-alertas-via-WhatsAPP?pagina=2

http://hacktracking.blogspot.com.br/2013/02/yowsup-cli-send-whatsapp-messages-from.html

http://penselinux.com.br/yowsup-whatsapp-em-terminal-linux/

Passo 1: Instalando dependências.

# yum install epel-release

# yum install python-pip python python-dateutil python-argparse python-devel pycrypto wget unzip gcc

# vi /etc/yum.repos.d/scl.repo

[scl_python27]

name=Python 2.7 Dynamic Software Collection

baseurl=http://people.redhat.com/bkabrda/python27-rhel-6/

failovermethod=priority

enabled=1

gpgcheck=0

# yum install python27

# scl -l

# scl enable python27 bash

# python -V

Passo 2: Baixando o Yowsup.

# pip install yowsup2

Passo 5: Solicitando senha.

# yowsup-cli registration --requestcode sms --phone 553799990000 --cc 55

INFO:yowsup.common.http.warequest:{"status":"sent","length":6,"method":"sms","retry_after":1805}

status: sent

retry_after: 1805

length: 6

method: sms

Um sms será enviado ao seu número celular configurado em phone.

O número deve ter o seguinte padrão 180-634

Passo 6: Registrando

# yowsup-cli registration --register 180-634 --phone 553799990000 --cc 55

INFO:yowsup.common.http.warequest:{"status":"ok","login":"553799990000","pw":"t5qQLd8+LJ/4Od/xptotiGmstD0=","type":"new","expiration":1458051668,"kind":"free","price":"US$0.99","cost":"0.99","currency":"USD","price_expiration":1429247024}

status: ok

kind: free

pw: t5qQLd8+LJ/4Od/xptotiGmstD0=

price: US$0.99

price_expiration: 1429247024

currency: USD

cost: 0.99

expiration: 1458051668

login: 553799990000

type: new

# vi whatsapp.conf

cc=55

phone=553799990000

id=

password=t5qQLd8+LJ/4Od/xptotiGmstD0=

Enviando

# yowsup-cli demos -s 553788886666 "Olá Mundo" -c whatsapp.conf

# yowsup-cli demos --login 553799990000:t5qQLd8+LJ/4Od/xptotiGmstD0= -s 553788886666 "Olá Mundo 2"

A mensagem sera enviada

Interativo

# yowsup-cli demos --login 553799990000:t5qQLd8+LJ/4Od/xptotiGmstD0= -y

Para testar