Worker thread to process items in the queue.
(self, progress, task_id, success_flag)
| 127 | return False |
| 128 | |
| 129 | def worker(self, progress, task_id, success_flag): |
| 130 | """ |
| 131 | Worker thread to process items in the queue. |
| 132 | """ |
| 133 | while not self.queue.empty(): |
| 134 | if self.shared_data.orchestrator_should_exit: |
| 135 | logger.info("Orchestrator exit signal received, stopping worker thread.") |
| 136 | break |
| 137 | |
| 138 | adresse_ip, user, password, mac_address, hostname, port = self.queue.get() |
| 139 | if self.ftp_connect(adresse_ip, user, password): |
| 140 | with self.lock: |
| 141 | self.results.append([mac_address, adresse_ip, hostname, user, password, port]) |
| 142 | logger.success(f"Found credentials for IP: {adresse_ip} | User: {user}") |
| 143 | self.save_results() |
| 144 | self.removeduplicates() |
| 145 | success_flag[0] = True |
| 146 | self.queue.task_done() |
| 147 | progress.update(task_id, advance=1) |
| 148 | |
| 149 | def run_bruteforce(self, adresse_ip, port): |
| 150 | self.load_scan_file() # Reload the scan file to get the latest IPs and ports |
nothing calls this directly
no test coverage detected