Giter VIP home page Giter VIP logo

telegram-desktop-decrypt's Introduction

telegram-desktop-decrypt

Tool to decrypt tdata files.

Telegram Desktop (the one that runs on desktops, not on phones) has a "tdata" folder where it stores some encrypted files. This folder is normally found at "~/.local/share/TelegramDesktop" on Linux and at "%USERPROFILE%\AppData\Roaming\Telegram Desktop" on Windows.

This tool can decrypt those files, which contains settings and cache files, but not chat histories because these are not included in tdata.

Usage

./telegram-desktop-decrypt bulkdecrypt tdata/D877F783D5D3EF8C/map0 outdir

This will produce 3 kinds of files:

  • .rawencrypted: decrypted unparsed file
  • .cache: The cache file (may be a JPEG, video, or any type of shared file).
  • .json: settings or metadata about the cache file.

The .rawencrypted files are files that were decrypted but are still unparsed. Only some types of structure have parsing support. For those, .json or .cache files are produced too.

telegram-desktop-decrypt's People

Contributors

atilaromero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram-desktop-decrypt's Issues

"keytype not treated"

Using the latest TG app as of today, 1.8.2, MX Linux (Debian derivative).
Built the decryptor with plain downloading go and installing in /usr/local as per the golang.org instructions. "go build" in the directory where main.go is at.
mkdir decrypted
./telegram-desktop-decrypt bulkdecrypt ~/.local/share/TelegramDesktop/tdata/D877F783D5D3EF8C/map0 decrypted/
could not decrypt file '/home/[myname]/.local/share/TelegramDesktop/tdata/D877F783D5D3EF8C/map0': keytype not treated: 154048071

This is all.. greek.. to me. What might this be?

No map0 file

Only a maps file in directory tdata\D877F783D5D3EF8C and other random generated files.

Program fails using maps file

11:38:04 could not decrypt file 'tdata/D877F783D5D3EF8C/maps': keytype not treated: 865852196
github.com/atilaromero/telegram-desktop-decrypt/tdata/decrypted.ReadDMap

What changes in every update?

Hi, I tried to decrypt tdata file from latest version of telegram with this tool and it didn't work, and tried with older version and it worked and decrypted tdata file.
My question is what changes in every update in telegram desktop and what should I change in this tool to work?

How to execute?

Hello,

you are writing in README.md that the program can be executed with

./telegram-desktop-decrypt

However, there is no description how to build the executable file. What do I need to do? (in Windows or in Linux)?

License

Hey, can you please add LICENSE to your project so we can continue it?

correct command in cmd

Hi
I have been using the below command in cmd, and it want an argument for flag part.

telegram-desktop-decrypt_windows_amd64.exe decrypt C:\Users\sgr\AppData\Roaming\Telegram Desktop\tdata\D877F783D5D3EF8C F100C0A2FB11645As --stream

\
Err: flag needs an argument: --stream
Usage:
telegram-desktop-decrypt_windows_amd64.exe decrypt [tdata file] [key in hex (only first 136 bytes matter)] [flags]

Flags:
-h, --help help for decrypt
-s, --stream int stream number (default=0)
\\

i dont know how to find the right argument for flag

How to get session information?

I want to convert
tdata\D877F783D5D3EF8C\map[0-1]
tdata\D877F783D5D3EF8C[0-1]
files to another format that i can use.

At least I need to get auth_key from this files.

Is there any way to do it?

No File load after successful excecute

Is this tool still work for the new version of telegram because I tried both Linux and Windows and got the same result but no any file has decrypted. Is there the further steps for this? Please help, thanks you
Result below:
Windows
"tdata>telegram-desktop-decrypt_windows_amd64.exe bulkdecrypt D877F783D5D3EF8C\maps D877F783D5D3EF8C\NewFolder -p OK
2022/03/04 15:44:53 expected 3 streams, got 1"

how can i decrypt a jpg file

Hi,

i recieved a JPG file from an user in telegram but the file is encrypted (photo.jpg.enc). Can i decrypt the file? and how can i do that?

i tried to run the ./telegram-desktop-decrypt but doesnt work.

Regards

"could not decrypt map file"

Telegram version v1.9.7
Windows 10 (Version 10.0.18362.30) x64

telegram-desktop-decrypt bulkdecrypt tdata/D877F783D5D3EF8C/map0 outdir
could not decrypt map file: could not decrypt map key: wrong key

now what ๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ

Windows x64 Not working with TDesktop v3.6.1 "latest"

telegram-desktop-decrypt_windows_amd64.exe bulkdecrypt "C:\Users\jpc\AppData\Roaming\Telegram Desktop\tdata\D877F783D5D3EF8C\6A66322DEDD01B80s" "C:\Users\jpc\AppData\Roaming\Telegram Desktop\tdata\Decrypted"

bulkdecrypt
map decrypt
map listkeys
Error:
expected 3 got 1

map getkey
accepts 1 received 2

there are other files
maps 1KB
config 1KB
6A66322DEDD01B80s 462KB
etc...
also outside in .\tdata\ are other s files.
6608E97F6AD5764As 211KB
etc...

Can not parse settings in current Telegram versions

Getting the next error when launching program with settings decrypt tdata/settingss parameters:

could not interpret settings file: blockID not found: 96
error parsing cache file
github.com/atilaromero/telegram-desktop-decrypt/tdata/decrypted.ParseCache
        /home/travis/gopath/src/github.com/atilaromero/telegram-desktop-decrypt/tdata/decrypted/parse.go:89
main.main.func3
        /home/travis/gopath/src/github.com/atilaromero/telegram-desktop-decrypt/cmd/telegram-desktop-decrypt/main.go:110
github.com/atilaromero/telegram-desktop-decrypt/vendor/github.com/spf13/cobra.(*Command).execute
        /home/travis/gopath/src/github.com/atilaromero/telegram-desktop-decrypt/vendor/github.com/spf13/cobra/command.go:766
github.com/atilaromero/telegram-desktop-decrypt/vendor/github.com/spf13/cobra.(*Command).ExecuteC
        /home/travis/gopath/src/github.com/atilaromero/telegram-desktop-decrypt/vendor/github.com/spf13/cobra/command.go:852
github.com/atilaromero/telegram-desktop-decrypt/vendor/github.com/spf13/cobra.(*Command).Execute
        /home/travis/gopath/src/github.com/atilaromero/telegram-desktop-decrypt/vendor/github.com/spf13/cobra/command.go:800
main.main
        /home/travis/gopath/src/github.com/atilaromero/telegram-desktop-decrypt/cmd/telegram-desktop-decrypt/main.go:299
runtime.main
        /home/travis/.gimme/versions/go1.12.1.linux.amd64/src/runtime/proc.go:200
runtime.goexit
        /home/travis/.gimme/versions/go1.12.1.linux.amd64/src/runtime/asm_amd64.s:1337

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.