Skip to content

Commit 5b9f753

Browse files
author
esfiam
committed
feat: Add comprehensive network analysis module v1.1.0
- Add network interface discovery and monitoring - Add network device scanning with multi-threading - Add advanced port scanning capabilities - Add network performance analysis - Add network security assessment - Add network utility functions (subnet calc, MAC lookup, etc.) - Update CLI to support network module - Add comprehensive documentation and examples - Add internationalization support for network features - Bump version to 1.1.0
1 parent cf71a87 commit 5b9f753

File tree

13 files changed

+744
-11
lines changed

13 files changed

+744
-11
lines changed

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
### Security
2626
- Nothing yet
2727

28+
## [1.1.0] - 2024-12-24
29+
30+
### Added
31+
- 🌐 **Network Analysis Module**
32+
- Network interface discovery and monitoring
33+
- Network device scanning and identification
34+
- Advanced port scanning with multi-threading
35+
- Network performance analysis and metrics
36+
- Network security scanning and assessment
37+
- Real-time network topology mapping
38+
39+
- 🔧 **Network Utility Functions**
40+
- Subnet calculation and network analysis
41+
- MAC address vendor identification
42+
- ARP table parsing and analysis
43+
- Routing table extraction
44+
- Network speed testing integration
45+
- Port knocking functionality
46+
- Public IP address detection
47+
48+
- 🚀 **Performance Enhancements**
49+
- Multi-threaded network scanning (up to 50 concurrent connections)
50+
- Optimized network discovery algorithms
51+
- Cross-platform network interface support
52+
- Enhanced timeout management for network operations
53+
54+
- 📊 **Extended CLI Support**
55+
- New `network` module option for CLI
56+
- Comprehensive network analysis output formats
57+
- Integration with existing output formats (JSON, CSV, pretty print)
58+
59+
### Changed
60+
- Enhanced error handling for network operations
61+
- Improved cross-platform compatibility (Windows, macOS, Linux)
62+
- Updated CLI help messages for new network module
63+
64+
### Dependencies
65+
- Added `psutil>=5.9.0` for system and network monitoring
66+
- Added `netifaces>=0.11.0` for network interface management
67+
- Added `speedtest-cli>=2.1.3` for network speed testing
68+
69+
### Technical Improvements
70+
- Thread-safe network operations
71+
- Memory-efficient network scanning
72+
- Graceful degradation when dependencies are missing
73+
- Comprehensive input validation for network functions
74+
2875
## [1.0.0] - 2024-06-24
2976

3077
### Added

README.md

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ DeepRecon provides a comprehensive suite of tools for analyzing domains and IP a
4848
- **Server Identification**: Web server and proxy detection
4949
- **Meta Information**: Page titles, meta tags extraction
5050

51+
### 🌐 Network Analysis
52+
- **Interface Discovery**: Network interface monitoring and analysis
53+
- **Device Scanning**: Local network device identification
54+
- **Port Scanning**: Advanced multi-threaded port scanning
55+
- **Performance Metrics**: Network speed and latency analysis
56+
- **Security Assessment**: Network vulnerability scanning
57+
- **Topology Mapping**: Network structure visualization
58+
5159
### 🌍 Multi-language Support
5260
- **English** and **Persian (فارسی)** interface
5361
- **Internationalization**: Easy to extend for more languages
@@ -86,6 +94,9 @@ DeepRecon automatically installs these required packages:
8694
- `pyOpenSSL` - SSL/TLS toolkit
8795
- `beautifulsoup4` - HTML parser
8896
- `lxml` - XML/HTML parser
97+
- `psutil` - System and network monitoring
98+
- `netifaces` - Network interface management
99+
- `speedtest-cli` - Network speed testing
89100

90101
---
91102

@@ -100,6 +111,9 @@ deeprecon google.com
100111
# Specific analysis modules
101112
deeprecon github.com --modules resolve dns ssl
102113

114+
# Include network analysis
115+
deeprecon example.com --modules resolve dns network
116+
103117
# Output in JSON format
104118
deeprecon example.com --output json
105119

@@ -111,12 +125,15 @@ deeprecon google.com --language fa
111125

112126
# Quiet mode (results only)
113127
deeprecon google.com --quiet
128+
129+
# Network analysis only
130+
deeprecon --modules network
114131
```
115132

116133
### Python API Usage
117134

118135
```python
119-
from deeprecon import resolve, dns, geoip, ssl
136+
from deeprecon import resolve, dns, geoip, ssl, network
120137

