jiru / kakaodecrypt

Decrypt chat history from the local database of Kakaotalk’s Android app
Do What The F*ck You Want To Public License
67 stars 27 forks source link

I can't decrypt friends #9

Closed ajou4095 closed 4 years ago

ajou4095 commented 4 years ago

I decrypted chat_logs using your code. It creates friends_dec table, However, It doesn't work.

name, nickname, and other things returns blank, blob, or null.

I think It doesn't work because user_id doesn't exist in friends table. In my case, It has these Integer fields : _id, contact_id, id, type, chat_id, brand_new, blocked, favorite, position, user_type, story_user_id, account_id, hidden, member_type, enc, created_at, new_badge_update_at, new_badge_seen_at. There are no user_id.

If you need my database, I'll send it to you.

ajou4095 commented 4 years ago

+I tried all of integer fields, but I failed.

jiru commented 4 years ago

The user id is necessary to decrypt fields. For the friends table, the user id of the account of the app is used, so it's the same for all rows. It is retrieved from the open_profile table (SELECT user_id FROM open_profile LIMIT 1). Maybe the database schema changed and the user id is not there any more. Sorry but I cannot assist you with finding your user id now. Maybe next month.

jiru commented 4 years ago

@edicom000111 I added a script to help figuring out the user_id value.

  1. Find out the value with ./guess_user_id.py KakaoTalk.db.
  2. Specify the user id with -u: ./kakaodecrypt.py -u user_id KakaoTalk2.db.