Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

airmon-ng.linux: in a for loop, replace ls with a glob #2551

Merged
merged 3 commits into from
Jul 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading