Log an nmap command before execution
(self, command: List[str], context: str = "")
| 48 | self.logger.addHandler(handler) |
| 49 | |
| 50 | def log_command(self, command: List[str], context: str = ""): |
| 51 | """Log an nmap command before execution""" |
| 52 | with self.lock: |
| 53 | command_str = ' '.join(command) |
| 54 | context_str = f" ({context})" if context else "" |
| 55 | self.logger.info(f"COMMAND{context_str}: {command_str}") |
| 56 | |
| 57 | def log_result(self, stdout: str, stderr: str, returncode: int, context: str = ""): |
| 58 | """Log the result of an nmap command""" |