Worker thread to process items in the queue.
(self, progress, task_id, success_flag)
| 154 | return False |
| 155 | |
| 156 | def worker(self, progress, task_id, success_flag): |
| 157 | """ |
| 158 | Worker thread to process items in the queue. |
| 159 | """ |
| 160 | while not self.queue.empty(): |
| 161 | if self.shared_data.orchestrator_should_exit: |
| 162 | logger.info("Orchestrator exit signal received, stopping worker thread.") |
| 163 | break |
| 164 | |
| 165 | adresse_ip, user, password, mac_address, hostname, port = self.queue.get() |
| 166 | if self.telnet_connect(adresse_ip, user, password): |
| 167 | with self.lock: |
| 168 | self.results.append([mac_address, adresse_ip, hostname, user, password, port]) |
| 169 | logger.success(f"Found credentials IP: {adresse_ip} | User: {user} | Password: {password}") |
| 170 | self.save_results() |
| 171 | self.removeduplicates() |
| 172 | success_flag[0] = True |
| 173 | self.queue.task_done() |
| 174 | progress.update(task_id, advance=1) |
| 175 | |
| 176 | def run_bruteforce(self, adresse_ip, port): |
| 177 | self.load_scan_file() # Reload the scan file to get the latest IPs and ports |
nothing calls this directly
no test coverage detected