1

I have set up scapy on linux (raspian on RPI) for sniffing WiFi packets using WiFi adapter (b/g) in monitor mode. I am not sure if scapy by default hops on all the channels of the b/g protocol, or sticks to just one of them.

I'd like to have the capability to sniff different channels by hopping on to them, and to have capability to configure the dwell time on each channel, all using snapy. Can some one help me how to do that? Thanks a lot.

1

One way would be to use a bash script with iwconfig to do this. Have a look at this project.

  • Please add some tips onto how. – thekiwi5000 Mar 14 '15 at 19:02
  • Edited with a link to a project of mine that could be useful. – jldupont Mar 15 '15 at 19:55
  • In keeping with our policy regarding informationless link-only answers, if this post is not edited to contain information that can stand as an answer, however minimal, in 48 hours it will be converted to Community Wiki to simplify having it corrected by the community. – goldilocks May 11 '17 at 14:39
0

Follow the below steps :

  1. Write a script in python (scapy) to sniff your desired traffic.

  2. Write a script in bash with iwconfig (as mentioned above) with following syntax:

    for i in {1..13}
    do
        iwconfig $1 channel $i
        sleep 5s
    done
    

    Or use while if you want.

  3. Finally use the & operator to run both of them.

NOTE: keep both scripts in same directory or you have to use environment variables.

finally for your answer both scripts running:

SCAPY/BASH (CHANNEL HOPPING) WORKING CODE

  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review – techraf May 11 '17 at 13:36
  • Sorry Review will keep that in mind next time. Although that's my Github link so it will be up... – Mait May 11 '17 at 13:44
  • 1
    In keeping with our policy regarding informationless link-only answers, if this post is not edited to contain information that can stand as an answer, however minimal, in 48 hours it will be converted to Community Wiki to simplify having it corrected by the community. – goldilocks May 11 '17 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.