BerryFarm / berrymuch

🍇 Power user Unix distribution for Blackberry 10
48 stars 9 forks source link

integrate sendMessageBot, getMessagesBot to contrib/ or dedicated port #71

Open karawitan opened 5 months ago

karawitan commented 5 months ago

hey maybe the BerryFarm admin wants to add my bot and i can read new messages and send a notification ;)

-> needs newer python (3.9.4 was once compiled successfully by extrowerk) or tls > 1.x?

telegram-cloud-photo-size-1-5017233542689696959-y

could use this in a couple ways, but im exploring building an app got to the auth using the phone number but then got this error

File "auth.py", line 23, in request_authentication_code
    conn.request("POST", endpoint, body=json.dumps(params), headers=headers)
  File "stage/armle-v7/usr/lib/python3.2/http/client.py", line 964, in request
  File "stage/armle-v7/usr/lib/python3.2/http/client.py", line 1002, in _send_request
  File "stage/armle-v7/usr/lib/python3.2/http/client.py", line 960, in endheaders
  File "stage/armle-v7/usr/lib/python3.2/http/client.py", line 805, in _send_output
  File "stage/armle-v7/usr/lib/python3.2/http/client.py", line 743, in send
  File "stage/armle-v7/usr/lib/python3.2/http/client.py", line 1105, in connect
  File "stage/armle-v7/usr/lib/python3.2/ssl.py", line 198, in wrap_socket
  File "stage/armle-v7/usr/lib/python3.2/ssl.py", line 291, in init
  File "stage/armle-v7/usr/lib/python3.2/ssl.py", line 287, in init
  File "stage/armle-v7/usr/lib/python3.2/ssl.py", line 473, in do_handshake
ssl.SSLError: [Errno 8] _ssl.c:452: EOF occurred in violation of protocol

the auth api for use login working differently than the bot api so im assuming something with the ssl libraries being outdated

but if i got past this i could build a work app in the browser using python 3.2

I could always build a server to do this… but keeping it locallized to running on the passport is the goal

Braulio Solano Rojas, [2 May 2024 at 21:15:44]: May be it's the TLS version?

m, [2 May 2024 at 21:16:04]: ya probably exactly it

i bet thet http client is using tls 1.0 or something

Braulio Solano Rojas, [2 May 2024 at 21:26:55]: Maybe. It's an old Python version. And there hasn't been success compiling a newer version as port yet.

The BlackBerry Python is in Github. One should track the changes there and try them on the newest versions.

karawitan commented 5 months ago

files uploaded to https://github.com/BerryFarm/berrymuch/tree/add-telegram-bot-issue71/ports-wip/tg-bot-py/files