Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scapy Beacon Frames
#1
I'm trying to build a scapy program that scans for Beacon Frames. Every router should send beacon frames to the air in an interval of X milliseconds so the possible hosts know the router(AP) is alive.

I'm getting nothing, the only kind of Dot11 frames I've been able to get so far is Prob Request, very rarely some data or control frames as well. I setup my wireless card to monitor mode before running the script and it supports it as well. I don't what I might be doing wrong... Here's the code :

from scapy.all import * 

global list_prob
def search_prob(packet1):
    if (packet1.haslayer(Dot11)) and (packet1[Dot11].type == 0) and\
    (packet1[Dot11].subtype == 8) : #subtype 8 == Beacon frame 
        if packet1[Dot11].addr2 not in list_prob:
            if packet1[Dot11].info not in list_prob:
                print('[>]AP',packet1[Dot11].addr2,'SSID',packet1[Dot11].info)
                list_prob.append(packet1[Dot11].addr2)
                list_prob.append(packet1[Dot11].info)
    
sniff(iface='wlan0mon',prn=search_prob)
I've also tried it with simple Dot11Beacon instead of subtype 8 and nothing changed... I'm programming with python3.5 on Linux
Any ideas ?
Reply
#2
Found the solution a few days ago : I had to switch interface's channel in the background. I was only getting the waves of one channel.

Thanks anyway.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  exception scapy kolikol 1 2,480 Jun-11-2025, 09:35 AM
Last Post: bobprogrammer
  Scapy Basics Shivi 0 2,427 Sep-25-2023, 07:37 AM
Last Post: Shivi
  How to get every IP found by a Scapy traceroute? jao 0 3,654 Feb-06-2022, 01:00 AM
Last Post: jao
  can I set scan interval for scapy? korenron 0 3,326 Dec-31-2020, 01:43 PM
Last Post: korenron
  scapy trazom 1 3,754 Aug-30-2020, 04:17 PM
Last Post: micseydel
  network and scapy trazom 0 3,037 Aug-16-2020, 03:54 PM
Last Post: trazom
  Scapy, creating response for GET request. SyRex1013 4 7,259 Dec-11-2018, 07:39 AM
Last Post: SyRex1013
  Failed to recieve scapy udp packet SkyAmryBoi 1 5,303 Sep-29-2017, 01:26 PM
Last Post: camp0
  Scapy route6 configuration peterkl 0 4,944 Mar-06-2017, 03:58 PM
Last Post: peterkl
  FIN scan with scapy peterkl 0 6,578 Feb-13-2017, 09:10 PM
Last Post: peterkl

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020