Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whatsapp version 2.20.206.24 and YowNoiseLayer change (@iacup pull request ) #3045

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "yk7z7GBLIXbDAGfZLASCKQ=="
_KEY = "eQV5aq/Cg63Gsq1sshN9T3gh+UUp0wIw0xgHYT1bnCjEqOJQKCRrWxdAe2yvsDeCJL+Y4G3PRD2HUF7oUgiGo8vGlNJOaux26k+A2F3hj8A="

_VERSION = "2.19.244"
_VERSION = "2.20.206" # 2.20.206.24
_OS_NAME = "Android"
_OS_VERSION = "8.0.0"
_DEVICE_NAME = "star2lte"
Expand Down
6 changes: 3 additions & 3 deletions yowsup/layers/coder/test_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def setUp(self):
self.decoder.streamStarted = True

def test_decode(self):
data = bytearray([0, 248, 6, 95, 179, 252, 3, 120, 121, 122, 252, 4, 102, 111, 114, 109, 252, 3, 97, 98, 99, 248, 1, 248, 4, 93,
236, 104, 255, 130, 18, 63, 252, 6, 49, 50, 51, 52, 53, 54])
data = bytearray([0, 248, 6, 9, 11, 252, 3, 120, 121, 122, 5, 252, 3, 97, 98, 99, 248, 1, 248, 4, 50, 238, 86, 255, 130, 18, 63,
252, 6, 49, 50, 51, 52, 53, 54])
node = self.decoder.getProtocolTreeNode(data)
targetNode = ProtocolTreeNode("message", {"form": "abc", "to":"xyz"}, [ProtocolTreeNode("media", {"width" : "123"}, data=b"123456")])
targetNode = ProtocolTreeNode("message", {"from": "abc", "to":"xyz"}, [ProtocolTreeNode("media", {"width" : "123"}, data=b"123456")])
self.assertEqual(node, targetNode)
10 changes: 5 additions & 5 deletions yowsup/layers/coder/test_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ def setUp(self):
self.encoder = WriteEncoder(TokenDictionary())

def test_encode(self):
node = ProtocolTreeNode("message", {"form": "abc", "to":"xyz"}, [ProtocolTreeNode("media", {"width" : "123"}, data=b"123456")])
node = ProtocolTreeNode("message", {"from": "abc", "to":"xyz"}, [ProtocolTreeNode("media", {"width" : "123"}, data=b"123456")])
result = self.encoder.protocolTreeNodeToBytes(node)

self.assertTrue(result in (
[0, 248, 6, 95, 179, 252, 3, 120, 121, 122, 252, 4, 102, 111, 114, 109, 252, 3, 97, 98, 99, 248, 1, 248, 4, 93,
236, 104, 255, 130, 18, 63, 252, 6, 49, 50, 51, 52, 53, 54],
[0, 248, 6, 95, 252, 4, 102, 111, 114, 109, 252, 3, 97, 98, 99, 179, 252, 3, 120, 121, 122, 248, 1, 248, 4, 93,
236, 104, 255, 130, 18, 63, 252, 6, 49, 50, 51, 52, 53, 54]
[0, 248, 6, 9, 11, 252, 3, 120, 121, 122, 5, 252, 3, 97, 98, 99, 248, 1, 248, 4, 50, 238, 86, 255, 130, 18, 63,
252, 6, 49, 50, 51, 52, 53, 54],
[0, 248, 6, 9, 5, 252, 3, 97, 98, 99, 11, 252, 3, 120, 121, 122, 248, 1, 248, 4, 50, 238, 86, 255, 130, 18, 63,
252, 6, 49, 50, 51, 52, 53, 54]
)
)

10 changes: 5 additions & 5 deletions yowsup/layers/coder/test_tokendictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ def setUp(self):
self.tokenDictionary = TokenDictionary()

def test_getToken(self):
self.assertEqual(self.tokenDictionary.getToken(80), "iq")
self.assertEqual(self.tokenDictionary.getToken(10), "iq")

def test_getIndex(self):
self.assertEqual(self.tokenDictionary.getIndex("iq"), (80, False))
self.assertEqual(self.tokenDictionary.getIndex("iq"), (10, False))

def test_getSecondaryToken(self):
self.assertEqual(self.tokenDictionary.getToken(238), "amrnb")
self.assertEqual(self.tokenDictionary.getToken(238), "lc")

def test_getSecondaryTokenExplicit(self):
self.assertEqual(self.tokenDictionary.getToken(11, True), "wmv")
self.assertEqual(self.tokenDictionary.getToken(11, True), "reject")

def test_getSecondaryIndex(self):
self.assertEqual(self.tokenDictionary.getIndex("wmv"), (11, True))
self.assertEqual(self.tokenDictionary.getIndex("reject"), (11, True))
Loading