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

Method worker

actions/telnet_connector.py:156–174  ·  view source on GitHub ↗

Worker thread to process items in the queue.

(self, progress, task_id, success_flag)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 8

telnet_connectMethod · 0.95
save_resultsMethod · 0.95
removeduplicatesMethod · 0.95
infoMethod · 0.80
appendMethod · 0.80
successMethod · 0.80
getMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected