batreller / AndroidTelePorter

Converts Android's telegram session into telethon / tdata session, can also be used to exctract any data from mobile session (auth key, dc id, user id and other)
MIT License
93 stars 28 forks source link

Android Extract Session File #8

Closed svip333 closed 5 months ago

svip333 commented 6 months ago

Friends, please contact me, I have left a message for you in the mailbox. I need this tool.

amao12580 commented 6 months ago

Friends, please contact me, I have left a message for you in the mailbox. I need this tool.

What format of session file do you need? Maybe I can help

batreller commented 6 months ago

If you could just explain the issue I would be happy to help you with it, what are you having issue with?

svip333 commented 6 months ago

I need a tool to convert the Android client session file into a session file type that the rest of the program can recognize

batreller commented 6 months ago

So what exactly are you having problems with? My tool can be used exactly for that purposes, it can convert session to any possible format

svip333 commented 6 months ago

I used your tool to make the result in order to merge a string into the session

svip333 commented 6 months ago

Just strings, no session files

batreller commented 6 months ago

Clearly explain everything you did and what you have problems with

svip333 commented 6 months ago

auth key: bytearray(b'HIDDEN') telethon string session: HIDDEN

How to convert to session file

batreller commented 6 months ago

If you need to convert telethon string session into .session file you can use the following code:

string_session = "your string session here"

original_string_session = StringSession(string_session)
sqlite_session = SQLiteSession('abc.session')  # .session is optional
sqlite_session.auth_key = original_string_session.auth_key
sqlite_session.takeout_id = original_string_session.takeout_id
sqlite_session.set_dc(original_string_session.dc_id, original_string_session.server_address, original_string_session.port)
sqlite_session.save()

But I highly suggest you to not share such a sensitive information here, I will hide session in your comment to protect you from people who would want to use your session.

svip333 commented 6 months ago

Please contact me, I will pay you to help me solve the technical problem

svip333 commented 6 months ago

Please contact me in the mailbox and I will tell you my problem