Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khalidelborai/xtor
https://github.com/khalidelborai/xtor
proxy proxy-list tor webscraping
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/khalidelborai/xtor
- Owner: khalidelborai
- Created: 2023-06-28T13:02:39.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-07-10T16:34:37.000Z (over 1 year ago)
- Last Synced: 2024-04-14T08:52:30.761Z (10 months ago)
- Topics: proxy, proxy-list, tor, webscraping
- Language: Python
- Homepage: https://khalidelborai.github.io/xtor/
- Size: 51.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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 Tortor = 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
```