Skip to content

Instantly share code, notes, and snippets.

@dadatuputi
Created May 25, 2020 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dadatuputi/22dc13e9c76a82c649770b75e40a7761 to your computer and use it in GitHub Desktop.
Save dadatuputi/22dc13e9c76a82c649770b75e40a7761 to your computer and use it in GitHub Desktop.
Wi-Fi Channel Hoping BASH Script
#!/bin/bash
# From http://www.willhackforsushi.com/books/377_eth_2e_06.pdf and referenced by https://wiki.wireshark.org/CaptureSetup/WLAN#Channel_Hopping (dead/spam link)
# Hop channels every second
IFACE=ath0
IEEE80211bg="1 2 3 4 5 6 7 8 9 10 11"
IEEE80211bg_intl="$IEEE80211b 12 13 14"
IEEE80211a="36 40 44 48 52 56 60 64 149 153 157 161"
IEEE80211bga="$IEEE80211bg $IEEE80211a"
IEEE80211bga_intl="$IEEE80211bg_intl $IEEE80211a"
while true ; do
for CHAN in $IEEE80211bg ; do
echo "Switching to channel $CHAN"
iwconfig $IFACE channel $CHAN
sleep 1
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment