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
  Scapy Basics Shivi 0 904 Sep-25-2023, 07:37 AM
Last Post: Shivi
  How to send a HTTP response packet using scapy JeffreyStoner 0 2,628 Apr-18-2022, 05:23 AM
Last Post: JeffreyStoner
  How to get every IP found by a Scapy traceroute? jao 0 2,435 Feb-06-2022, 01:00 AM
Last Post: jao
  scapy wifi scan to get payload \ data korenron 0 2,110 Nov-16-2021, 01:47 PM
Last Post: korenron
  can I set scan interval for scapy? korenron 0 2,305 Dec-31-2020, 01:43 PM
Last Post: korenron
  scapy trazom 1 2,607 Aug-30-2020, 04:17 PM
Last Post: micseydel
  network and scapy trazom 0 2,043 Aug-16-2020, 03:54 PM
Last Post: trazom
  Need Help with creating an IP packet with timestamp field using Scapy RTD 0 3,432 Jun-15-2019, 08:21 PM
Last Post: RTD
  Scapy, creating response for GET request. SyRex1013 4 5,077 Dec-11-2018, 07:39 AM
Last Post: SyRex1013
  sniffing real time with pyshark or scapy jeanapala 2 7,411 Nov-16-2017, 09:07 PM
Last Post: jeanapala

Forum Jump:

User Panel Messages

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