tgback


Nametgback JSON
Version 5.1 PyPI version JSON
download
home_pagehttps://github.com/NotStatilko/tgback
Summarytgback — a program for backing and restoring Telegram accounts
upload_time2024-01-23 12:56:57
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords telegram backup cli account non-official
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TelegramBackup v5.1
######  _Don't forget to look at [changelog](CHANGELOG.md)!_

**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.

**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.

 ## Download & Install
 ### Windows
 You can download builds from the [Releases](https://github.com/NotStatilko/tgback/releases) or from official [TGBACK Channel](https://t.me/nontgback).

 ### Linux and making Windows executable
  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), [ZBar](http://zbar.sourceforge.net) (for QR features, you may ignore it) 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:
  ```bash
  # You can install TGBACK from PIP
  pip install tgback[QR] # Not a Pure-python, with QR
  # pip install tgback # Pure-python, no QR support
  ```
  ```bash
  # Or install from GitHub with GIT by cloning repository
  git clone https://github.com/NotStatilko/tgback
  pip install ./tgback[QR] # Not a Pure-python, with QR
  # pip install ./tgback # Pure-python, no QR support
  ```
  ```bash
  tgback # Run installed TGBACK app
  ```
  If you want to make executable on Linux or Windows then install `pyinstaller`
  ```
  pip install pyinstaller
  ```
  Go to `tgback/pyinstaller` (you should clone repo from GitHub) folder and run
  ```
  pyinstaller TelegramBackup.spec
  ```
  After making TelegramBackup executable check it if it works and after that you can remove all tgback-related stuff (ZBar [if you not on linux], Python, etc).

 #### Linux
 If you want to use tgback on Linux with QR-features then you will need to have a **libzbar0** (or analogue) onto your machine.
 ```
 # Debian OS / Ubuntu OS
 sudo apt install libzbar0
 ```
 ## Backup creation
  To create a backup you need to select **first mode**

  ![main page](https://telegra.ph/file/6752f5bf19b5d3a85fb95.png)

  And choose the way you will create it.

  ![backup](https://telegra.ph/file/dc68092c6f80ba0084206.png)

  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:
  ```
  phone_number; telegram_password; backup_password; backup_filename
  ```
  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.

  ![requestcode](https://telegra.ph/file/45ab9f776fdc84632e64b.png)

After all operations, you will receive a QR code and `.tgback` file. Please **check your backups** for validity for first.

## Backup refresh and number replacement
 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.

**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.

## A bit about security
 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**.

TelegramBackup backups store **session**, upon receipt of which the attacker will receive **FULL** control over your account. Use complex passwords.

Also, 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!

<img src="https://telegra.ph/file/59469cef320ecff9364f8.png" width="300" height="300"></img>

## Involved libraries
1. [**Telethon**](https://github.com/LonamiWebs/Telethon) (MIT License)
2. [**Pillow**](https://github.com/python-pillow/Pillow) (PIL Software License)
3. [**PyAES**](https://github.com/ricmoo/pyaes) (MIT License)
4. [**PyZBar**](https://github.com/NaturalHistoryMuseum/pyzbar) (MIT License)
5. [**python-qrcode**](https://github.com/lincolnloop/python-qrcode) ([LICENSE](https://github.com/lincolnloop/python-qrcode/blob/master/LICENSE))

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/NotStatilko/tgback",
    "name": "tgback",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Telegram,Backup,CLI,Account,Non-official",
    "author": "",
    "author_email": "thenonproton@pm.me",
    "download_url": "https://files.pythonhosted.org/packages/16/7b/fae16341705182eeb6703b1d5114805f4319ea483cba02304818a2d6b8b6/tgback-5.1.tar.gz",
    "platform": null,
    "description": "# TelegramBackup v5.1\n######  _Don't forget to look at [changelog](CHANGELOG.md)!_\n\n**TelegramBackup** \u2014 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.\n\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.\n\n ## Download & Install\n ### Windows\n You can download builds from the [Releases](https://github.com/NotStatilko/tgback/releases) or from official [TGBACK Channel](https://t.me/nontgback).\n\n ### Linux and making Windows executable\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), [ZBar](http://zbar.sourceforge.net) (for QR features, you may ignore it) 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:\n  ```bash\n  # You can install TGBACK from PIP\n  pip install tgback[QR] # Not a Pure-python, with QR\n  # pip install tgback # Pure-python, no QR support\n  ```\n  ```bash\n  # Or install from GitHub with GIT by cloning repository\n  git clone https://github.com/NotStatilko/tgback\n  pip install ./tgback[QR] # Not a Pure-python, with QR\n  # pip install ./tgback # Pure-python, no QR support\n  ```\n  ```bash\n  tgback # Run installed TGBACK app\n  ```\n  If you want to make executable on Linux or Windows then install `pyinstaller`\n  ```\n  pip install pyinstaller\n  ```\n  Go to `tgback/pyinstaller` (you should clone repo from GitHub) folder and run\n  ```\n  pyinstaller TelegramBackup.spec\n  ```\n  After making TelegramBackup executable check it if it works and after that you can remove all tgback-related stuff (ZBar [if you not on linux], Python, etc).\n\n #### Linux\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.\n ```\n # Debian OS / Ubuntu OS\n sudo apt install libzbar0\n ```\n ## Backup creation\n  To create a backup you need to select **first mode**\n\n  ![main page](https://telegra.ph/file/6752f5bf19b5d3a85fb95.png)\n\n  And choose the way you will create it.\n\n  ![backup](https://telegra.ph/file/dc68092c6f80ba0084206.png)\n\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:\n  ```\n  phone_number; telegram_password; backup_password; backup_filename\n  ```\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.\n\n  ![requestcode](https://telegra.ph/file/45ab9f776fdc84632e64b.png)\n\nAfter all operations, you will receive a QR code and `.tgback` file. Please **check your backups** for validity for first.\n\n## Backup refresh and number replacement\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.\n\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.\n\n## A bit about security\n The backups you created **shouldn't** be active since the last update. If you notice something suspicious \u2013 **immediately** disconnect (via Destroy option or Telegram) your backup session. After disconnecting a session, **ALL** backups that are attached to it **will be inacessible**.\n\nTelegramBackup backups store **session**, upon receipt of which the attacker will receive **FULL** control over your account. Use complex passwords.\n\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!\n\n<img src=\"https://telegra.ph/file/59469cef320ecff9364f8.png\" width=\"300\" height=\"300\"></img>\n\n## Involved libraries\n1. [**Telethon**](https://github.com/LonamiWebs/Telethon) (MIT License)\n2. [**Pillow**](https://github.com/python-pillow/Pillow) (PIL Software License)\n3. [**PyAES**](https://github.com/ricmoo/pyaes) (MIT License)\n4. [**PyZBar**](https://github.com/NaturalHistoryMuseum/pyzbar) (MIT License)\n5. [**python-qrcode**](https://github.com/lincolnloop/python-qrcode) ([LICENSE](https://github.com/lincolnloop/python-qrcode/blob/master/LICENSE))\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "tgback \u2014 a program for backing and restoring Telegram accounts",
    "version": "5.1",
    "project_urls": {
        "Download": "https://github.com/NotStatilko/tgback/archive/refs/tags/v5.1.tar.gz",
        "Homepage": "https://github.com/NotStatilko/tgback"
    },
    "split_keywords": [
        "telegram",
        "backup",
        "cli",
        "account",
        "non-official"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7df4c74fbb2f6a6d72067acb876d881d4a8fca9bbef4b1c0c3ec311eab8fa9b",
                "md5": "2058d38cb661d65aa5147f7889807b66",
                "sha256": "d3783f795edcaa48ceab0356accff3fd6d1e7be38954e074be85c6e5fa0b1de1"
            },
            "downloads": -1,
            "filename": "tgback-5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2058d38cb661d65aa5147f7889807b66",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 14658,
            "upload_time": "2024-01-23T12:56:55",
            "upload_time_iso_8601": "2024-01-23T12:56:55.487518Z",
            "url": "https://files.pythonhosted.org/packages/c7/df/4c74fbb2f6a6d72067acb876d881d4a8fca9bbef4b1c0c3ec311eab8fa9b/tgback-5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "167bfae16341705182eeb6703b1d5114805f4319ea483cba02304818a2d6b8b6",
                "md5": "fe1e56cdb29830d0043766d4b7b86257",
                "sha256": "d5ecf165b97ac24e8e5b29033ece96de00cfb1edd43c254c4c3b05889f8e32dd"
            },
            "downloads": -1,
            "filename": "tgback-5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "fe1e56cdb29830d0043766d4b7b86257",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16391,
            "upload_time": "2024-01-23T12:56:57",
            "upload_time_iso_8601": "2024-01-23T12:56:57.512690Z",
            "url": "https://files.pythonhosted.org/packages/16/7b/fae16341705182eeb6703b1d5114805f4319ea483cba02304818a2d6b8b6/tgback-5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-23 12:56:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NotStatilko",
    "github_project": "tgback",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tgback"
}
        
Elapsed time: 0.24088s