schollz / howmanypeoplearearound

Count the number of people around you :family_man_man_boy: by monitoring wifi signals :satellite:
MIT License
6.92k stars 386 forks source link

adds option to aggregate by manufacturer when writing to a file #55

Closed pashap closed 4 years ago

pashap commented 4 years ago

Adds a new command line flag defined as --aggbymanufacturer, which only gets used if writing the data to a file.

The difference is that no mac addresses or rssi will be stored in the output file. Instead the same cellphones key as before will now contain a json object where every key represents a manufacturer and their corresponding value will be the number of cellphones seen for that scan.

Ie:

{
  "cellphones": {
    "Apple, Inc.": 0,
    "BlackBerry RTS": 0,
    "GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD": 0,
    "HTC Corporation": 1,
    "Huawei Symantec Technologies Co.,Ltd.": 0,
    "LG ELECTRONICS INC": 0,
    "LG Electronics": 0,
    "LG Electronics (Mobile Communications)": 0,
    "Microsoft": 0,
    "Motorola Mobility LLC, a Lenovo Company": 0,
    "Not in OUI": 0,
    "OnePlus Tech (Shenzhen) Ltd": 0,
    "SAMSUNG ELECTRO-MECHANICS(THAILAND)": 0,
    "Samsung Electronics Co.,Ltd": 0,
    "Xiaomi Communications Co Ltd": 0
  },
  "time": 1579652085.962249
}