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

Method close

wardriving.py:1314–1329  ·  view source on GitHub ↗

Finalize session.

(self)

Source from the content-addressed store, hash-verified

1312 pass
1313
1314 # Add Cell towers
1315 with self._lock:
1316 try:
1317 with sqlite3.connect(self.db_path) as conn:
1318 conn.row_factory = sqlite3.Row
1319 cell_rows = conn.execute("SELECT * FROM cell_towers WHERE latitude IS NOT NULL").fetchall()
1320 for row in cell_rows:
1321 r = dict(row)
1322 kml_parts.append(f''&#x27;<Placemark>
1323<name>Cell: {r.get("provider","")} {r.get("tech","")}</name>
1324<description>CellID: {r.get("cell_id","")}\nMCC/MNC: {r.get("mcc","")}/{r.get("mnc","")}\nSignal: {r.get("signal_dbm",-120)} dBm</description>
1325<styleUrl>#cell</styleUrl>
1326<Point><coordinates>{r.get("longitude",0)},{r.get("latitude",0)},0</coordinates></Point>
1327</Placemark>''&#x27;)
1328 except Exception:
1329 pass
1330
1331 # Add GPS track
1332 with self._lock:

Callers 4

wardriving_import_csvFunction · 0.95
import_wigle_csvMethod · 0.45
stopMethod · 0.45
_serial_listen_loopMethod · 0.45

Calls 2

connectMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected