From 9df17ae49300e35217ef67b128936b90865a2f74 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Sat, 6 Aug 2011 12:01:40 +0200 Subject: [PATCH] [wifi] capture: set the channel --- wifi/capture.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wifi/capture.sh b/wifi/capture.sh index b24732d..ce0879d 100755 --- a/wifi/capture.sh +++ b/wifi/capture.sh @@ -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."