[wifi] capture: set the channel
This commit is contained in:
parent
4a68134713
commit
9df17ae493
|
@ -51,6 +51,8 @@ NB_PKT=10
|
|||
TMP=/tmp
|
||||
# Name of the capture file:
|
||||
FILE=capture.pcap
|
||||
# Channel to scan
|
||||
CHANNEL=1
|
||||
|
||||
## Generated parameters ##
|
||||
# Interface to capture from:
|
||||
|
@ -68,9 +70,9 @@ case $OS in
|
|||
Linux)
|
||||
[ -x /sbin/iwconfig ] \
|
||||
|| error "iwconfig is required to run this program on Linux!"
|
||||
iwconfig $IFACE mode monitor \
|
||||
iwconfig $IFACE mode monitor channel $CHANNEL \
|
||||
&& echo "OK." \
|
||||
|| error "Cannot switch the interface to mode monitor!"
|
||||
|| error "Cannot configure the interface!"
|
||||
;;
|
||||
*)
|
||||
error "Your OS is not supported."
|
||||
|
|
Loading…
Reference in New Issue