This commit is contained in:
overcuriousity 2025-09-22 22:45:46 +02:00
parent 5d1d249910
commit 571912218e
25 changed files with 84 additions and 84 deletions

View File

@ -1,5 +1,5 @@
# =============================================== # ===============================================
# DNSRecon Environment Variables # DNScope Environment Variables
# =============================================== # ===============================================
# Copy this file to .env and fill in your values. # Copy this file to .env and fill in your values.

View File

@ -1,16 +1,16 @@
# DNSRecon - Passive Infrastructure Reconnaissance Tool # DNScope - Passive Infrastructure Reconnaissance Tool
DNSRecon is an interactive, passive reconnaissance tool designed to map adversary infrastructure. It operates on a "free-by-default" model, ensuring core functionality without subscriptions, while allowing power users to enhance its capabilities with paid API keys. It is aimed at cybersecurity researchers, pentesters, and administrators who want to understand the public footprint of a target domain. DNScope is an interactive, passive reconnaissance tool designed to map adversary infrastructure. It operates on a "free-by-default" model, ensuring core functionality without subscriptions, while allowing power users to enhance its capabilities with paid API keys. It is aimed at cybersecurity researchers, pentesters, and administrators who want to understand the public footprint of a target domain.
**Repo Link:** [https://github.com/overcuriousity/dnsrecon](https://github.com/overcuriousity/dnsrecon) **Repo Link:** [https://github.com/overcuriousity/DNScope](https://github.com/overcuriousity/DNScope)
----- -----
## Concept and Philosophy ## Concept and Philosophy
The core philosophy of DNSRecon is to provide a comprehensive and accurate map of a target's infrastructure using only **passive data sources** by default. This means that, out of the box, DNSRecon will not send any traffic to the target's servers. Instead, it queries public and historical data sources to build a picture of the target's online presence. This approach is ideal for researchers and pentesters who want to gather intelligence without alerting the target, and for administrators who want to see what information about their own infrastructure is publicly available. The core philosophy of DNScope is to provide a comprehensive and accurate map of a target's infrastructure using only **passive data sources** by default. This means that, out of the box, DNScope will not send any traffic to the target's servers. Instead, it queries public and historical data sources to build a picture of the target's online presence. This approach is ideal for researchers and pentesters who want to gather intelligence without alerting the target, and for administrators who want to see what information about their own infrastructure is publicly available.
For power users who require more in-depth information, DNSRecon can be configured to use API keys for services like Shodan, which provides a wealth of information about internet-connected devices. However, this is an optional feature, and the core functionality of the tool will always remain free and passive. For power users who require more in-depth information, DNScope can be configured to use API keys for services like Shodan, which provides a wealth of information about internet-connected devices. However, this is an optional feature, and the core functionality of the tool will always remain free and passive.
----- -----
@ -34,7 +34,7 @@ For power users who require more in-depth information, DNSRecon can be configure
## Technical Architecture ## Technical Architecture
DNSRecon is a web-based application built with a modern technology stack: DNScope is a web-based application built with a modern technology stack:
* **Backend**: The backend is a **Flask** application that provides a REST API for the frontend and manages the scanning process. * **Backend**: The backend is a **Flask** application that provides a REST API for the frontend and manages the scanning process.
* **Scanning Engine**: The core scanning engine is a multi-threaded Python application that uses a provider-based architecture to query different data sources. * **Scanning Engine**: The core scanning engine is a multi-threaded Python application that uses a provider-based architecture to query different data sources.
@ -46,7 +46,7 @@ DNSRecon is a web-based application built with a modern technology stack:
## Data Sources ## Data Sources
DNSRecon queries the following data sources: DNScope queries the following data sources:
* **DNS**: Standard DNS lookups (A, AAAA, CNAME, MX, NS, SOA, TXT). * **DNS**: Standard DNS lookups (A, AAAA, CNAME, MX, NS, SOA, TXT).
* **crt.sh**: A certificate transparency log that provides information about SSL/TLS certificates. * **crt.sh**: A certificate transparency log that provides information about SSL/TLS certificates.
@ -93,8 +93,8 @@ You should see `PONG` as the response.
### 2\. Clone the Project ### 2\. Clone the Project
```bash ```bash
git clone https://github.com/overcuriousity/dnsrecon git clone https://github.com/overcuriousity/DNScope
cd dnsrecon cd DNScope
``` ```
### 3\. Install Python Dependencies ### 3\. Install Python Dependencies
@ -123,7 +123,7 @@ The `requirements.txt` file contains the following dependencies:
### 4\. Configure the Application ### 4\. Configure the Application
DNSRecon is configured using a `.env` file. You can copy the provided example file and edit it to suit your needs: DNScope is configured using a `.env` file. You can copy the provided example file and edit it to suit your needs:
```bash ```bash
cp .env.example .env cp .env.example .env
@ -167,30 +167,30 @@ gunicorn --workers 4 --bind 0.0.0.0:5000 app:app
## Systemd Service ## Systemd Service
To run DNSRecon as a service that starts automatically on boot, you can use `systemd`. To run DNScope as a service that starts automatically on boot, you can use `systemd`.
### 1\. Create a `.service` file ### 1\. Create a `.service` file
Create a new service file in `/etc/systemd/system/`: Create a new service file in `/etc/systemd/system/`:
```bash ```bash
sudo nano /etc/systemd/system/dnsrecon.service sudo nano /etc/systemd/system/DNScope.service
``` ```
### 2\. Add the Service Configuration ### 2\. Add the Service Configuration
Paste the following configuration into the file. **Remember to replace `/path/to/your/dnsrecon` and `your_user` with your actual project path and username.** Paste the following configuration into the file. **Remember to replace `/path/to/your/DNScope` and `your_user` with your actual project path and username.**
```ini ```ini
[Unit] [Unit]
Description=DNSRecon Application Description=DNScope Application
After=network.target After=network.target
[Service] [Service]
User=your_user User=your_user
Group=your_user Group=your_user
WorkingDirectory=/path/to/your/dnsrecon WorkingDirectory=/path/to/your/DNScope
ExecStart=/path/to/your/dnsrecon/venv/bin/gunicorn --workers 4 --bind 0.0.0.0:5000 app:app ExecStart=/path/to/your/DNScope/venv/bin/gunicorn --workers 4 --bind 0.0.0.0:5000 app:app
Restart=always Restart=always
Environment="SECRET_KEY=your-super-secret-and-random-key" Environment="SECRET_KEY=your-super-secret-and-random-key"
Environment="FLASK_ENV=production" Environment="FLASK_ENV=production"
@ -207,14 +207,14 @@ Reload the `systemd` daemon, enable the service to start on boot, and then start
```bash ```bash
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl enable dnsrecon.service sudo systemctl enable DNScope.service
sudo systemctl start dnsrecon.service sudo systemctl start DNScope.service
``` ```
You can check the status of the service at any time with: You can check the status of the service at any time with:
```bash ```bash
sudo systemctl status dnsrecon.service sudo systemctl status DNScope.service
``` ```
----- -----
@ -244,14 +244,14 @@ rm -rf cache/*
### 4\. Restart the Service ### 4\. Restart the Service
```bash ```bash
sudo systemctl restart dnsrecon.service sudo systemctl restart DNScope.service
``` ```
----- -----
## Extensibility ## Extensibility
DNSRecon is designed to be extensible, and adding new providers is a straightforward process. To add a new provider, you will need to create a new Python file in the `providers` directory that inherits from the `BaseProvider` class. The new provider will need to implement the following methods: DNScope is designed to be extensible, and adding new providers is a straightforward process. To add a new provider, you will need to create a new Python file in the `providers` directory that inherits from the `BaseProvider` class. The new provider will need to implement the following methods:
* `get_name()`: Return the name of the provider. * `get_name()`: Return the name of the provider.
* `get_display_name()`: Return a display-friendly name for the provider. * `get_display_name()`: Return a display-friendly name for the provider.

8
app.py
View File

@ -1,7 +1,7 @@
# dnsrecon-reduced/app.py # DNScope-reduced/app.py
""" """
Flask application entry point for DNSRecon web interface. Flask application entry point for DNScope web interface.
Provides REST API endpoints and serves the web interface with user session support. Provides REST API endpoints and serves the web interface with user session support.
UPDATED: Added /api/config endpoint for graph polling optimization settings. UPDATED: Added /api/config endpoint for graph polling optimization settings.
""" """
@ -29,7 +29,7 @@ def get_user_scanner():
""" """
Retrieves the scanner for the current session, or creates a new one if none exists. Retrieves the scanner for the current session, or creates a new one if none exists.
""" """
current_flask_session_id = session.get('dnsrecon_session_id') current_flask_session_id = session.get('DNScope_session_id')
if current_flask_session_id: if current_flask_session_id:
existing_scanner = session_manager.get_session(current_flask_session_id) existing_scanner = session_manager.get_session(current_flask_session_id)
@ -42,7 +42,7 @@ def get_user_scanner():
if not new_scanner: if not new_scanner:
raise Exception("Failed to create new scanner session") raise Exception("Failed to create new scanner session")
session['dnsrecon_session_id'] = new_session_id session['DNScope_session_id'] = new_session_id
session.permanent = True session.permanent = True
return new_session_id, new_scanner return new_session_id, new_scanner

View File

@ -1,7 +1,7 @@
# dnsrecon-reduced/config.py # DNScope-reduced/config.py
""" """
Configuration management for DNSRecon tool. Configuration management for DNScope tool.
Handles API key storage, rate limiting, and default settings. Handles API key storage, rate limiting, and default settings.
""" """
@ -13,7 +13,7 @@ from dotenv import load_dotenv
load_dotenv() load_dotenv()
class Config: class Config:
"""Configuration manager for DNSRecon application.""" """Configuration manager for DNScope application."""
def __init__(self): def __init__(self):
"""Initialize configuration with default values.""" """Initialize configuration with default values."""

View File

@ -1,5 +1,5 @@
""" """
Core modules for DNSRecon passive reconnaissance tool. Core modules for DNScope passive reconnaissance tool.
Contains graph management, scanning orchestration, and forensic logging. Contains graph management, scanning orchestration, and forensic logging.
""" """

View File

@ -1,7 +1,7 @@
# dnsrecon-reduced/core/graph_manager.py # DNScope-reduced/core/graph_manager.py
""" """
Graph data model for DNSRecon using NetworkX. Graph data model for DNScope using NetworkX.
Manages in-memory graph storage with confidence scoring and forensic metadata. Manages in-memory graph storage with confidence scoring and forensic metadata.
Now fully compatible with the unified ProviderResult data model. Now fully compatible with the unified ProviderResult data model.
UPDATED: Fixed correlation exclusion keys to match actual attribute names. UPDATED: Fixed correlation exclusion keys to match actual attribute names.
@ -30,7 +30,7 @@ class NodeType(Enum):
class GraphManager: class GraphManager:
""" """
Thread-safe graph manager for DNSRecon infrastructure mapping. Thread-safe graph manager for DNScope infrastructure mapping.
Uses NetworkX for in-memory graph storage with confidence scoring. Uses NetworkX for in-memory graph storage with confidence scoring.
Compatible with unified ProviderResult data model. Compatible with unified ProviderResult data model.
""" """

View File

@ -1,4 +1,4 @@
# dnsrecon/core/logger.py # DNScope/core/logger.py
import logging import logging
import threading import threading
@ -38,7 +38,7 @@ class RelationshipDiscovery:
class ForensicLogger: class ForensicLogger:
""" """
Thread-safe forensic logging system for DNSRecon. Thread-safe forensic logging system for DNScope.
Maintains detailed audit trail of all reconnaissance activities. Maintains detailed audit trail of all reconnaissance activities.
""" """
@ -66,7 +66,7 @@ class ForensicLogger:
} }
# Configure standard logger # Configure standard logger
self.logger = logging.getLogger(f'dnsrecon.{self.session_id}') self.logger = logging.getLogger(f'DNScope.{self.session_id}')
self.logger.setLevel(logging.INFO) self.logger.setLevel(logging.INFO)
# Create formatter for structured logging # Create formatter for structured logging
@ -94,7 +94,7 @@ class ForensicLogger:
"""Restore ForensicLogger after unpickling by reconstructing logger.""" """Restore ForensicLogger after unpickling by reconstructing logger."""
self.__dict__.update(state) self.__dict__.update(state)
# Re-initialize the 'logger' attribute # Re-initialize the 'logger' attribute
self.logger = logging.getLogger(f'dnsrecon.{self.session_id}') self.logger = logging.getLogger(f'DNScope.{self.session_id}')
self.logger.setLevel(logging.INFO) self.logger.setLevel(logging.INFO)
formatter = logging.Formatter( formatter = logging.Formatter(
'%(asctime)s - %(name)s - %(levelname)s - %(message)s' '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
@ -107,7 +107,7 @@ class ForensicLogger:
def _generate_session_id(self) -> str: def _generate_session_id(self) -> str:
"""Generate unique session identifier.""" """Generate unique session identifier."""
return f"dnsrecon_{datetime.now(timezone.utc).strftime('%Y%m%d_%H%M%S')}" return f"DNScope_{datetime.now(timezone.utc).strftime('%Y%m%d_%H%M%S')}"
def log_api_request(self, provider: str, url: str, method: str = "GET", def log_api_request(self, provider: str, url: str, method: str = "GET",
status_code: Optional[int] = None, status_code: Optional[int] = None,

View File

@ -1,7 +1,7 @@
# dnsrecon-reduced/core/provider_result.py # DNScope-reduced/core/provider_result.py
""" """
Unified data model for DNSRecon passive reconnaissance. Unified data model for DNScope passive reconnaissance.
Standardizes the data structure across all providers to ensure consistent processing. Standardizes the data structure across all providers to ensure consistent processing.
""" """

View File

@ -1,4 +1,4 @@
# dnsrecon-reduced/core/rate_limiter.py # DNScope-reduced/core/rate_limiter.py
import time import time
import logging import logging
@ -11,7 +11,7 @@ class GlobalRateLimiter:
def __init__(self, redis_client): def __init__(self, redis_client):
self.redis = redis_client self.redis = redis_client
self.logger = logging.getLogger('dnsrecon.rate_limiter') self.logger = logging.getLogger('DNScope.rate_limiter')
# Track last cleanup times to avoid excessive Redis operations # Track last cleanup times to avoid excessive Redis operations
self._last_cleanup = {} self._last_cleanup = {}

View File

@ -1,4 +1,4 @@
# dnsrecon-reduced/core/scanner.py # DNScope-reduced/core/scanner.py
import threading import threading
import traceback import traceback
@ -35,7 +35,7 @@ class ScanStatus:
class Scanner: class Scanner:
""" """
Main scanning orchestrator for DNSRecon passive reconnaissance. Main scanning orchestrator for DNScope passive reconnaissance.
UNIFIED: Combines comprehensive features with improved display formatting. UNIFIED: Combines comprehensive features with improved display formatting.
""" """

View File

@ -1,5 +1,5 @@
""" """
Per-session configuration management for DNSRecon. Per-session configuration management for DNScope.
Provides isolated configuration instances for each user session. Provides isolated configuration instances for each user session.
""" """

View File

@ -1,4 +1,4 @@
# dnsrecon/core/session_manager.py # DNScope/core/session_manager.py
import threading import threading
import time import time
@ -58,11 +58,11 @@ class SessionManager:
def _get_session_key(self, session_id: str) -> str: def _get_session_key(self, session_id: str) -> str:
"""Generates the Redis key for a session.""" """Generates the Redis key for a session."""
return f"dnsrecon:session:{session_id}" return f"DNScope:session:{session_id}"
def _get_stop_signal_key(self, session_id: str) -> str: def _get_stop_signal_key(self, session_id: str) -> str:
"""Generates the Redis key for a session's stop signal.""" """Generates the Redis key for a session's stop signal."""
return f"dnsrecon:stop:{session_id}" return f"DNScope:stop:{session_id}"
def create_session(self) -> str: def create_session(self) -> str:
""" """
@ -353,7 +353,7 @@ class SessionManager:
while True: while True:
try: try:
# Clean up orphaned stop signals # Clean up orphaned stop signals
stop_keys = self.redis_client.keys("dnsrecon:stop:*") stop_keys = self.redis_client.keys("DNScope:stop:*")
for stop_key in stop_keys: for stop_key in stop_keys:
# Extract session ID from stop key # Extract session ID from stop key
session_id = stop_key.decode('utf-8').split(':')[-1] session_id = stop_key.decode('utf-8').split(':')[-1]
@ -372,8 +372,8 @@ class SessionManager:
def get_statistics(self) -> Dict[str, Any]: def get_statistics(self) -> Dict[str, Any]:
"""Get session manager statistics.""" """Get session manager statistics."""
try: try:
session_keys = self.redis_client.keys("dnsrecon:session:*") session_keys = self.redis_client.keys("DNScope:session:*")
stop_keys = self.redis_client.keys("dnsrecon:stop:*") stop_keys = self.redis_client.keys("DNScope:stop:*")
active_sessions = len(session_keys) active_sessions = len(session_keys)
running_scans = 0 running_scans = 0

View File

@ -1,5 +1,5 @@
""" """
Data provider modules for DNSRecon. Data provider modules for DNScope.
Contains implementations for various reconnaissance data sources. Contains implementations for various reconnaissance data sources.
""" """

View File

@ -1,4 +1,4 @@
# dnsrecon/providers/base_provider.py # DNScope/providers/base_provider.py
import time import time
import requests import requests
@ -13,7 +13,7 @@ from core.provider_result import ProviderResult
class BaseProvider(ABC): class BaseProvider(ABC):
""" """
Abstract base class for all DNSRecon data providers. Abstract base class for all DNScope data providers.
Now supports session-specific configuration and returns standardized ProviderResult objects. Now supports session-specific configuration and returns standardized ProviderResult objects.
""" """
@ -72,7 +72,7 @@ class BaseProvider(ABC):
if not hasattr(self._local, 'session'): if not hasattr(self._local, 'session'):
self._local.session = requests.Session() self._local.session = requests.Session()
self._local.session.headers.update({ self._local.session.headers.update({
'User-Agent': 'DNSRecon/1.0 (Passive Reconnaissance Tool)' 'User-Agent': 'DNScope/1.0 (Passive Reconnaissance Tool)'
}) })
return self._local.session return self._local.session

View File

@ -1,4 +1,4 @@
# dnsrecon/providers/correlation_provider.py # DNScope/providers/correlation_provider.py
import re import re
from typing import Dict, Any, List from typing import Dict, Any, List

View File

@ -1,4 +1,4 @@
# dnsrecon/providers/crtsh_provider.py # DNScope/providers/crtsh_provider.py
import json import json
import re import re

View File

@ -1,4 +1,4 @@
# dnsrecon/providers/dns_provider.py # DNScope/providers/dns_provider.py
from dns import resolver, reversename from dns import resolver, reversename
from typing import Dict from typing import Dict

View File

@ -1,4 +1,4 @@
# dnsrecon/providers/shodan_provider.py # DNScope/providers/shodan_provider.py
import json import json
from pathlib import Path from pathlib import Path

View File

@ -1,4 +1,4 @@
/* DNSRecon - Optimized Compact Theme */ /* DNScope - Optimized Compact Theme */
/* Reset and Base */ /* Reset and Base */
* { * {

View File

@ -1,6 +1,6 @@
// dnsrecon-reduced/static/js/graph.js // DNScope-reduced/static/js/graph.js
/** /**
* Graph visualization module for DNSRecon * Graph visualization module for DNScope
* Handles network graph rendering using vis.js with proper large entity node hiding * Handles network graph rendering using vis.js with proper large entity node hiding
* UPDATED: Added manual refresh button for polling optimization when graph becomes large * UPDATED: Added manual refresh button for polling optimization when graph becomes large
*/ */

View File

@ -1,12 +1,12 @@
/** /**
* Main application logic for DNSRecon web interface * Main application logic for DNScope web interface
* Handles UI interactions, API communication, and data flow * Handles UI interactions, API communication, and data flow
* UPDATED: Now compatible with a strictly flat, unified data model for attributes. * UPDATED: Now compatible with a strictly flat, unified data model for attributes.
*/ */
class DNSReconApp { class DNScopeApp {
constructor() { constructor() {
console.log('DNSReconApp constructor called'); console.log('DNScopeApp constructor called');
this.graphManager = null; this.graphManager = null;
this.scanStatus = 'idle'; this.scanStatus = 'idle';
this.statusPollInterval = null; // Separate status polling this.statusPollInterval = null; // Separate status polling
@ -29,7 +29,7 @@ class DNSReconApp {
* Initialize the application * Initialize the application
*/ */
init() { init() {
console.log('DNSReconApp init called'); console.log('DNScopeApp init called');
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
console.log('DOM loaded, initializing application...'); console.log('DOM loaded, initializing application...');
try { try {
@ -44,9 +44,9 @@ class DNSReconApp {
this.updateGraph(); this.updateGraph();
console.log('DNSRecon application initialized successfully'); console.log('DNScope application initialized successfully');
} catch (error) { } catch (error) {
console.error('Failed to initialize DNSRecon application:', error); console.error('Failed to initialize DNScope application:', error);
this.showError(`Initialization failed: ${error.message}`); this.showError(`Initialization failed: ${error.message}`);
} }
}); });
@ -539,7 +539,7 @@ class DNSReconApp {
// Get the filename from headers or create one // Get the filename from headers or create one
const contentDisposition = response.headers.get('content-disposition'); const contentDisposition = response.headers.get('content-disposition');
let filename = 'dnsrecon_export.json'; let filename = 'DNScope_export.json';
if (contentDisposition) { if (contentDisposition) {
const filenameMatch = contentDisposition.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/); const filenameMatch = contentDisposition.match(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/);
if (filenameMatch) { if (filenameMatch) {
@ -2789,5 +2789,5 @@ style.textContent = `
document.head.appendChild(style); document.head.appendChild(style);
// Initialize application when page loads // Initialize application when page loads
console.log('Creating DNSReconApp instance...'); console.log('Creating DNScopeApp instance...');
const app = new DNSReconApp(); const app = new DNScopeApp();

View File

@ -4,7 +4,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DNSRecon - Infrastructure Reconnaissance</title> <title>DNScope - Infrastructure Reconnaissance</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.css" rel="stylesheet" type="text/css"> <link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.css" rel="stylesheet" type="text/css">
@ -18,8 +18,8 @@
<header class="header"> <header class="header">
<div class="header-content"> <div class="header-content">
<div class="logo"> <div class="logo">
<span class="logo-icon">[DNS]</span> <span class="logo-icon">[DN]</span>
<span class="logo-text">RECON</span> <span class="logo-text">Scope</span>
</div> </div>
<div class="status-indicator"> <div class="status-indicator">
<span id="connection-status" class="status-dot"></span> <span id="connection-status" class="status-dot"></span>

View File

@ -1,7 +1,7 @@
# dnsrecon-reduced/utils/__init__.py # DNScope-reduced/utils/__init__.py
""" """
Utility modules for DNSRecon. Utility modules for DNScope.
Contains helper functions, export management, and supporting utilities. Contains helper functions, export management, and supporting utilities.
""" """

View File

@ -1,7 +1,7 @@
# dnsrecon-reduced/utils/export_manager.py # DNScope-reduced/utils/export_manager.py
""" """
Centralized export functionality for DNSRecon. Centralized export functionality for DNScope.
Handles all data export operations with forensic integrity and proper formatting. Handles all data export operations with forensic integrity and proper formatting.
ENHANCED: Professional forensic executive summary generation for court-ready documentation. ENHANCED: Professional forensic executive summary generation for court-ready documentation.
""" """
@ -18,7 +18,7 @@ from utils.helpers import _is_valid_domain, _is_valid_ip
class ExportManager: class ExportManager:
""" """
Centralized manager for all DNSRecon export operations. Centralized manager for all DNScope export operations.
Maintains forensic integrity and provides consistent export formats. Maintains forensic integrity and provides consistent export formats.
ENHANCED: Advanced forensic analysis and professional reporting capabilities. ENHANCED: Advanced forensic analysis and professional reporting capabilities.
""" """
@ -324,7 +324,7 @@ class ExportManager:
"a complete audit trail maintained for forensic integrity.", "a complete audit trail maintained for forensic integrity.",
"", "",
f"Investigation completed: {now}", f"Investigation completed: {now}",
f"Report authenticated by: DNSRecon v{self._get_version()}", f"Report authenticated by: DNScope v{self._get_version()}",
"", "",
"=" * 80, "=" * 80,
"END OF REPORT", "END OF REPORT",
@ -694,7 +694,7 @@ class ExportManager:
if centrality >= threshold] if centrality >= threshold]
def _get_version(self) -> str: def _get_version(self) -> str:
"""Get DNSRecon version for report authentication.""" """Get DNScope version for report authentication."""
return "1.0.0-forensic" return "1.0.0-forensic"
def export_graph_json(self, graph_manager) -> Dict[str, Any]: def export_graph_json(self, graph_manager) -> Dict[str, Any]:
@ -717,7 +717,7 @@ class ExportManager:
'last_modified': graph_manager.last_modified, 'last_modified': graph_manager.last_modified,
'total_nodes': graph_manager.get_node_count(), 'total_nodes': graph_manager.get_node_count(),
'total_edges': graph_manager.get_edge_count(), 'total_edges': graph_manager.get_edge_count(),
'graph_format': 'dnsrecon_v1_unified_model' 'graph_format': 'DNScope_v1_unified_model'
}, },
'graph': graph_data, 'graph': graph_data,
'statistics': graph_manager.get_statistics() 'statistics': graph_manager.get_statistics()
@ -818,7 +818,7 @@ class ExportManager:
} }
extension = extension_map.get(export_type, 'txt') extension = extension_map.get(export_type, 'txt')
return f"dnsrecon_{export_type}_{safe_target}_{timestamp_str}.{extension}" return f"DNScope_{export_type}_{safe_target}_{timestamp_str}.{extension}"
class CustomJSONEncoder(json.JSONEncoder): class CustomJSONEncoder(json.JSONEncoder):

View File

@ -1,4 +1,4 @@
# dnsrecon-reduced/utils/helpers.py # DNScope-reduced/utils/helpers.py
import ipaddress import ipaddress
from typing import Union from typing import Union