readme file & some ux improvements

This commit is contained in:
overcuriousity
2025-09-18 00:24:35 +02:00
parent fdc26dcf15
commit 15227b392d
4 changed files with 132 additions and 23 deletions

View File

@@ -471,7 +471,8 @@ class GraphManager:
'attributes': attrs.get('attributes', []), # Raw attributes list
'description': attrs.get('description', ''),
'metadata': attrs.get('metadata', {}),
'added_timestamp': attrs.get('added_timestamp')
'added_timestamp': attrs.get('added_timestamp'),
'max_depth_reached': attrs.get('metadata', {}).get('max_depth_reached', False)
}
# Add incoming and outgoing edges to node data

View File

@@ -607,10 +607,14 @@ class Scanner:
target_type = NodeType.IP
else:
target_type = NodeType.DOMAIN
# Add max_depth_reached flag
max_depth_reached = current_depth >= self.max_depth
# Create or update nodes with proper types
self.graph.add_node(source_node, source_type)
self.graph.add_node(target_node, target_type)
self.graph.add_node(target_node, target_type, metadata={'max_depth_reached': max_depth_reached})
# Add the relationship edge
if self.graph.add_edge(
@@ -623,7 +627,7 @@ class Scanner:
pass # Edge was successfully added
# Add target to discovered nodes for further processing
if _is_valid_domain(target_node) or _is_valid_ip(target_node):
if (_is_valid_domain(target_node) or _is_valid_ip(target_node)) and not max_depth_reached:
discovered_targets.add(target_node)
return discovered_targets, False