Skip to content

Commit 592c8e9

Browse files
author
Tom Softreck
committed
update
1 parent 4ffa90f commit 592c8e9

File tree

3 files changed

+103
-8
lines changed

3 files changed

+103
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.idea
22
.old
3+
.todo.txt
34
old
45
cleanup_old_repo.sh
56
poetry.lock

scripts/README.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# DialogChain Scripts: Network Scanning
2+
3+
## Overview
4+
5+
This directory contains scripts for network and printer discovery in DialogChain. The main script for network scanning is `network_scanner.py`, which can detect devices and camera services (RTSP, HTTP, ONVIF, etc.) on your network.
6+
7+
---
8+
9+
## Requirements
10+
11+
- Python 3.8+
12+
- Install dependencies:
13+
```bash
14+
pip install -r ../../requirements.txt
15+
# or for direct script use:
16+
pip install aiohttp python-nmap opencv-python
17+
```
18+
19+
---
20+
21+
## Usage: network_scanner.py
22+
23+
Scan your network for devices and services:
24+
25+
```bash
26+
python3 network_scanner.py --network 192.168.1.0/24
27+
```
28+
29+
Scan for cameras (RTSP, HTTP, ONVIF):
30+
31+
```bash
32+
python3 network_scanner.py --network 192.168.1.0/24 --service rtsp,http,https,onvif --port 80,443,554,8000-8090,8443,8554,8888,9000-9001,10000-10001 --verbose
33+
```
34+
35+
Scan a specific device:
36+
37+
```bash
38+
python3 network_scanner.py --network 192.168.188.176 --service rtsp,http,https,onvif --port 80,443,554,8000,8080,8443,8554,8888
39+
```
40+
41+
---
42+
43+
## Makefile Shortcuts
44+
45+
Use the Makefile in the parent directory for common scans:
46+
47+
- **Scan default network:**
48+
```bash
49+
make scan-network
50+
```
51+
- **Scan for cameras:**
52+
```bash
53+
make scan-cameras
54+
```
55+
- **Scan a specific camera:**
56+
```bash
57+
make scan-camera IP=192.168.188.176
58+
```
59+
- **Scan common local ranges for cameras:**
60+
```bash
61+
make scan-local-camera
62+
```
63+
- **Quick scan:**
64+
```bash
65+
make scan-quick
66+
```
67+
- **Full scan (slow):**
68+
```bash
69+
make scan-full
70+
```
71+
72+
---
73+
74+
## Command-Line Options
75+
76+
- `--network` Network or IP to scan (e.g., `192.168.1.0/24` or `192.168.1.101`)
77+
- `--service` Comma-separated list of services (e.g., `rtsp,http,https,onvif`)
78+
- `--port` Ports or port ranges (e.g., `80,443,554,8000-8090`)
79+
- `--timeout` Timeout per connection (default: 3.0)
80+
- `--verbose` Show detailed output
81+
82+
---
83+
84+
## Example: Scan for Cameras on All Local Networks
85+
86+
```bash
87+
make scan-local-camera
88+
```
89+
90+
This will scan all common local networks for camera-related services and print a summary of detected devices.
91+
92+
---
93+
94+
## Troubleshooting
95+
96+
- Ensure your Python environment has all required dependencies (`aiohttp`, etc.).
97+
- Run scans with `--verbose` for more details.
98+
- If no devices are found, check your network, firewall, and device connectivity.
99+
100+
---
101+
102+
For more information, see the main project README or contact the project maintainers.

todois.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)