deachsword / chrline Goto Github PK
View Code? Open in Web Editor NEWLINE Chrome API
License: BSD 3-Clause "New" or "Revised" License
LINE Chrome API
License: BSD 3-Clause "New" or "Revised" License
requestToSendPhonePinCode does not send pin soemhow, may be anything changed? @
Why can't op[10] get the group id?
fetchOps [{1: 51, 2: 1641860644463, 3: 26, 4: 0, 10: '0', 20: {1: 'u33667fda0fe9ad8eadab99a204e2e47d', 2: 'uab852961b13bf960819ce2ae6c09f4e0', 3: 0, 4: '15398606256757', 5: 1641860644460, 14: False, 15: 0, 18: {'e2eeVersion': '2'}, 19: 0, 20: [b'$\xca\xa2\xad\x7f\x9b]\\xb7\x1e\x80Y?\xc4\x0f\x06', b'\xc9\xc9\x87\x7fG|"$\x99\x91b\xdf\x86]V\xb5\xbc\xab{\xaf\xab\xc4*z\x86\xed\x16aD\x8aZ\xc4\xc5_', b'\x00\x00\x00\x00\x00\x00\x00\x13G\xd8S\xb9', '\x006=P', '\x006m\x1a'], 27: []}}, {1: -1, 3: 0, 4: -1}]
Traceback (most recent call last):
File "F:/line/line_caller/line_talking/line_talking_main.py", line 158, in click_start_bot_btn
print("RECEIVE_MESSAGE",opContent.get(1),cl.decryptE2EETextMessage(opContent))
File "F:\line\line_caller\CHRLINE_src\e2ee.py", line 217, in decryptE2EETextMessage
decrypted = self.decryptE2EEMessageV2(
File "F:\line\line_caller\CHRLINE_src\e2ee.py", line 250, in decryptE2EEMessageV2
decrypted = aesgcm.decrypt(sign, message, aad)
File "D:\Anaconda3_x64_2021_11\lib\site-packages\cryptography\hazmat\primitives\ciphers\aead.py", line 202, in decrypt
return aead._decrypt(backend, self, nonce, data, associated_data, 16)
File "D:\Anaconda3_x64_2021_11\lib\site-packages\cryptography\hazmat\backends\openssl\aead.py", line 163, in _decrypt
raise InvalidTag
cryptography.exceptions.InvalidTag
Remove E2EE KEY is no longer possible
可以详细说明下thrift协议构造吗,想做一个C#版本的机器人开源
In order to refresh the subscription, subscriberIds is cached in ConnManager, and it is not being deleted well, and when trying to refresh the old subscriberId seems to result in Code 508.
Client: v2.5.14
Python: 3.6
In order to verify the authenticity, I have been running the bot for half a month, and finally I received Code 508
upup
Can you release for async support?
pleas help me when i run the register using the indonesian number and using the ID the result is not lolls is there any solution
Hello,
I found that when I use the TMoreCompact protocol, the Field of the successful response will be 1 instead of the expected 0
In contrast, other protocols do not have this problem.
upup
Maybe all len( xxx )
are same.
P.S. This mainly occur on getContacts
in large group.
Traceback (most recent call last):
File "/Users/ray/Documents/work/CHRLINE/examples/LineApi.py", line 153, in
api.getSquareMembers()
File "/Users/ray/Documents/work/CHRLINE/examples/LineApi.py", line 129, in getSquareMembers
resp = self.cl.getSquareChatMembers("s5735dba73045027e9a9eecf955878632")
File "/Users/ray/Documents/work/CHRLINE/CHRLINE/services/SquareService.py", line 475, in getSquareChatMembers
return self.postPackDataAndGetUnpackRespData(self.LINE_SQUARE_ENDPOINT, sqrd, self.SquareService_RES_TYPE, encType=0, baseException=SquareService.SQUARE_EXCEPTION)
File "/Users/ray/Documents/work/CHRLINE/CHRLINE/models.py", line 518, in postPackDataAndGetUnpackRespData
tmore = self.TMoreCompactProtocol(
File "/Users/ray/Documents/work/CHRLINE/CHRLINE/thrift.py", line 609, in init
self.d(a) # for data
File "/Users/ray/Documents/work/CHRLINE/CHRLINE/thrift.py", line 640, in d
return self.t() # base init?
File "/Users/ray/Documents/work/CHRLINE/CHRLINE/thrift.py", line 836, in t
self.m() # base init
File "/Users/ray/Documents/work/CHRLINE/CHRLINE/thrift.py", line 776, in m
self.__e.append(bytes(bArr).decode()) # wow magic
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 0: invalid continuation byte
I had changed the method to avoid some errors:
def getSquareChatMembers(self, squareChatMid: str, continuationToken: str = None, limit: int = 200):
GetSquareChatMembersRequest = [
[11, 1, squareChatMid],
[8, 3, limit]
]
if continuationToken is not None:
GetSquareChatMembersRequest.append(
[11, 2, continuationToken])
params = [
[12, 1, GetSquareChatMembersRequest]
]
sqrd = self.generateDummyProtocol("getSquareChatMembers", params, self.SquareService_REQ_TYPE)
return self.postPackDataAndGetUnpackRespData(self.LINE_SQUARE_ENDPOINT, sqrd, self.SquareService_RES_TYPE, encType=0, baseException=SquareService.SQUARE_EXCEPTION)
{'error': {'code': 403, 'message': "This service isn't available in your region or app version.", 'metadata': None, '_data': {1: 403, 3: "This service isn't available in your region or app version."}}}
[2023-04-27 19:54:57] Not support Square: This service isn't available in your region or app version.
When I use login_web, I encounter the error mentioned above. Has anyone experienced this issue? The number is from Thailand.
I had implemented the getJoinedSquareChats
method. But the server response a CHRLINE.exceptions.LineServiceException: Code: -519, Message: NO XLT:Not yet implemented
.
def getJoinedSquareChats(self, continuationToken: str = None, limit=100):
METHOD_NAME = "getJoinedSquareChats"
request = []
if continuationToken is not None:
request.append([11, 2, continuationToken])
request.append([8, 3, limit])
params = [
[12, 1, request]
]
sqrd = self.generateDummyProtocol(
METHOD_NAME,
params,
self.SquareService_REQ_TYPE
)
return self.postPackDataAndGetUnpackRespData(
self.SquareService_API_PATH,
sqrd,
self.SquareService_RES_TYPE,
readWith=f"SquareService.{METHOD_NAME}",
baseException=SquareService.SQUARE_EXCEPTION
)
The error is as below:
[2022-06-27 13:45:33] can't use Line Cube
[2022-06-27 13:45:34] Loading Custom Data: aaf87505fdfb410f45b0461291bbf188
Traceback (most recent call last):
File "/Users/ray/Documents/work/CHRLINE/examples/LineApi.py", line 162, in <module>
api.getJoinedSquareChats()
File "/Users/ray/Documents/work/CHRLINE/examples/LineApi.py", line 128, in getJoinedSquareChats
chats = self.cl.getJoinedSquareChats()
File "/Users/ray/Documents/work/CHRLINE/CHRLINE/services/SquareService.py", line 731, in getJoinedSquareChats
return self.postPackDataAndGetUnpackRespData(
File "/Users/ray/Documents/work/CHRLINE/CHRLINE/models.py", line 524, in postPackDataAndGetUnpackRespData
res = self.serializeDummyProtocolToThrift(
File "/Users/ray/Documents/work/CHRLINE/CHRLINE/models.py", line 801, in serializeDummyProtocolToThrift
raise LineServiceException(
CHRLINE.exceptions.LineServiceException: Code: -519, Message: NO XLT:Not yet implemented
Is E2EE outdated? I have try to decrypt E2EE message with decryptE2EETextMessage method it not working
def recvMessage(self, op, cl):
msg = op.message
if msg.isE2EE:
print(cl.decryptE2EETextMessage(msg))
else:
print(msg)
File "/Users/nn29nap/Desktop/CHRLINE/CHRLINE/e2ee.py", line 97, in generateSharedSecret
curve25519 = Curve25519.calculateAgreement(bytes(private_key), bytes(public_key))
ValueError: input must be 32-byte string
Greetings. I'm encountering issue with one of the file in examples, which is test_register.py.
So, even when I enter all country code and phone number, it literally WOULD NOT send the verify code.
I will be really appreciate it if you can check it out!
If using fetchOps,
and globalRev & individualRev using 0 or wrong value
due to the high speed, too many requests are made to the server in a short time,
which will cause the account to be banned for at least one day
This is a feature that the mobile client is using and is also used in Chrome
So even if we can use fetchOperations, we should also solve this problem
I want to use the function findAndAddContactsByPhone and findContactsByPhone, The old documents have never been used by anyone. Can you give me some advice?
{'error': {'code': 50, 'message': 'Must upgrade', 'metadata': None, 'raw': TalkException(code=50, reason='Must upgrade', parameterMap=None)}}
Traceback (most recent call last):
File "testchrline.py", line 4, in
cl = CHRLINE(useThrift=True)
File "/usr/local/lib/python3.8/dist-packages/CHRLINE/client.py", line 125, in init
self.initAll()
File "/usr/local/lib/python3.8/dist-packages/CHRLINE/client.py", line 129, in initAll
self.profile = self.getProfile()
File "/usr/local/lib/python3.8/dist-packages/CHRLINE/services/TalkService.py", line 303, in getProfile
return self.postPackDataAndGetUnpackRespData(
File "/usr/local/lib/python3.8/dist-packages/CHRLINE/models.py", line 650, in postPackDataAndGetUnpackRespData
raise LineServiceException(res["error"])
CHRLINE.exceptions.LineServiceException: Code: 50, Message: Must upgrade
Trying to sign up while i get this exception again and again line 239, in registerPrimaryWithTokenV3
return self.postPackDataAndGetUnpackRespData("/acct/pais/v1" ,sqrd, 3, headers=self.register_headers)
File "C:\Users\syeda\OneDrive\Desktop\CHRLINE-master_3\CHRLINE-master\CHRLINE\models.py", line 650, in postPackDataAndGetUnpackRespData
raise LineServiceException(res["error"])
CHRLINE.exceptions.LineServiceException: Code: 5, Message: Human verification required in https://w.line.me/sec/v3/recaptcha, token: lsct_acct_init 9e7bd2ea-74b1-4002-9679-890ef235fe29 is there anyway to skip human verification or verify manually through url?
For some reasons, E2EE message is not working on iOS (but works perfectly fine on mac, windows and android).
Code
I used chrline added the Android versionfriends , I can see relevant information on chrline, but there is no infomation on Android, so is sending messages.
[sendLiff] issueLiffView error: Code: 3, Message: user consent required, Metadata: {3: {1: '1562242036', 2: 'https://access.line.me/oauth2/v2.1/authorize/consent?sessionString=ac5yaWgpbx5vKyVM0vaiYivSVFz1Q0MPgOWr0fBXpRTriC9k7gxQsDqQM4Qy89uM&client_id=1562242036&scope=profile+chat_message.write&redirect_uri=https%3A%2F%2Fline-app.tenor.com%2F&response_type=code&prompt=consent&type=LL&lang=en_EN'}}
請問有支援傳訊息到Line社群嗎?
upup
in examples/test_register.py
hv = HumanVerif(verify['error']['metadata'][11][1], verify['error']['metadata'][11][2])
RetryReq(session, hv)
and verify['error']['metadata']
does not return anything
when i run like this
CHRLINE(authTokenOrEmail="", password="")
Then remind me to type in pincode,
When I type in pincode on my phone,the line app reminds me
Unable to process, please try again later
Tried many times, but it didn't work
The odd thing is that every time it reminds me that I need to enter the same pincode
Usually pincode is different every time, i think.
I use the proxy ip address, will it affect?
Help me please for this issue:
[root@jpn chrlinebot]# python3 test_register.py
private_key: b'oDXTluX2NRZRpu03klALvzqqoFK9Ho/303B/grwlEGA='
public_key: b'5VZib6Lg6IhQYiSQPGMCGX7r6+/z1COr1xoDGorcKUw='
nonce: b'jRF/8rgR4jRl/27jZ54yPA=='
[SESSION] lh4JY9mHLXyOSOaxDEa3DW2ptoaAf3ny
input your phone number(0936....): 089510183xxx
input phone number region(TW or JP or...): ID
{'error': {'code': 101, 'message': 'The latest version of LINE is needed to continue. Please update LINE and try again.', 'metadata': None, '_data': {1: 101, 2: 'The latest version of LINE is needed to continue. Please update LINE and try again.'}}}
Traceback (most recent call last):
File "test_register.py", line 85, in
phone2 = cl.getPhoneVerifMethodV2(session, phone, region)
File "/mnt/d/botline/chrlinebot/CHRLINE/services/PrimaryAccountInitService.py", line 168, in getPhoneVerifMethodV2
return self.postPackDataAndGetUnpackRespData("/acct/pais/v1" ,sqrd, 3, headers=self.register_headers)
File "/mnt/d/botline/chrlinebot/CHRLINE/models.py", line 650, in postPackDataAndGetUnpackRespData
raise LineServiceException(res["error"])
CHRLINE.exceptions.LineServiceException: Code: 101, Message: The latest version of LINE is needed to continue. Please update LINE and try again.
recvMessage {1: 438, 2: 1641818031141, 3: 26, 4: 0, 10: '0', 20: {1: 'u33667fda0fe9ad8exxxx9a204e2e47d', 2: 'u0abc2582d3d9ba69c6eb5bf73c7cb2bd', 3: 0, 4: '15396315862160', 5: 1641818031138, 14: False, 15: 0, 18: {'e2eeMark': '1', 'contentType': '0', 'e2eeVersion': '1'}, 19: [], 20: 44, 27: 4, 'opType': 26, 'isE2EE': False}}
python-BaseException
Traceback (most recent call last):
File "D:\PyCharm 2020.3.1\plugins\python\helpers\pydev\pydevd.py", line 1483, in _exec
Traceback (most recent call last):
File "D:\Anaconda3_x64_2021_11\lib\threading.py", line 910, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\PyCharm 2020.3.1\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
self._target(*self._args, **self._kwargs)
File "F:\line\line_caller\CHRLINE_src\hooks.py", line 59, in trace
exec(compile(contents+"\n", file, 'exec'), glob, loc) if _func(self, data, cl):
File "F:\line\line_caller\CHRLINE_src\hksc\types.py", line 22, in __check
File "F:/line/line_caller/0.test_func.py", line 205, in
func(self, args[0], args[1])
File "F:/line/line_caller/0.test_func.py", line 103, in recvMessage
tracer.run()
File "F:\line\line_caller\CHRLINE_src\hooks.py", line 34, in run
self.trace(msg, self.HooksType["Content"], cl)
File "F:\line\line_caller\CHRLINE_src\hooks.py", line 59, in trace
self.runByClient(self.cl)
File "F:\line\line_caller\CHRLINE_src\hooks.py", line 38, in runByClient
for op in cl._Poll__fetchOps():if _func(self, data, cl):
File "F:\line\line_caller\CHRLINE_src\poll.py", line 14, in __fetchOps
File "F:\line\line_caller\CHRLINE_src\hksc\types.py", line 34, in __check
opType = op[3]
func(self, args[0], args[1])KeyError:
File "F:/line/line_caller/0.test_func.py", line 155, in TextMessage
3
self.trace(msg, self.HooksType['Command'], cl)
File "F:\line\line_caller\CHRLINE_src\hooks.py", line 59, in trace
if _func(self, data, cl):
File "F:\line\line_caller\CHRLINE_src\hksc\types.py", line 60, in __check
text = self.cl.decryptE2EETextMessage(msg, msg.get('opType', 26) == 25)
File "F:\line\line_caller\CHRLINE_src\e2ee.py", line 184, in decryptE2EETextMessage
for i in range(len(chunks)):
TypeError: object of type 'int' has no len()
python-BaseException
With my inspection noop
response payload is b'\x82A\x00\x04noop\x00'
And it crash on data read
Traceback (most recent call last):
File "/root/test.py", line 4, in <module>
print(Thrift.TCompactProtocol(None, b'\x82A\x00\x04noop\x00'))
File "/usr/local/lib/python3.10/dist-packages/CHRLINE/thrift.py", line 266, in __init__
self.x()
File "/usr/local/lib/python3.10/dist-packages/CHRLINE/thrift.py", line 474, in x
data, d = self.z(ftype, fid)
File "/usr/local/lib/python3.10/dist-packages/CHRLINE/thrift.py", line 563, in z
raise Exception(f"can't not read type {ftype}")
Exception: can't not read type 0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.