Skip to content

Fix hardcoded file paths #9

@NetworkJack2

Description

@NetworkJack2

There are a few issues with them

  1. They aren't easy to find in the script
  2. There is no config file or --option to set them at run time
  3. The defaults are not sane on a few counts. directories in root in UNIX/UNIX-like is a no no. Capitalization is also a no no.

Affected:

appdir="/SYWorks/WIDS/"
macoui="/SYWorks/WIDS/mac-oui.db"
LogFile=appdir + "log.txt"

Recommendations

  1. Expected SANE defaults:
appdir="/usr/share/wids/"
macoui="/usr/share/wids/mac-oui.db"
LogFile= "/var/log/wids.log"
  1. Put these variables at the top of the script before exporting them as globals. Make them easier to find.

  2. add --options for setting these at run time, and parse a config perhaps /etc/wids.conf or something.

Further, its recommended you use argparse for parsing --options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions