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

Method worker

actions/ftp_connector.py:129–147  ·  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

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

Callers

nothing calls this directly

Calls 8

ftp_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