Skip to content

Commit

Permalink
Fix typo in unknown device file generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
btsimon97 committed Apr 18, 2021
1 parent 7b8b1de commit b1a8c05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions bluemon-kismet.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
devices = configparser.ConfigParser(interpolation=None)
devices.read(args.device_file)

unknown_devices = configparser.ConfigParser()

# Setup logging
logging.basicConfig(filename=args.log_file, level=args.log_level, format='%(asctime)s %(levelname)s:%(message)s')

Expand Down Expand Up @@ -94,7 +92,8 @@ async def send_alert(zone, msg):

async def write_to_unknown(name, mac):
# reads in the current unknown config file
unknown_devices.read(args.unknown_kismet__device_file)
unknown_devices = configparser.ConfigParser()
unknown_devices.read(args.unknown_kismet_device_file)
# adds a new section for the detected unknown device
unknown_devices[name + "." + mac] = {'device_name': name, 'device_macaddr': mac}
# removes some sections to ensure that the list is up to date (removes oldest first)
Expand Down
4 changes: 1 addition & 3 deletions bluemon-unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@
devices = configparser.ConfigParser(interpolation=None)
devices.read(args.device_file)

# get parser for unknown devices list
unknown_devices = configparser.ConfigParser()

# Get environment variables from systemd that we use to connect to the socket.
LISTEN_FDS = int(os.environ.get("LISTEN_FDS", 0))
LISTEN_PID = os.environ.get("LISTEN_PID", None) or os.getpid()
Expand Down Expand Up @@ -105,6 +102,7 @@ async def send_alert(zone, msg):


async def write_to_unknown(name, mac):
unknown_devices = configparser.ConfigParser()
# reads in the current unknown config file
unknown_devices.read(args.unknown_ubertooth_device_file)
# adds a new section for the detected unknown device
Expand Down

0 comments on commit b1a8c05

Please sign in to comment.