SYWorks / wireless-ids

Ability to detect suspicious activity such as (WEP/WPA/WPS) attack by sniffing the air for wireless packets.
https://www.facebook.com/media/set/?set=a.767725556588881.1073741830.281645261863582
GNU General Public License v2.0
243 stars 86 forks source link

Fix hardcoded file paths #9

Open GIJack opened 6 years ago

GIJack commented 6 years ago

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"
  2. Put these variables at the top of the script before exporting them as globals. Make them easier to find.

  3. 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.