121138
# Basic domain to IP resolution
122139
ip = resolve.get_ip('google.com')
@@ -133,6 +150,14 @@ print(f"Location: {location['city']}, {location['country']}")
133150
# SSL certificate information
134151
ssl_info = ssl.get_ssl_info('github.com')
135152
print(f"SSL Issuer: {ssl_info['issuer']['organizationName']}")
153+
154+
# Network analysis
155+
interfaces = network.get_network_interfaces()
156+
print(f"Network Interfaces: {list(interfaces.keys())}")
157+
158+
# Scan network devices
159+
devices = network.scan_network_devices()
160+
print(f"Found {len(devices)} devices on network")
136161
```
137162

138163
---
@@ -148,7 +173,7 @@ deeprecon <target> [options]
148173

149174
#### Options
150175
- `--modules, -m`: Specify analysis modules
151-
- Available: `resolve`, `dns`, `whois`, `geoip`, `ssl`, `availability`, `security`, `tech`
176+
- Available: `resolve`, `dns`, `whois`, `geoip`, `ssl`, `availability`, `security`, `tech`, `network`
152177
- `--output, -o`: Output format (`json`, `csv`, `pretty`)
153178
- `--file, -f`: Save output to file
154179
- `--language, -l`: Interface language (`en`, `fa`)
@@ -165,6 +190,12 @@ deeprecon 8.8.8.8
165190
# Custom modules
166191
deeprecon google.com -m resolve dns ssl
167192

193+
# Network analysis
194+
deeprecon -m network
195+
196+
# Combined analysis
197+
deeprecon example.com -m resolve dns network
198+
168199
# JSON output to file
169200
deeprecon github.com -o json -f analysis.json
170201
```
@@ -242,6 +273,29 @@ waf = has_waf('example.com')
242273
score = get_security_score('example.com')
243274
```
244275

276+
#### Network Module
277+
```python
278+
from deeprecon.network import (
279+
get_network_interfaces, scan_network_devices,
280+
advanced_port_scan, network_performance, network_security_scan
281+
)
282+
283+
# Get network interfaces
284+
interfaces = get_network_interfaces()
285+
286+
# Scan network devices
287+
devices = scan_network_devices('192.168.1.0/24')
288+
289+
# Advanced port scanning
290+
ports = advanced_port_scan('192.168.1.1', '1-1000')
291+
292+
# Network performance analysis
293+
performance = network_performance()
294+
295+
# Network security scan
296+
security = network_security_scan()
297+
```
298+
245299
---
246300

247301
## 🏗️ Architecture
@@ -259,9 +313,11 @@ deeprecon/
259313
├── availability.py # Connectivity testing
260314
├── security.py # Security analysis
261315
├── tech_detect.py # Technology detection
316+
├── network.py # Network analysis and scanning
262317
├── utils/
263318
│ ├── validator.py # Input validation
264-
│ └── formatter.py # Output formatting
319+
│ ├── formatter.py # Output formatting
320+
│ └── network_utils.py # Network utility functions
265321
└── locales/ # Internationalization
266322
├── en.json
267323
└── fa.json
@@ -288,6 +344,9 @@ deeprecon/
288344
- **Port scanning** for connectivity testing
289345
- **Geolocation analysis** for CDN optimization
290346
- **Technology stack identification**
347+
- **Local network discovery** and device mapping
348+
- **Network performance monitoring** and optimization
349+
- **Network security assessment** and vulnerability scanning
291350

292351
### Research & Analytics
293352
- **Domain analysis** for market research
@@ -341,6 +400,8 @@ We welcome contributions! Here's how you can help:
341400
- 🔧 **New analysis modules**
342401
- 📊 **Enhanced output formats**
343402
- 🚀 **Performance optimizations**
403+
- 🌐 **Extended network analysis features**
404+
- 🔒 **Advanced security scanning**
344405
- 🐛 **Bug fixes and improvements**
345406

346407
---

deeprecon/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from .config import DEFAULT_LANGUAGE, SUPPORTED_LANGUAGES
22

3-
__version__ = '1.0.1'
3+
__version__ = '1.1.0'
44
__author__ = 'DeepRecon Team'
55

66
import json

deeprecon/cli.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from .availability import ping, get_http_status
1212
from .security import is_filtered, has_waf, get_security_score
1313
from .tech_detect import detect_technologies
14+
from .network import get_network_interfaces, scan_network_devices, network_performance, network_security_scan
1415
from .utils.formatter import to_json, export_to_csv
1516
from .utils.validator import validate_domain, validate_ip
1617

@@ -28,9 +29,9 @@ def main():
2829
parser.add_argument(
2930
'-m', '--modules',
3031
nargs='+',
31-
choices=['resolve', 'dns', 'whois', 'geoip', 'ssl', 'availability', 'security', 'tech'],
32+
choices=['resolve', 'dns', 'whois', 'geoip', 'ssl', 'availability', 'security', 'tech', 'network'],
3233
default=['resolve', 'dns', 'whois', 'geoip', 'ssl', 'availability', 'security', 'tech'],
33-
help='Modules to run (default: all)'
34+
help='Modules to run (default: all except network)'
3435
)
3536

3637
parser.add_argument(
@@ -131,6 +132,16 @@ def main():
131132
print(get_message('messages.detecting_tech'))
132133
results['tech'] = detect_technologies(target)
133134

135+
if 'network' in args.modules:
136+
if not args.quiet:
137+
print(get_message('messages.scanning_network'))
138+
results['network'] = {
139+
'interfaces': get_network_interfaces(),
140+
'devices': scan_network_devices(),
141+
'performance': network_performance(),
142+
'security': network_security_scan()
143+
}
144+
134145
if not args.quiet:
135146
print(f"\n{get_message('messages.complete')}\n")
136147

deeprecon/config.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,25 @@
4949
CACHE_ENABLED = True
5050
CACHE_TTL = 3600
5151
MAX_CACHE_SIZE = 1000
52+
53+
NETWORK_SCAN_TIMEOUT = 30
54+
NETWORK_DISCOVERY_TIMEOUT = 60
55+
PORT_SCAN_TIMEOUT = 120
56+
PING_COUNT = 4
57+
MAX_THREADS = 50
58+
59+
SCAN_COMMON_PORTS = [21, 22, 23, 25, 53, 80, 110, 143, 443, 993, 995]
60+
FULL_PORT_RANGE = range(1, 65536)
61+
62+
BANDWIDTH_TEST_SERVERS = [
63+
'speedtest.net',
64+
'fast.com',
65+
'testmy.net'
66+
]
67+
68+
NETWORK_INTERFACE_TYPES = {
69+
'ethernet': ['eth', 'ens', 'enp'],
70+
'wireless': ['wlan', 'wlp'],
71+
'loopback': ['lo'],
72+
'virtual': ['docker', 'br-', 'veth', 'tun', 'tap']
73+
}

deeprecon/locales/en.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
"checking_availability": "Checking availability",
2222
"scanning_security": "Scanning security",
2323
"detecting_tech": "Detecting technologies",
24+
"scanning_network": "Scanning network topology",
25+
"discovering_devices": "Discovering network devices",
26+
"analyzing_performance": "Analyzing network performance",
27+
"checking_network_security": "Checking network security",
2428
"complete": "Analysis complete"
2529
},
2630
"results": {
@@ -38,6 +42,13 @@
3842
"filtered": "Filtered",
3943
"not_filtered": "Not Filtered",
4044
"protected": "Protected",
41-
"not_protected": "Not Protected"
45+
"not_protected": "Not Protected",
46+
"network_interfaces": "Network Interfaces",
47+
"connected_devices": "Connected Devices",
48+
"network_performance": "Network Performance",
49+
"network_security": "Network Security",
50+
"bandwidth": "Bandwidth",
51+
"latency": "Latency",
52+
"packet_loss": "Packet Loss"
4253
}
4354
}

deeprecon/locales/fa.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
"checking_availability": "بررسی دسترس‌پذیری",
2222
"scanning_security": "اسکن امنیتی",
2323
"detecting_tech": "شناسایی تکنولوژی‌ها",
24+
"scanning_network": "اسکن توپولوژی شبکه",
25+
"discovering_devices": "کشف دستگاه‌های شبکه",
26+
"analyzing_performance": "تحلیل عملکرد شبکه",
27+
"checking_network_security": "بررسی امنیت شبکه",
2428
"complete": "تحلیل کامل شد"
2529
},
2630
"results": {
@@ -38,6 +42,13 @@
3842
"filtered": "فیلتر شده",
3943
"not_filtered": "فیلتر نشده",
4044
"protected": "محافظت شده",
41-
"not_protected": "محافظت نشده"
45+
"not_protected": "محافظت نشده",
46+
"network_interfaces": "رابط‌های شبکه",
47+
"connected_devices": "دستگاه‌های متصل",
48+
"network_performance": "عملکرد شبکه",
49+
"network_security": "امنیت شبکه",
50+
"bandwidth": "پهنای باند",
51+
"latency": "تاخیر",
52+
"packet_loss": "از دست رفتن بسته"
4253
}
4354
}

0 commit comments

Comments
 (0)