Skip to content

Commit

Permalink
Merge pull request #2551 from wileyhy/patch-1
Browse files Browse the repository at this point in the history
airmon-ng.linux: in a for loop, replace `ls` with a glob
  • Loading branch information
ZeroChaos- committed Jul 19, 2023
2 parents d4e7705 + ab0bf54 commit 68f9e13
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/airmon-ng.linux
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,9 @@ usage() {
handleLostPhys() {
MISSING_INTERFACE=""
if [ -d /sys/class/ieee80211 ]; then
#this should be fixed, but it's not going to be right now
# shellcheck disable=2045
for i in $(ls /sys/class/ieee80211/); do
if [ ! -d "/sys/class/ieee80211/${i}/device/net" ]; then
MISSING_INTERFACE="${i}"
for i in /sys/class/ieee80211/*; do
if [ -e "${i}" ] && [ ! -d "${i}/device/net" ]; then
MISSING_INTERFACE="${i##*/}"
printf "\nFound %s with no interfaces assigned, would you like to assign one to it? [y/n] " "${MISSING_INTERFACE}"
yesorno
retcode=$?
Expand Down

0 comments on commit 68f9e13

Please sign in to comment.