fixes to iteration context menu
This commit is contained in:
parent
93a258170a
commit
71b2855d01
5
app.py
5
app.py
@ -72,8 +72,9 @@ def start_scan():
|
||||
target = data['target'].strip()
|
||||
max_depth = data.get('max_depth', config.default_recursion_depth)
|
||||
clear_graph = data.get('clear_graph', True)
|
||||
force_rescan_target = data.get('force_rescan_target', None) # **FIX**: Get the new parameter
|
||||
|
||||
print(f"Parsed - target: '{target}', max_depth: {max_depth}, clear_graph: {clear_graph}")
|
||||
print(f"Parsed - target: '{target}', max_depth: {max_depth}, clear_graph: {clear_graph}, force_rescan: {force_rescan_target}")
|
||||
|
||||
# Validation
|
||||
if not target:
|
||||
@ -104,7 +105,7 @@ def start_scan():
|
||||
|
||||
print(f"Using scanner {id(scanner)} in session {user_session_id}")
|
||||
|
||||
success = scanner.start_scan(target, max_depth, clear_graph=clear_graph)
|
||||
success = scanner.start_scan(target, max_depth, clear_graph=clear_graph, force_rescan_target=force_rescan_target) # **FIX**: Pass the new parameter
|
||||
|
||||
if success:
|
||||
return jsonify({
|
||||
|
@ -204,7 +204,7 @@ class Scanner:
|
||||
self._initialize_providers()
|
||||
print("Session configuration updated")
|
||||
|
||||
def start_scan(self, target: str, max_depth: int = 2, clear_graph: bool = True) -> bool:
|
||||
def start_scan(self, target: str, max_depth: int = 2, clear_graph: bool = True, force_rescan_target: Optional[str] = None) -> bool:
|
||||
"""Start a new reconnaissance scan with proper cleanup of previous scans."""
|
||||
print(f"=== STARTING SCAN IN SCANNER {id(self)} ===")
|
||||
print(f"Session ID: {self.session_id}")
|
||||
@ -268,6 +268,13 @@ class Scanner:
|
||||
|
||||
if clear_graph:
|
||||
self.graph.clear()
|
||||
|
||||
if force_rescan_target and self.graph.graph.has_node(force_rescan_target):
|
||||
print(f"Forcing rescan of {force_rescan_target}, clearing provider states.")
|
||||
node_data = self.graph.graph.nodes[force_rescan_target]
|
||||
if 'metadata' in node_data and 'provider_states' in node_data['metadata']:
|
||||
node_data['metadata']['provider_states'] = {}
|
||||
|
||||
self.current_target = target.lower().strip()
|
||||
self.max_depth = max_depth
|
||||
self.current_depth = 0
|
||||
|
@ -203,7 +203,7 @@ class DNSReconApp {
|
||||
const { nodeId } = e.detail;
|
||||
console.log(`Received iterateScan event for node: ${nodeId}`);
|
||||
this.elements.targetInput.value = nodeId;
|
||||
this.startScan(false); // Start scan in "add to graph" mode
|
||||
this.startScan(false, nodeId); // Pass nodeId to force rescan
|
||||
});
|
||||
|
||||
// Keyboard shortcuts
|
||||
@ -246,7 +246,7 @@ class DNSReconApp {
|
||||
/**
|
||||
* Start scan with error handling
|
||||
*/
|
||||
async startScan(clearGraph = true) {
|
||||
async startScan(clearGraph = true, forceRescanTarget = null) {
|
||||
console.log('=== STARTING SCAN ===');
|
||||
|
||||
try {
|
||||
@ -279,7 +279,8 @@ class DNSReconApp {
|
||||
const requestData = {
|
||||
target: target,
|
||||
max_depth: maxDepth,
|
||||
clear_graph: clearGraph
|
||||
clear_graph: clearGraph,
|
||||
force_rescan_target: forceRescanTarget
|
||||
};
|
||||
|
||||
console.log('Request data:', requestData);
|
||||
|
Loading…
x
Reference in New Issue
Block a user