whalibmob 5.40.40 → 5.40.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/noise.js CHANGED
@@ -646,6 +646,10 @@ class NoiseSocket extends EventEmitter {
646
646
  dnsSource: { dnsMethod: require('./socks').socksProxyUrl() ? 7 : 0, appCached: false },
647
647
  trafficAnonymization: 0,
648
648
  connectionSequenceInfo: 5,
649
+ // paaLink (field 44) — the real 2.26.44.90 client writes this bool on
650
+ // every fresh phone login as false; matching it keeps the payload's
651
+ // field-set indistinguishable from the native client's.
652
+ paaLink: false,
649
653
  userAgent: {
650
654
  // Which client this says it is. The server checks the announced
651
655
  // version against *this* platform, so a wrong number here comes back
package/lib/proto.js CHANGED
@@ -69,7 +69,7 @@ function encodeDnsSource({ dnsMethod, appCached }) {
69
69
  return Buffer.concat(parts);
70
70
  }
71
71
 
72
- function encodeClientPayload({ username, passive, userAgent, pushName, sessionId, shortConnect, connectType, connectReason, dnsSource, connectAttemptCount, device, oc, lc, yearClass, memClass, trafficAnonymization, connectionSequenceInfo }) {
72
+ function encodeClientPayload({ username, passive, userAgent, pushName, sessionId, shortConnect, connectType, connectReason, dnsSource, connectAttemptCount, device, oc, lc, yearClass, memClass, trafficAnonymization, connectionSequenceInfo, paaLink }) {
73
73
  const uaBuf = encodeUserAgent(userAgent);
74
74
  const parts = [
75
75
  field(1, VARINT, varint(username)),
@@ -90,6 +90,12 @@ function encodeClientPayload({ username, passive, userAgent, pushName, sessionId
90
90
  if (memClass !== undefined) parts.push(field(37, VARINT, varint(memClass)));
91
91
  if (trafficAnonymization !== undefined) parts.push(field(40, VARINT, varint(trafficAnonymization)));
92
92
  if (connectionSequenceInfo !== undefined) parts.push(field(43, VARINT, varint(connectionSequenceInfo)));
93
+ // paaLink (field 44, bool). The live 2.26.44.90 registration capture carries
94
+ // it on every fresh phone login as `paaLink = 0` — the field is written by the
95
+ // X.1JB filler and is present (as false) even when no link exists. Omitting it
96
+ // left whalibmob's payload field-set distinguishable from the real client, so
97
+ // it now rides along, defaulting to false and overridable through the call site.
98
+ if (paaLink !== undefined) parts.push(field(44, VARINT, bool(paaLink)));
93
99
  return Buffer.concat(parts);
94
100
  }
95
101
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whalibmob",
3
- "version": "5.40.40",
3
+ "version": "5.40.42",
4
4
  "description": "Node.js library for WhatsApp — register a number over SMS, or link as a companion by QR. Signal E2E encryption, media, groups, channels.",
5
5
  "author": "Kunboruto20",
6
6
  "main": "index.js",