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

Method save_results

actions/sql_connector.py:203–210  ·  view source on GitHub ↗

Save the results of successful connection attempts to a CSV file.

(self)

Source from the content-addressed store, hash-verified

201 return success_flag[0], self.results # Return True and the list of successes if at least one attempt was successful
202
203 def save_results(self):
204 """
205 Save the results of successful connection attempts to a CSV file.
206 """
207 df = pd.DataFrame(self.results, columns=['IP Address', 'User', 'Password', 'Port', 'Database'])
208 df.to_csv(self.sqlfile, index=False, mode='a', header=not os.path.exists(self.sqlfile))
209 logger.info(f"Saved results to {self.sqlfile}")
210 self.results = []
211
212 def remove_duplicates(self):
213 """

Callers 1

workerMethod · 0.95

Calls 1

infoMethod · 0.80

Tested by

no test coverage detected