xtor


Namextor JSON
Version 0.4.3 PyPI version JSON
download
home_pagehttps://github.com/khalidelborai/xtor
SummaryManage Tor instances
upload_time2023-07-10 16:34:53
maintainer
docs_urlNone
authorkhalidelborai
requires_python>=3.7,<4.0
licenseGNU Version 3
keywords tor torrc torrc manager tor manager tor instance proxy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            xtor
===============================

xtor is a simple tool for managing Tor instances.

## Installation

- Linux
  - `sudo apt-get install tor`
  - `sudo apt-get install obfs4proxy`

- Windows
  - Download and install Tor Expert Bundle
    - `https://archive.torproject.org/tor-package-archive/torbrowser/12.5a6/tor-expert-bundle-12.5a6-windows-x86_64.tar.gz`
    - `https://archive.torproject.org/tor-package-archive/torbrowser/12.5a6/tor-expert-bundle-12.5a6-windows-i686.tar.gz`

Then install the python package:

`pip install xtor`

## Usage

```python
from xtor import Tor

tor = Tor.startTor(
    port=9052,
    control_port=9053,
    host="127.0.0.1",
    password="passw0rd",
    init_msg_handler=print,
    path="/usr/bin/tor", # optional, primarily for windows
)

with tor:
  print(tor.ip)
  print(tor.client.get("https://api.ipify.org").text)


# connect to an existing tor instance

tor = Tor(
    port=9052,
    control_port=9053,
    host="127.0.0.1",
    password="passw0rd",
)

with tor:
  print(tor.ip)
  print(tor.client.get("https://api.ipify.org").text)
  tor.new_identity(wait=True) # get a new identity and wait for it to be ready (new ip)
  print(tor.ip)
```

## CLI

```bash
xtor --help
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/khalidelborai/xtor",
    "name": "xtor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "tor,torrc,torrc manager,tor manager,tor instance,proxy",
    "author": "khalidelborai",
    "author_email": "elboraikhalid@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cd/1a/5d276cb0663f1843f4a90cc8ef5251f46f63d925646719947ef06a4b489f/xtor-0.4.3.tar.gz",
    "platform": null,
    "description": "xtor\n===============================\n\nxtor is a simple tool for managing Tor instances.\n\n## Installation\n\n- Linux\n  - `sudo apt-get install tor`\n  - `sudo apt-get install obfs4proxy`\n\n- Windows\n  - Download and install Tor Expert Bundle\n    - `https://archive.torproject.org/tor-package-archive/torbrowser/12.5a6/tor-expert-bundle-12.5a6-windows-x86_64.tar.gz`\n    - `https://archive.torproject.org/tor-package-archive/torbrowser/12.5a6/tor-expert-bundle-12.5a6-windows-i686.tar.gz`\n\nThen install the python package:\n\n`pip install xtor`\n\n## Usage\n\n```python\nfrom xtor import Tor\n\ntor = Tor.startTor(\n    port=9052,\n    control_port=9053,\n    host=\"127.0.0.1\",\n    password=\"passw0rd\",\n    init_msg_handler=print,\n    path=\"/usr/bin/tor\", # optional, primarily for windows\n)\n\nwith tor:\n  print(tor.ip)\n  print(tor.client.get(\"https://api.ipify.org\").text)\n\n\n# connect to an existing tor instance\n\ntor = Tor(\n    port=9052,\n    control_port=9053,\n    host=\"127.0.0.1\",\n    password=\"passw0rd\",\n)\n\nwith tor:\n  print(tor.ip)\n  print(tor.client.get(\"https://api.ipify.org\").text)\n  tor.new_identity(wait=True) # get a new identity and wait for it to be ready (new ip)\n  print(tor.ip)\n```\n\n## CLI\n\n```bash\nxtor --help\n```\n",
    "bugtrack_url": null,
    "license": "GNU Version 3",
    "summary": "Manage Tor instances",
    "version": "0.4.3",
    "project_urls": {
        "Homepage": "https://github.com/khalidelborai/xtor",
        "Repository": "https://github.com/khalidelborai/xtor"
    },
    "split_keywords": [
        "tor",
        "torrc",
        "torrc manager",
        "tor manager",
        "tor instance",
        "proxy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "455a9c22fa96a01d9e7c6f2c43d4a753cc80ab36c6a446e4424ef2fa40ce5c7f",
                "md5": "fdd6c64089a98e80a0125b8f521ae034",
                "sha256": "3c9cf70d786402b417606933fdf72c4bfceabc90efa1f22846f7ba82173db458"
            },
            "downloads": -1,
            "filename": "xtor-0.4.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fdd6c64089a98e80a0125b8f521ae034",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 5202,
            "upload_time": "2023-07-10T16:34:51",
            "upload_time_iso_8601": "2023-07-10T16:34:51.954477Z",
            "url": "https://files.pythonhosted.org/packages/45/5a/9c22fa96a01d9e7c6f2c43d4a753cc80ab36c6a446e4424ef2fa40ce5c7f/xtor-0.4.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd1a5d276cb0663f1843f4a90cc8ef5251f46f63d925646719947ef06a4b489f",
                "md5": "750a9ddef39728adc67eb45e3afefbc5",
                "sha256": "4483fd38ae273116263e33364f6da37d16add3c8486c37d2eb2980200c3315e0"
            },
            "downloads": -1,
            "filename": "xtor-0.4.3.tar.gz",
            "has_sig": false,
            "md5_digest": "750a9ddef39728adc67eb45e3afefbc5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 4200,
            "upload_time": "2023-07-10T16:34:53",
            "upload_time_iso_8601": "2023-07-10T16:34:53.776880Z",
            "url": "https://files.pythonhosted.org/packages/cd/1a/5d276cb0663f1843f4a90cc8ef5251f46f63d925646719947ef06a4b489f/xtor-0.4.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-10 16:34:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "khalidelborai",
    "github_project": "xtor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "xtor"
}
        
Elapsed time: 0.32137s