1
- ## WhatsApp c library
1
+ ## WhatsApp C library
2
2
3
- A fast and lightweight c library to connect to WhatsApp. Requires an always
4
- connected phone capable of login into the web client .
3
+ A fast and lightweight C library to connect to WhatsApp. Requires a phone with a
4
+ working version and connected to the internet, similarly as the web version .
5
5
6
- Uses the following libraries:
6
+ The following libraries are required :
7
7
8
8
- libwebsockets
9
9
- libqrencode
10
10
- libcrypto
11
11
- libjson-c
12
12
- libprotobuf-c
13
+ - libcrypto (OpenSSL)
13
14
14
15
Still under HEAVY development. Pull requests are appreciated.
15
16
@@ -23,21 +24,32 @@ plugin to add WhatsApp as an available protocol to IRC.
23
24
24
25
### Current status
25
26
26
- By now it can only connect to the WhatsApp websocket server, login using the QR
27
- and start receiving messages. The encrypted messages are succesfully decrypted .
27
+ The library provides the ability to send and receive private text messages, no
28
+ photos or other media are supported yet, neither group messages .
28
29
29
- F8 04 09 0A 4B F8 01 F8 02 34 FC 5B 0A 40 0A 1A ....K....4.[.@..
30
- 33 34 36 36 36 36 36 36 36 36 36 40 73 2E 77 68 34666666666@s.wh
31
- 61 74 73 61 70 70 2E 6E 65 74 10 01 1A 20 42 42 atsapp.net... BB
32
- 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0000000000000000
33
- 30 30 30 30 30 30 30 30 30 30 30 30 30 30 12 0F 00000000000000..
34
- 0A 0D 54 65 73 74 69 6E 67 20 6C 69 62 77 61 18 ..Testing libwa.
35
- A8 85 E7 DE 05 20 00 ..... ..........
30
+ The built-in client ` wac ` reads from the standard input, and sends the lines as
31
+ messages to the specified recipient in the argument. The received messages are
32
+ shown in the standard output. The phone should be specified in the following
33
+ format:
36
34
37
- Received and sent text messages are displayed with the name of the sender:
35
+ <country code><phone>@s.whatsapp.net
38
36
39
- <me>: Have you ever seen a supernova?
40
- Neil: Well...
41
- Neil: Sometimes I power my phone screen in the dark
42
- Neil: At maximum brightness
37
+ For example, the number 666666666 in Spain, would be
38
+ ` 34666666666@s.whatsapp.net ` . Some examples using the standard input:
43
39
40
+ % PHONE=34666666666@s.whatsapp.net
41
+ % wac $PHONE
42
+ Hi, do you read me?
43
+ Yes!
44
+
45
+ It can also be piped, as any UNIX like program, for example:
46
+
47
+ % echo Hi from the command line | wac $PHONE
48
+
49
+ Or to get a remote shell:
50
+
51
+ % mkfifo fifo
52
+ % wac < fifo | bash > fifo
53
+
54
+
55
+ ![ A screenshot of the test commands] ( doc/test.jpg )
0 commit comments