diff --git a/lib/iwlist.js b/lib/iwlist.js index 627a95c..801e17b 100644 --- a/lib/iwlist.js +++ b/lib/iwlist.js @@ -4,7 +4,9 @@ */ const _ = require('lodash'); -const tool = '/usr/bin/iwlist'; +// usually located in /usr/bin/ but as it could be at another location, allow all found in PATH (but we're in trouble +// when the default location, /usr/bin/ is not in the PATH!). GitHub issue #1 +const tool = 'iwlist'; const cmdLine = tool + ' scan'; const macRegex = /([0-9a-zA-Z]{1}[0-9a-zA-Z]{1}[:]{1}){5}[0-9a-zA-Z]{1}[0-9a-zA-Z]{1}/;