Skip to content

Commit

Permalink
Upgrade WA protocol to v4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kangfend committed Jan 27, 2021
1 parent b0b80e1 commit 7d8824b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist
build
.idea
.tox
yowsup.json
4 changes: 2 additions & 2 deletions yowsup/env/env_android.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class AndroidYowsupEnv(YowsupEnv):
"YHNtYoIvt5R3X6YZylbPftF/8ayWTALBgcqhkjOOAQDBQADLwAwLAIUAKYCp0d6z4QQdyN74JDfQ2WCyi8CFDUM4CaNB+ceVXd" \
"KtOrNTQcc0e+t"

_MD5_CLASSES = "/QhoCBMppKpKQumhTC8kcQ=="
_MD5_CLASSES = "OHFZJrbMFYP2N+PXHfbS/Q=="
_KEY = "eQV5aq/Cg63Gsq1sshN9T3gh+UUp0wIw0xgHYT1bnCjEqOJQKCRrWxdAe2yvsDeCJL+Y4G3PRD2HUF7oUgiGo8vGlNJOaux26k+A2F3hj8A="

_VERSION = "2.19.244"
_VERSION = "2.21.1"
_OS_NAME = "Android"
_OS_VERSION = "8.0.0"
_DEVICE_NAME = "star2lte"
Expand Down
4 changes: 2 additions & 2 deletions yowsup/layers/noise/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@

class YowNoiseLayer(YowLayer):
DEFAULT_PUSHNAME = "yowsup"
HEADER = b'WA\x03\x00'
HEADER = b'WA\x04\x00'
EDGE_HEADER = b'ED\x00\x01'
EVENT_HANDSHAKE_FAILED = "org.whatsapp.yowsup.layer.noise.event.handshake_failed"

def __init__(self):
super(YowNoiseLayer, self).__init__()
self._wa_noiseprotocol = WANoiseProtocol(
3, 0, protocol_state_callbacks=self._on_protocol_state_changed
4, 0, protocol_state_callbacks=self._on_protocol_state_changed
) # type: WANoiseProtocol

self._handshake_worker = None
Expand Down

0 comments on commit 7d8824b

Please sign in to comment.