(
self,
target: str,
recon_types: List[ReconType],
timeout: int = DEFAULT_ENGINE_TIMEOUT,
)
| 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( |
no test coverage detected