Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Exception when linktype conflict with filter #4587

Open
m8k7j opened this issue Nov 11, 2024 · 1 comment
Open

Incorrect Exception when linktype conflict with filter #4587

m8k7j opened this issue Nov 11, 2024 · 1 comment

Comments

@m8k7j
Copy link

m8k7j commented Nov 11, 2024

Brief description

when I using Asnysniffer with filter, sometime the program will blocked at compile_filter, then when I stop Asynsniffer, there is no attribute stop_cb.

Scapy version

2.6.0

Python version

3.11

Operating system

ubuntu 20.04

Additional environment information

No response

How to reproduce

  • enable Asynsniffer
  • send some packet with scapy
  • stop Asynsniffer

Actual result

have no attribute stop_cb

Expected result

have no error when finished sniffer capture

Related resources

No response

@m8k7j
Copy link
Author

m8k7j commented Nov 11, 2024

reproduce step:

from scapy.sendrecv import AsyncSniffer
import time

count = 0
sniffer = AsyncSniffer(iface='eth0', filter='wlan type mgt subtype deauth')
sniffer.start()
time.sleep(1)
sniffer.stop()
print(f'success {count}')

expect result is
raise Scapy_Exception(scapy.error.Scapy_Exception: Cannot set filter
real result is
raise Scapy_Exception(scapy.error.Scapy_Exception: Unsupported (offline or unsupported socket)

@m8k7j m8k7j changed the title code blocked at compile_filter in scapy Incorrect Exception when linktype conflict with filter Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant