1. Buy a cheap SIM card, take note of that number
2. Edit the config file, use yowsup-cli to register using that phone number and input the subsequent verification code
Register a Whatsapp account using phone number |
3. Extend the ListenerClient to listen for group messages, ask one of my groupmates to send the group a test message. This allows me to obtain the JID of the group.
Listen for group messages to obtain JID of the group |
4. Extend CmdClient.py and fix it, and add in my own additions to yowsup-cli to be able to send
Sending images to group chat |
Examples\GroupListenerClient.py
Examples\UploaderClient.py
Examples\CmdClient.py
yowsup-cli
References:
Using the yowsup-cli, registering a new account
http://hacktracking.blogspot.sg/2013/02/yowsup-cli-send-whatsapp-messages-from.html
Getting JID of the group
https://github.com/tgalal/yowsup/issues/162
Sending images by SamsonBox
https://github.com/tgalal/yowsup/issues/178
Creating preview images
https://github.com/tgalal/yowsup/issues/35#issuecomment-41364453
Nice post! Something I can work with ;)
ReplyDeleteOne request though,;)
Could you post the adjusted samsonbox Cmdclient.py with the rest on your site?
Copy pasting gives me python error.
Would greatly appreciate it!
Thx and keep up the good work!
ow and the extend of the ListenerClient maybe ?
ReplyDeleteJust a rar of the modified files compared to the original yowsup files would be great!!
AND back again....Sir Poot : Found your github and also found the adjusted files. Thx!
ReplyDeleteBut, when using it gives me the error: "No module named GetAllGroupsClient"
Where is this dependency, or should I comment it out ? /-:
btw, don't forget to install PIL right?
ReplyDeleteSorry for the long delay Henk, never thought anyone would visit my blog =P
ReplyDeleteYeah GetAllGroupsClient is not supposed to be there...just comment it out and it should work ;)
CmdClient.py - https://gist.github.com/sirpoot/0d025bbdd1fcda20a14d
ReplyDeleteLOL , was great help for me, couldnt find anything better ;)
ReplyDeletehttps://github.com/tgalal/yowsup/issues/178
Interactive chatting in a group doesn't work for me, does it for you?
Hi, i always got "Disconnected because closed" when trying to send image. how to solve this ? thx
ReplyDeleteHello Sir Poot, first of all would like to thank for send_image code. its working perfectly fine.
ReplyDeletewould be great if you can help us for send_video and send_audio code as well. Thanks in advance since i am sure u will extend ur best possible support.
http://sirpoot.blogspot.sg/2014/11/using-yowsup-to-send-audio-and-video.html
DeleteThis comment has been removed by the author.
ReplyDeleteWHATSAPP BLOCKS THIS NOW!
ReplyDeletehttps://github.com/tgalal/yowsup/issues/337
Hello Sir Poot! You still can send images using the same code? I did it all as you sugested, the output is the same as you get in the prompt, but the image do not reach the number or group.
ReplyDeleteThanks for sharing!
It still works for me...
DeleteHi Sir Poot.
ReplyDeleteI'm getting the error below when trying to send a image.
Request Fail: hash: ...................................................=
MediaReceipt print timedout!
Have you any suggestions to fix this?
Tks!
This comment has been removed by the author.
ReplyDeleteHola,
ReplyDeletethank you for adapting CmdClient.py to send pictures.
Everything works fine with the upload and the sending using CmdClient.py
However, on my phone's whatsapp no image is shown! I even see that the phone has sent and ACK back when I turn on debugging, still no image.
Why could that be, do images have to be of a certain kind to be displayed by the whatsapp client on the phone?
I'm a bit puzzled as everything seems to work except for that the image simple doesn't appear
Regards,
Sören
[root@srv-002 yowsup]# ./yowsup-cli --sendImage 555184222008 /home/alessandro.daudt/yowsup/foto.jpg --wait --config config.example -a
ReplyDeleteAuthed 555196641335
Sending picture /home/alessandro.daudt/yowsup/foto.jpg of size 17948 with name foto.jpg
Sending media_requestUpload
555184222008@s.whatsapp.net [09-01-2015 09:05]:Sairrr
Enter Message or command: (/available, /lastseen, /unavailable)
555184222008@s.whatsapp.net [09-01-2015 10:06]:Droga
Enter Message or command: (/available, /lastseen, /unavailable)
Request Succ: hash: Pn+rha69KxPDwLC1hbNvwQmY9agTlVgGKmDBxaFc6L4= url: https://mmi212.whatsapp.net/u/EIsuotSncyj4F13Skz4zre-vUPsABQw3B0EU_Q/Al2ksAP_UTR7AsERErtlSjEnLIT2TDAS-k2msJMzSL0m resume: 0
Error occured at transfer write() argument 1 must be string or read-only buffer, not bytearray
Upload Fail:
Got request MediaReceipt
Sir how to get the jid of the group
ReplyDelete