initial targets managed in backend
This commit is contained in:
@@ -55,6 +55,7 @@ class Scanner:
|
||||
self.task_queue = PriorityQueue()
|
||||
self.target_retries = defaultdict(int)
|
||||
self.scan_failed_due_to_retries = False
|
||||
self.initial_targets = set()
|
||||
|
||||
# Thread-safe processing tracking (from Document 1)
|
||||
self.currently_processing = set()
|
||||
@@ -289,6 +290,7 @@ class Scanner:
|
||||
|
||||
if clear_graph:
|
||||
self.graph.clear()
|
||||
self.initial_targets.clear()
|
||||
|
||||
if force_rescan_target and self.graph.graph.has_node(force_rescan_target):
|
||||
node_data = self.graph.graph.nodes[force_rescan_target]
|
||||
@@ -296,6 +298,7 @@ class Scanner:
|
||||
node_data['metadata']['provider_states'] = {}
|
||||
|
||||
self.current_target = target.lower().strip()
|
||||
self.initial_targets.add(self.current_target)
|
||||
self.max_depth = max_depth
|
||||
self.current_depth = 0
|
||||
|
||||
@@ -852,7 +855,9 @@ class Scanner:
|
||||
|
||||
def get_graph_data(self) -> Dict[str, Any]:
|
||||
"""Get current graph data for visualization."""
|
||||
return self.graph.get_graph_data()
|
||||
graph_data = self.graph.get_graph_data()
|
||||
graph_data['initial_targets'] = list(self.initial_targets)
|
||||
return graph_data
|
||||
|
||||
def export_results(self) -> Dict[str, Any]:
|
||||
"""Export complete scan results with forensic audit trail."""
|
||||
|
||||
Reference in New Issue
Block a user