{"id":19588423,"url":"https://github.com/notstatilko/tgback","last_synced_at":"2025-04-27T12:31:44.502Z","repository":{"id":37504340,"uuid":"215011292","full_name":"NotStatilko/tgback","owner":"NotStatilko","description":"tgback — a program for backing and restoring Telegram accounts","archived":false,"fork":false,"pushed_at":"2024-06-26T13:27:44.000Z","size":10916,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T06:06:07.623Z","etag":null,"topics":["backup-telegram-accounts","backups","telegram"],"latest_commit_sha":null,"homepage":"https://t.me/nontgback","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotStatilko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-14T10:13:21.000Z","updated_at":"2024-09-04T13:47:23.000Z","dependencies_parsed_at":"2024-04-11T09:41:48.142Z","dependency_job_id":"94922b75-cfa3-4c7e-9c61-b76c177cfb1c","html_url":"https://github.com/NotStatilko/tgback","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotStatilko%2Ftgback","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotStatilko%2Ftgback/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotStatilko%2Ftgback/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotStatilko%2Ftgback/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotStatilko","download_url":"https://codeload.github.com/NotStatilko/tgback/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224069407,"owners_count":17250456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup-telegram-accounts","backups","telegram"],"created_at":"2024-11-11T08:13:42.808Z","updated_at":"2025-04-27T12:31:44.494Z","avatar_url":"https://github.com/NotStatilko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TelegramBackup v5.2.1\r\n\r\n**!!! This project is mostly legacy now. Check out improved and revisited version — [TgbackXQt](https://github.com/NotStatilko/tgback-x-qt) !!!**\r\n\r\n######  _Don't forget to look at [changelog](CHANGELOG.md)!_\r\n\r\n**TelegramBackup** — console application created to backup Telegram accounts. Due to the features of Telegram you will be **not able** to log into your account if you lose access to the phone number (SIM card). **TGBACK** provides the ability to create an _alternative session_ (as if you were logging in from another device) and get login code or change the number on which the account is linked.\r\n\r\n**TelegramBackup** produces a special `.tgback` file as well as a QR code - both are your backup. You can choose what is more convenient for you to store, as `.tgback` and a QR code represent **the same** session. For encryption of backups, **AES-256-CBC** is used with a [scrypt](https://en.wikipedia.org/wiki/Scrypt) key.\r\n\r\n ## Download \u0026 Install\r\n ### Windows\r\n You can download builds from the [Releases](https://github.com/NotStatilko/tgback/releases) or from official [TGBACK Channel](https://t.me/nontgback).\r\n\r\n ### Linux and making Windows executable\r\n  If you want to make a **TelegramBackup** app then you need to install all dependencies. For the program to work correctly, you need to have [Python 3.7+](https://python.org) and [pip](https://pypi.org/project/pip/) (it can be already installed with Python 3.7+, type `pip` or `pip3` in your terminal/cmd). After that, run:\r\n  ```bash\r\n  # You can install TGBACK from PIP\r\n  pip install tgback[QR] # Not a Pure-python, with QR\r\n  # pip install tgback # Pure-python, no QR support\r\n  ```\r\n  ```bash\r\n  # Or install from GitHub with GIT by cloning repository\r\n  git clone https://github.com/NotStatilko/tgback\r\n  pip install ./tgback[QR] # Not a Pure-python, with QR\r\n  # pip install ./tgback # Pure-python, no QR support\r\n  ```\r\n  ```bash\r\n  tgback # Run installed TGBACK app\r\n  ```\r\n  If you want to make executable on Linux or Windows then install `pyinstaller`\r\n  ```\r\n  pip install pyinstaller\r\n  ```\r\n  Go to `tgback/pyinstaller` (you should clone repo from GitHub) folder and run\r\n  ```\r\n  pyinstaller TelegramBackup.spec\r\n  ```\r\n  After making TelegramBackup executable check it if it works and after that you can remove all build related stuff like Python.\r\n\r\n #### Linux\r\n If you want to use tgback on Linux with QR-features then you will need to have a **libzbar0** (or analogue) onto your machine.\r\n ```\r\n # Debian OS / Ubuntu OS\r\n sudo apt install libzbar0\r\n ```\r\n ## Backup creation\r\n  To create a backup you need to select **first mode**\r\n\r\n  ![main page](https://telegra.ph/file/6752f5bf19b5d3a85fb95.png)\r\n\r\n  And choose the way you will create it.\r\n\r\n  ![backup](https://telegra.ph/file/dc68092c6f80ba0084206.png)\r\n\r\n  You can enter everything manually, or create a special `tgback-config` file. If the first method is inconvenient for you, create a text file and fill it out using this template:\r\n  ```\r\n  phone_number; telegram_password; backup_password; backup_filename\r\n  ```\r\n  Next, you will need to enter the code that Telegram will send you. If this doesn't happen, then you can request the code again. After three attempts, Telegram will **call you** and the robot will dictate it.\r\n\r\n  ![requestcode](https://telegra.ph/file/45ab9f776fdc84632e64b.png)\r\n\r\nAfter all operations, you will receive a QR code and `.tgback` file. Please **check your backups** for validity for first.\r\n\r\n## Backup refresh and number replacement\r\n Due to discovered [problem](https://github.com/NotStatilko/tgback/issues/2) backups need to be updated periodically, so that the session doesn't turn off automatically due to inactivity. At the moment once every three months. We can probably increase it to five, but testing is needed.\r\n\r\n**TelegramBackup** automatically creates a reminder message, so you will be notified a week before the deadline. You can refresh the backup and change the number in the mode under number **2**. After refreshing the backup, you will receive a new updated QR code and `.tgback` file. Old backups will remain working, but they will be show the wrong amount of time before the expiration.\r\n\r\n## A bit about security\r\n The backups you created **shouldn't** be active since the last update. If you notice something suspicious – **immediately** disconnect (via Destroy option or Telegram) your backup session. After disconnecting a session, **ALL** backups that are attached to it **will be inacessible**.\r\n\r\nTelegramBackup backups store **session**, upon receipt of which the attacker will receive **FULL** control over your account. Use complex passwords.\r\n\r\nAlso, no security audits have been conducted by competent people, so I **do not guarantee** complete cryptographic strength. If you have any suggestions, open issue. I am attaching a QR-backup of my account here, try to hack it if you want!\r\n\r\n\u003cimg src=\"https://telegra.ph/file/59469cef320ecff9364f8.png\" width=\"300\" height=\"300\"\u003e\u003c/img\u003e\r\n\r\n## Involved libraries\r\n1. [**Telethon**](https://github.com/LonamiWebs/Telethon) (MIT License)\r\n2. [**Pillow**](https://github.com/python-pillow/Pillow) (PIL Software License)\r\n3. [**PyAES**](https://github.com/ricmoo/pyaes) (MIT License)\r\n4. [**PyZBar**](https://github.com/NaturalHistoryMuseum/pyzbar) (MIT License)\r\n5. [**python-qrcode**](https://github.com/lincolnloop/python-qrcode) ([LICENSE](https://github.com/lincolnloop/python-qrcode/blob/master/LICENSE))\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotstatilko%2Ftgback","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotstatilko%2Ftgback","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotstatilko%2Ftgback/lists"}