Changeset 9565 for src/django_gheat/gheat/management
- Timestamp:
- Aug 25, 2011, 1:39:23 PM (13 years ago)
- Location:
- src/django_gheat/gheat/management/commands
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/management/commands/import_droidstumbler.py
r9559 r9565 40 40 except IntegrityError, e: 41 41 logger.error("Unable to import - %s" % e) 42 raise 42 43 return count 43 44 … … 63 64 try: 64 65 epoch, msg_type, lat, lon, accuracy, ssid, bssid, level, frequency, capabilities = row 66 bssid = bssid.upper() 65 67 except ValueError: 66 68 # Known error, please ignore … … 94 96 ssid, encryption = ap_pool[bssid] 95 97 # Special trick in SSID ts avoid escaping in later stage 96 item = str((bssid ,ssid.replace('%','%%'),encryption))98 item = str((bssid.upper(),ssid.replace('%','%%'),encryption)) 97 99 sql_values.append(item) 98 100 counters['ap_added'] = bulk_sql('gheat_accespoint (`mac`, `ssid`, `encryptie`)',sql_values) -
src/django_gheat/gheat/management/commands/import_kismet.py
r9563 r9565 76 76 ssid, encryption = ap_pool[bssid] 77 77 # Special trick in SSID ts avoid escaping in later stage 78 item = str((bssid ,ssid.replace('%','%%'),encryption))78 item = str((bssid.upper(),ssid.replace('%','%%'),encryption)) 79 79 sql_values.append(item) 80 80 counters['ap_added'] = bulk_sql('gheat_accespoint (`mac`, `ssid`, `encryptie`)',sql_values) 81 81 82 # Determine which Wireless to add82 # Determine which Wireless Clients to add 83 83 bssid_list_present = WirelessClient.objects.filter(mac__in=client_pool.keys()).values_list('mac', flat=True) 84 84 bssid_list_insert = set(client_pool.keys()) - set(bssid_list_present) … … 88 88 sql_values = [] 89 89 for bssid in bssid_list_insert: 90 sql_values.append("('%s')" % bssid )90 sql_values.append("('%s')" % bssid.upper()) 91 91 counters['client_added'] = bulk_sql('gheat_wirelessclient (`mac`)',sql_values) 92 92
Note:
See TracChangeset
for help on using the changeset viewer.