[wifi] capture: set the channel

This commit is contained in:
Matteo Cypriani 2011-08-06 12:01:40 +02:00
parent 4a68134713
commit 9df17ae493
1 changed files with 4 additions and 2 deletions

View File

@ -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."