Merge pull request #902 from xpz3/master

CLI Parsing - '-b' should accept a value and '-e' should not shift twice (Fixes #891)
This commit is contained in:
strasharo 2020-05-10 15:51:27 +03:00 committed by GitHub
commit 9cba5e7f39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ source "$FLUXIONLibPath/HelpUtils.sh"
# =================== < Parse Parameters > =================== # # =================== < Parse Parameters > =================== #
# ============================================================ # # ============================================================ #
if ! FLUXIONCLIArguments=$( if ! FLUXIONCLIArguments=$(
getopt --options="vdk5rinmtbhe:c:l:a:r" \ getopt --options="vdk5rinmthb:e:c:l:a:r" \
--longoptions="debug,version,killer,5ghz,installer,reloader,help,airmon-ng,multiplexer,target,test,auto,bssid:,essid:,channel:,language:,attack:,ratio,skip-dependencies" \ --longoptions="debug,version,killer,5ghz,installer,reloader,help,airmon-ng,multiplexer,target,test,auto,bssid:,essid:,channel:,language:,attack:,ratio,skip-dependencies" \
--name="FLUXION V$FLUXIONVersion.$FLUXIONRevision" -- "$@" --name="FLUXION V$FLUXIONVersion.$FLUXIONRevision" -- "$@"
); then ); then
@ -121,7 +121,7 @@ while [ "$1" != "" ] && [ "$1" != "--" ]; do
-n|--airmon-ng) readonly FLUXIONAirmonNG=1;; -n|--airmon-ng) readonly FLUXIONAirmonNG=1;;
-m|--multiplexer) readonly FLUXIONTMux=1;; -m|--multiplexer) readonly FLUXIONTMux=1;;
-b|--bssid) FluxionTargetMAC=$2; shift;; -b|--bssid) FluxionTargetMAC=$2; shift;;
-e|--essid) FluxionTargetSSID=$2; shift; -e|--essid) FluxionTargetSSID=$2;
# TODO: Rearrange declarations to have routines available for use here. # TODO: Rearrange declarations to have routines available for use here.
FluxionTargetSSIDClean=$(echo "$FluxionTargetSSID" | sed -r 's/( |\/|\.|\~|\\)+/_/g'); shift;; FluxionTargetSSIDClean=$(echo "$FluxionTargetSSID" | sed -r 's/( |\/|\.|\~|\\)+/_/g'); shift;;
-c|--channel) FluxionTargetChannel=$2; shift;; -c|--channel) FluxionTargetChannel=$2; shift;;