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