Metadata-Version: 2.1
Name: rtsp-network-scanner
Version: 1.0.1
Summary: Discover and test RTSP camera streams on your network
Home-page: https://github.com/sssanjaya/rtsp-network-scanner
Author: Sanjay H
Author-email: contact@sanjayhona.com.np
License: UNKNOWN
Project-URL: Bug Reports, https://github.com/sssanjaya/rtsp-network-scanner/issues
Project-URL: Source, https://github.com/sssanjaya/rtsp-network-scanner
Project-URL: Documentation, https://github.com/sssanjaya/rtsp-network-scanner#readme
Keywords: rtsp scanner network camera security debug stream video surveillance ipcam monitoring
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Information Technology
Classifier: Topic :: System :: Networking
Classifier: Topic :: System :: Networking :: Monitoring
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Security
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
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: Environment :: Console
Classifier: Natural Language :: English
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest (>=7.0.0) ; extra == 'dev'
Requires-Dist: black (>=22.0.0) ; extra == 'dev'
Requires-Dist: flake8 (>=4.0.0) ; extra == 'dev'
Requires-Dist: twine (>=4.0.0) ; extra == 'dev'

# RTSP Network Scanner

Discover and test RTSP camera streams on your network.

## What is it?

A Python tool to find RTSP cameras, test streams, and discover channels. Perfect for network admins, security professionals, and anyone working with IP cameras.

## Installation

```bash
pip install rtsp-network-scanner
```

## Quick Start

```bash
# Find cameras on your network
rtsp-scanner scan-network 192.168.1.0/24

# Test a specific camera
rtsp-scanner test-url rtsp://192.168.1.100:554/stream

# Discover channels on a camera
rtsp-scanner quick-scan 192.168.1.100

# Get help
rtsp-scanner --help
```

## Features

- 🔍 **Network Scanning** - Find RTSP cameras on any network
- ✅ **URL Testing** - Validate and test RTSP stream URLs
- 📺 **Channel Discovery** - Auto-detect available camera channels
- 🔐 **Credential Testing** - Test common default passwords
- ⚡ **Fast** - Multi-threaded scanning
- 📊 **Export** - Save results as JSON or CSV
- 🐍 **Python API** - Use it in your own scripts

## Usage Examples

### Scan Network for Cameras

```bash
rtsp-scanner scan-network 192.168.1.0/24
```

### Test RTSP URL

```bash
rtsp-scanner test-url rtsp://192.168.1.100:554/stream --username admin --password admin
```

### Find Channels

```bash
rtsp-scanner scan-channels 192.168.1.100
```

### Export Results

```bash
rtsp-scanner scan-network 192.168.1.0/24 --output results.json
```

### Debug Mode

```bash
rtsp-scanner scan-network 192.168.1.0/24 --debug
```

## Python API

```python
from rtsp_scanner.core.port_scanner import PortScanner

# Scan network
scanner = PortScanner()
results = scanner.scan_network('192.168.1.0/24')
print(f"Found {len(results)} cameras")
```

```python
from rtsp_scanner.core.rtsp_tester import RTSPTester

# Test URL
tester = RTSPTester()
result = tester.test_rtsp_connection('rtsp://192.168.1.100:554/stream')
print(f"Reachable: {result['reachable']}")
```

```python
from rtsp_scanner.core.channel_scanner import ChannelScanner

# Find channels
scanner = ChannelScanner()
channels = scanner.quick_scan('192.168.1.100')
for ch in channels:
    print(f"Found: {ch['path']}")
```

## Commands

| Command | Description |
|---------|-------------|
| `scan-network` | Scan network for RTSP ports |
| `scan-ports` | Scan single host |
| `test-url` | Test RTSP URL |
| `validate-url` | Validate URL format |
| `scan-channels` | Discover camera channels |
| `quick-scan` | Fast channel scan |
| `test-credentials` | Test default passwords |

## Common Options

```bash
--debug              # Enable debug output
--output FILE        # Save to JSON/CSV
--timeout SECONDS    # Connection timeout
--workers NUM        # Concurrent threads
```

## Supported Cameras

Works with most IP cameras using RTSP:
- Hikvision
- Dahua
- Axis
- Foscam
- Amcrest
- TP-Link
- Generic ONVIF cameras

## Requirements

- Python 3.7+
- No external dependencies

## Security Notice

⚠️ **Only use on networks you own or have permission to test.**

This tool is for:
- Testing your own cameras
- Authorized security assessments
- Network troubleshooting
- Educational purposes

## License

MIT License - see [LICENSE](LICENSE) file

## Links

- **GitHub**: https://github.com/sssanjaya/rtsp-network-scanner
- **PyPI**: https://pypi.org/project/rtsp-network-scanner/
- **Issues**: https://github.com/sssanjaya/rtsp-network-scanner/issues

## Contributing

Contributions welcome! Please feel free to submit a Pull Request.

## Author

Sanjay H - contact@sanjayhona.com.np


