Metadata-Version: 2.4
Name: horus-antidetect
Version: 1.1.0
Summary: Anti-detection scraping & automation framework — works on Windows, Linux, macOS, and Android (Termux)
Home-page: https://github.com/aizen/horus
Author: AIZEN
License: MIT
Project-URL: Source, https://github.com/aizen/horus
Project-URL: Bug Tracker, https://github.com/aizen/horus/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28
Requires-Dist: fake-useragent>=1.5
Provides-Extra: stealth
Requires-Dist: curl_cffi>=0.7.0; extra == "stealth"
Requires-Dist: browserforge[all]>=1.0.0; extra == "stealth"
Provides-Extra: browser
Requires-Dist: camoufox[geoip]>=0.4.0; extra == "browser"
Provides-Extra: all
Requires-Dist: curl_cffi>=0.7.0; extra == "all"
Requires-Dist: browserforge[all]>=1.0.0; extra == "all"
Requires-Dist: camoufox[geoip]>=0.4.0; extra == "all"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 🦅 Horus

Anti-detection scraping & automation framework.  
Supports **Windows / Linux / macOS / Android (Termux)**.

---

## Installation

```bash
pip install horus-antidetect

# Or with browser automation support:
pip install "horus-antidetect[all]"

# After install, update browser fingerprints:
python -m browserforge update
```

---

## Quick Start

### Simple API
```python
import horus

# GET request
r = horus.get("https://example.com")
print(r.status_code, r.text)

# POST request
r = horus.post("https://httpbin.org/post", json={"key": "value"})

# Check detection status
horus.check()
```

### Advanced API
```python
from horus import Horus

h = Horus(
    proxy="http://user:pass@host:port",
    impersonate="chrome124",
    stealth=True,
    speed="human",
)

r = h.get("https://example.com")
print(r.status_code)

# Check IP
print(h.ip())

# Check TLS fingerprint
print(h.tls())
```

---

## Browser Automation (non-Android only)

> **ملحوظة:** كل ميثودز الـ behavioral (`click`, `type`, `scroll_down`, `scroll_up`, `scroll_to`) sync بالكامل — متوافقة مع `camoufox.sync_api`. مفيش حاجة محتاجة `asyncio` في الإصدار ده.

```python
import horus

# Simple
with horus.browse("https://example.com") as b:
    b.open("https://example.com")
    b.click("#login-btn")
    b.type("#username", "myuser")
    b.type("#password", "mypass")
    b.scroll_down(300)
    html = b.html()
    b.screenshot("page.png")
```

```python
# Advanced
from horus import Horus

with Horus(proxy="http://...", headless=False, speed="human") as h:
    with h.browser as b:
        b.open("https://facebook.com")
        b.wait("#email")
        b.type("#email", "user@example.com")
        b.type("#pass", "password123")
        b.click("[name='login']")
```

---

## Proxy Management

```python
from horus import Horus

h = Horus(proxies=[
    "http://user:pass@proxy1:port",
    "http://user:pass@proxy2:port",
    "socks5://proxy3:port",
])

# Validate all proxies
results = h.validate_proxies()

# Rotate manually
h.rotate_proxy()

# Round robin (default) / random / least_used
h = Horus(proxy_strategy="random")
```

---

## Platform Detection

```python
import horus

print(horus.platform())        # 'windows' | 'linux' | 'android' | 'macos'
print(horus.IS_ANDROID)        # True / False

from horus.core.platform import supports_browser, supports_behavioral
print(supports_browser())      # False on Android
print(supports_behavioral())   # False on Android
```

---

## Detection Testing

```python
import horus
from horus.utils import check_ip, check_tls, check_headers, full_report

# Quick checks
print(check_ip())
print(check_tls())
print(check_headers())

# Full report
horus.check()
```

**Test sites:**
- https://bot.sannysoft.com
- https://nowsecure.nl
- https://pixelscan.net
- https://tls.peet.ws/api/all

---

## Architecture

```
horus/
├── __init__.py          ← Simple API (horus.get, horus.browse, ...)
├── horus.py             ← Horus class (Advanced API)
├── core/
│   ├── session.py       ← curl_cffi TLS session
│   ├── headers.py       ← BrowserForge realistic headers
│   └── platform.py      ← OS/platform detection
├── browser/
│   └── engine.py        ← Camoufox wrapper (disabled on Android)
├── behavioral/
│   ├── mouse.py         ← Bezier curve mouse movement
│   ├── typing.py        ← Gaussian delay typing
│   └── scroll.py        ← Physics-based scrolling
├── proxy/
│   └── manager.py       ← Rotation + validation
└── utils/
    └── detector.py      ← Bot detection testing
```

---

## Feature Matrix

| Feature | Windows | Linux | macOS | Android/Termux |
|---------|---------|-------|-------|----------------|
| TLS Fingerprint | ✅ | ✅ | ✅ | ✅ |
| Realistic Headers | ✅ | ✅ | ✅ | ✅ |
| Proxy Rotation | ✅ | ✅ | ✅ | ✅ |
| Browser (Camoufox) | ✅ | ✅ | ✅ | ❌ |
| Mouse Simulation | ✅ | ✅ | ✅ | ❌ |
| Typing Simulation | ✅ | ✅ | ✅ | ❌ |
| Scroll Simulation | ✅ | ✅ | ✅ | ❌ |

---

## TLS Profiles

```python
from horus import Horus
from horus.core.session import IMPERSONATE_PROFILES

print(IMPERSONATE_PROFILES)
# ['chrome124', 'chrome123', 'chrome120', 'edge122', 'edge120', 'safari17_0', ...]

h = Horus(impersonate="safari17_0")
h.rotate_profile()          # random
h.rotate_profile("edge122") # specific
```
