Ignore:
Timestamp:
Aug 25, 2011, 1:39:23 PM (13 years ago)
Author:
rick
Message:

Make sure all bssid are upper case to avoid fake unique matches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/gheat/management/commands/import_kismet.py

    r9563 r9565  
    7676      ssid, encryption = ap_pool[bssid]
    7777      # 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))
    7979      sql_values.append(item)
    8080    counters['ap_added'] = bulk_sql('gheat_accespoint (`mac`, `ssid`, `encryptie`)',sql_values)
    8181
    82   # Determine which Wireless to add
     82  # Determine which Wireless Clients to add
    8383  bssid_list_present = WirelessClient.objects.filter(mac__in=client_pool.keys()).values_list('mac', flat=True)
    8484  bssid_list_insert = set(client_pool.keys()) - set(bssid_list_present)
     
    8888    sql_values = []
    8989    for bssid in bssid_list_insert:
    90       sql_values.append("('%s')" % bssid)
     90      sql_values.append("('%s')" % bssid.upper())
    9191    counters['client_added'] = bulk_sql('gheat_wirelessclient (`mac`)',sql_values)
    9292
Note: See TracChangeset for help on using the changeset viewer.