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

Method __init__

actions/scanning.py:1233–1253  ·  view source on GitHub ↗
(self, outer_instance, network, portstart, portend, extra_ports)

Source from the content-addressed store, hash-verified

1231 if data.get('Failed_Pings', 0) >= 30:
1232 self.logger.debug(f"Host {mac} in degraded state ({data.get('Failed_Pings', 0)} failed pings)")
1233
1234 self.logger.info(f"✅ Updated SQLite database with {len(sorted_netkb_entries)} hosts")
1235
1236 except Exception as db_error:
1237 self.logger.error(f"Failed to write to SQLite database: {db_error}")
1238 self.logger.debug(f"Traceback: {traceback.format_exc()}")
1239 # Don't raise - CSV write succeeded, so continue
1240
1241 except Exception as e:
1242 self.logger.error(f"Error in update_netkb: {e}")
1243
1244 def display_csv(self, file_path):
1245 """
1246 Displays the contents of the specified CSV file using Rich for enhanced visualization.
1247 """
1248 if not Table or not self.console:
1249 return
1250 with self.lock:
1251 try:
1252 table = Table(title=f"Contents of {file_path}", show_lines=True)
1253 with open(file_path, 'r') as file:
1254 reader = csv.reader(file)
1255 headers = next(reader)
1256 for header in headers:

Callers

nothing calls this directly

Calls 1

get_current_timestampMethod · 0.80

Tested by

no test coverage detected