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.

2 Answers 2

1

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

3
  • Please add some tips onto how. Commented Mar 14, 2015 at 19:02
  • Edited with a link to a project of mine that could be useful.
    – jldupont
    Commented Mar 15, 2015 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
    Commented May 11, 2017 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

3
  • 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
    Commented May 11, 2017 at 13:36
  • Sorry Review will keep that in mind next time. Although that's my Github link so it will be up...
    – Mait
    Commented May 11, 2017 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
    Commented May 11, 2017 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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