Created
September 10, 2024 04:40
-
-
Save yunginnanet/84ec220615bbc08242c4c91f20f3e546 to your computer and use it in GitHub Desktop.
reset wireless interface for packet injection purposes to reset queues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
_target="$1" | |
if ! ip link show dev "$_target" >> /dev/null; then | |
echo "device $_target does not exist"; exit 1 | |
fi | |
echo "resetting $_target" | |
ip link set down dev "$_target" | |
iw dev "$_target" set type managed | |
iw dev "$_target" set type monitor | |
ip link set up dev "$_target" | |
echo "fin." | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment