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: fix shellcheck error SC2045 at lines 261-264, #2559

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 4 additions & 4 deletions scripts/airmon-ng.linux
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ findFreeInterface() {
IW_ERROR="$(iw phy "${PHYDEV}" interface add "wlan${i}${target_suffix}" type "${target_mode}" 2>&1)"
if [ -z "${IW_ERROR}" ]; then
if [ -d "/sys/class/ieee80211/${PHYDEV}/device/net" ]; then
#this should be fixed, but it's not going to be right now
# shellcheck disable=2045
for j in $(ls "/sys/class/ieee80211/${PHYDEV}/device/net/"); do
if [ "$(cat "/sys/class/ieee80211/${PHYDEV}/device/net/${j}/type")" = "${target_type}" ]; then
for j in "/sys/class/ieee80211/${PHYDEV}/device/net"/*/"type"; do
if [ -e "${j}" ] && [ "$(cat "${j}")" = "${target_type}" ]; then
j=${j%/*}
j=${j##*/}
#here is where we catch udev renaming our interface
k="${j#wlan}"
i="${k%mon}"
Expand Down
Loading