Comments (16)
If someone could just make an unencrypted/decrypted capture of the client delivery report message from the recipient phone to the whatsapp server and send it to me then I will write the code myself. Or if someone knows a good way to capture the data myself, I will do my own captures as well. Unfortunately I have not figured out a way to sniff whatsup traffic from real phones or emulators.
Thanks!
from whatsapi.
Don't know if there is something like wireshark for iPhone?
from whatsapi.
I am using android and I have run TCPdump on my phone already, but all of the messages of interest are encrypted.
from whatsapi.
I finally figured it out, for the client delivery message, the format is as follows:
0x00, [total msg length], 0xf8, 0x08, 0x5d, 0xa0, 0xfa, 0xfc, [Number Length], [UTF8 to number], 0x8a, 0xa2, 0x1b, 0x43, 0xfc, [id length], [UTF8 msg ID], 0xf8, 0x01, 0xf8, 0x03, 0x7f, 0xbd, 0xad,
Where the UTF8 to number is the phone number that you are responding to, and the UTF8 message ID is the same message ID that you are responding to. Unfortunately I do not have time to code this up right now, but I thought I would post this info along in case someone else wants to add it.
from whatsapi.
Are you sure this is correct? (I can't get it to work)
from whatsapi.
Yup, here is a full dump:
0x00, 0x2c, 0xf8, 0x08, 0x5d, 0xa0, 0xfa, 0xfc, 0x0b, 0x31, 0x39, 0x31, 0x39, 0x31, 0x32, 0x33, .,..]....1919123
0x34, 0x35, 0x36, 0x37, 0x8a, 0xa2, 0x1b, 0x43, 0xfc, 0x0d, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 4567...C..111222
0x33, 0x33, 0x33, 0x33, 0x2d, 0x31, 0x30, 0xf8, 0x01, 0xf8, 0x03, 0x7f, 0xbd, 0xad, 3333-10....⌂..
Where 19191234567 is the phone number that I want to send the ack to, and 1112223333-10 is the message ID from the message that person just sent me. I have a test project in c# that does this and I get the double check marks every time. I cannot post the code unfortunately.
from whatsapi.
Oke, then I'll try again.
from whatsapi.
function MessageReceived($msg_length,$to_length,$to,$msgid_length,$msgid){
$content = "\x00$msg_length";
$content .= "\xf8\x08\x5d\xa0\xfa\xfc$to_length";
$content .=$to;
$content .= "x8a\xa2\x1b\x43\xfc$msgid_length";
$content .= $msgid;
$content .= "\xf8\x01\xf8\x03\x7f\xbd\xad";
$this->send($content);
}
What am I doing wrong? (Normally I don't work with php, so maybe a dumb mistake?)
from whatsapi.
I think you are doing the lengths wrong, for example the msg_length is typically computed like this:
$msg_length = hex2str(_hex(strlen($content)));
There are also some places where they do this:
$to_length = chr(mb_strlen($to,"UTF-8"));
It is not clear if you are doing that or not.
Here is a function I wrote to debug this type of stuff:
public function printhexstr($data, $name)
{
$len = strlen($data);
print("Len: $len - $name\n");
for ($i = 0; $i < $len; $i++)
{
print(" ". dechex(ord($data[$i])));
if (($i % 16) == 15)
{
print("\n");
}
}
print("\n");
}
To see what you are really sending just call:
printhexstr($context, "message rx");
from whatsapi.
I just took the length which I receive.
$msg = $this->parse_received_message($v);
echo json_encode($msg); // Do something with the message here ?
$this->MessageReceived($msg['length'],$msg['from_number_length'],$msg['from_number'],$msg['message_id_length'],$msg['message_id']);
from whatsapi.
OK, I just pushed the php up in my fork, feel free to merge it wherever.
from whatsapi.
Thx, it's working now :D
from whatsapi.
Just for the record, the issues were:
On one line you didn't have x8a escaped.
The message length is supposed to be the message length of the message you are sending, not the one you are acking.
from whatsapi.
Oh oke, I see hehe.
from whatsapi.
BTW, did you port this API to C# or do you use this API (PHP) with C#?
from whatsapi.
Hello,
Can u please provide us with the full php code to add into our file and get it working ..
from whatsapi.
Related Issues (20)
- Can anyone edit GB WhatsApp source code in such a way that it also shows toast when someone sees your profile picture or profile, like it shows toast when someone sees your story
- WART 1.8.2.2 HOT 6
- is there a python script that can filter whatsapp numbers only
- Problem Login LoginWithPassword in WhatsAPI
- Help HOT 3
- How did it go for venomous0x? HOT 3
- مهم
- e6cf5a59474a624086d4f966ded240ecb73bc2ad
- What's
- Get banned HOT 1
- WhatsApp and Voice Call API and Automation HOT 1
- +628988155422 HOT 1
- Howdy Modi
- G
- b
- Good
- HACKING SERVICES PROVIDER BY LEE ULTIMATE HACKER
- Handling Incoming Whatsapp Calls Programmatically ?
- SSN DOB DL FULLZ USA FRESH UPDATED SIN|NIN CANADA UK CC CVV DUMPS DL|ID F&B
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whatsapi.