Skip to content
KitploitKITPLOIT
أدواتالمدونة
إرسال
أدواتالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

··الخلاصات·اتصال·الخصوصية·© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
xtor | Kitploit
أدوات/GitHubGitHub/khalidelborai/xtor
البرمجة النصية والأتمتةأمن الشبكاتالخصوصيةالأدوات والمكوناتزاحف الويب
GitHubkhalidelborai/xtor

xtor

عرض المستودع
11منذ 6 أشهرلم تتم المراجعة بعد

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →
مشاركة
الموقع الإلكتروني

xtor

مكتبة بايثون لإدارة مثيلات Tor برمجياً.

PyPI version Python 3.10+ License: GPL-3.0-or-later CI

الميزات

  • تشغيل عمليات Tor جديدة أو الاتصال بعمليات قائمة
  • عملاء httpx مُهيؤون مسبقاً (متزامن + غير متزامن) مع وكيل SOCKS5
  • تبديل الهوية مع إمكانية الانتظار حتى الحصول على عنوان IP جديد
  • عزل التدفقات لفصل حركة المرور
  • إدارة الدوائر والتدفقات
  • معلومات عن عقدة الخروج (الدولة، النطاق الترددي، الأعلام)
  • خدمات مخفية مؤقتة (.onion)
  • مستمعو الأحداث (أحداث الدائرة، التدفق، النطاق الترددي)
  • TorPool لإدارة مثيلات متعددة مع اختيار دائري وعشوائي
  • مثيلات مسماة مع إدارة عبر سطر الأوامر
  • تسلسل استثناءات مخصص لمعالجة أخطاء دقيقة

التثبيت

المتطلبات الأساسية

لينكس (Debian/Ubuntu):

root@kitploit:~
sudo apt-get install tor obfs4proxy

ويندوز:

قم بتنزيل حزمة Tor Expert Bundle من torproject.org.

حزمة بايثون

root@kitploit:~
pip install xtor
# أو
uv add xtor

بدء سريع

root@kitploit:~
from xtor import Tor

with Tor.start(port=9052, control_port=9053, host="127.0.0.1") as tor:
    print(f"Connected through IP: {tor.ip}")
    resp = tor.client.get("https://api.ipify.org")
    print(resp.text)

الاستخدام

تشغيل عملية Tor جديدة

root@kitploit:~
from xtor import Tor
from xtor.exceptions import TorNotFoundError, PortInUseError

try:
    with Tor.start(port=9052, control_port=9053, host="127.0.0.1", password="mypass") as tor:
        print(tor.ip)
        resp = tor.client.get("https://api.ipify.org")
        print(resp.text)
except TorNotFoundError:
    print("Tor not found on PATH")
except PortInUseError as e:
    print(f"Port in use: {e}")

ملاحظة: Tor.startTor() متاح كاسم بديل لـ Tor.start() للتوافق مع الإصدارات السابقة.

الاتصال بمثيل قائم

root@kitploit:~
with Tor(password="mypass", port=9050, control_port=9051) as tor:
    print(tor.ip)

هوية جديدة

root@kitploit:~
with Tor.start(port=9052, control_port=9053, host="127.0.0.1") as tor:
    print(tor.ip)
    tor.new_identity(wait=True, timeout=30)
    print(tor.ip)  # New IP

عميل غير متزامن

root@kitploit:~
import asyncio
from xtor import Tor

async def main():
    with Tor.start(port=9052, control_port=9053, host="127.0.0.1") as tor:
        async with tor.async_client as client:
            resp = await client.get("https://api.ipify.org")
            print(resp.text)

asyncio.run(main())

عزل التدفقات

root@kitploit:~
with Tor.start(port=9052, control_port=9053, host="127.0.0.1") as tor:
    # Each key gets its own circuit
    client_a = tor.isolated_client("session-a")
    client_b = tor.isolated_client("session-b")
    # Requests through client_a and client_b use different circuits

إدارة الدوائر

root@kitploit:~
with Tor.start(port=9052, control_port=9053, host="127.0.0.1") as tor:
    circuits = tor.get_circuits()
    for c in circuits:
        print(f"Circuit {c.id}: {c.status}, path: {c.path}")

    # Close a specific circuit
    tor.close_circuit(circuits[0].id)

معلومات عقدة الخروج

root@kitploit:~
with Tor.start(port=9052, control_port=9053, host="127.0.0.1") as tor:
    info = tor.exit_node
    if info:
        print(f"Exit: {info.nickname} ({info.country})")
        print(f"Flags: {info.flags}")

الخدمات المخفية

root@kitploit:~
with Tor.start(port=9052, control_port=9053, host="127.0.0.1") as tor:
    service = tor.create_hidden_service({80: 8080})
    print(f"Service: {service.onion_address}")

    # Remove when done
    tor.remove_hidden_service(service)

مستمعو الأحداث

root@kitploit:~
with Tor.start(port=9052, control_port=9053, host="127.0.0.1") as tor:
    def on_bandwidth(event):
        print(f"Read: {event.read}, Written: {event.written}")

    tor.add_event_listener("BW", on_bandwidth)
    # ... do work ...
    tor.remove_event_listener(on_bandwidth)

TorPool

root@kitploit:~
from xtor import TorPool

with TorPool(size=3, base_port=9100, password="secret") as pool:
    # Round-robin
    tor = pool.next()
    print(tor.client.get("https://api.ipify.org").text)

    # Rotate all identities
    pool.rotate_all()

    # Random selection
    tor = pool.random()

المثيلات المسماة (بايثون)

root@kitploit:~
from xtor import Tor

# Start named instance
tor = Tor.start(port=9052, control_port=9053, host="127.0.0.1", name="my-tor")

# Later, reconnect by name
tor = Tor.from_name("my-tor")
with tor:
    print(tor.ip)

مرجع سطر الأوامر

يدير CLI الخاص بـ xtor المثيلات المسماة لـ Tor كعمليات خلفية.

root@kitploit:~
# Start a named instance
xtor start my-tor --port 9052 --control-port 9053

# List instances
xtor list

# Connection details
xtor connect my-tor

# Stop instance
xtor stop my-tor

# Remove instance and data
xtor remove my-tor

الاستثناءات المخصصة

root@kitploit:~
XtorError (base)
├── TorNotFoundError
├── PortInUseError
├── IdentityChangeTimeout
├── ConnectionError
└── AuthenticationError

نمط الالتقاط الشامل:

root@kitploit:~
from xtor.exceptions import XtorError

try:
    with Tor.start(port=9052, control_port=9053, host="127.0.0.1") as tor:
        ...
except XtorError as e:
    print(f"xtor error: {e}")

الترخيص

GPL-3.0-or-later

تنزيل الأداة