MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / start_scan

Method start_scan

recon_engine.py:163–187  ·  view source on GitHub ↗
(
        self,
        target: str,
        recon_types: List[ReconType],
        timeout: int = DEFAULT_ENGINE_TIMEOUT,
    )

Source from the content-addressed store, hash-verified

161 # boards where the rest of the Adv Scan tab now works. It runs anywhere;
162 # content discovery degrades to status=error if ffuf isn't installed.
163 return True
164
165 def _detect_tools(self) -> None:
166 for tool in ("ffuf",):
167 path = shutil.which(tool)
168 if path:
169 self._tool_paths[tool] = path
170 logger.info(f"Found {tool} at {path}")
171 else:
172 logger.warning(f"{tool} not found in PATH; CONTENT_DISCOVERY will report status=error")
173
174 def start_scan(
175 self,
176 target: str,
177 recon_types: List[ReconType],
178 timeout: int = DEFAULT_ENGINE_TIMEOUT,
179 ) -> str:
180 if not self.is_available():
181 raise RuntimeError("Recon engine is not available")
182 if not recon_types:
183 raise ValueError("recon_types must not be empty")
184
185 scan_id = f"RECON-{uuid.uuid4().hex[:12]}-{int(time.time())}"
186 state = ReconScanState(scan_id=scan_id, target=target, recon_types=list(recon_types))
187 with self._lock:
188 self.active_scans[scan_id] = state
189
190 threading.Thread(

Callers 5

start_bluetooth_scanFunction · 0.45
start_advanced_vuln_scanFunction · 0.45
start_recon_scanFunction · 0.45
handoff_recon_to_zapFunction · 0.45
start_zap_scanFunction · 0.45

Calls 4

is_availableMethod · 0.95
ReconScanStateClass · 0.85
infoMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected