Skip to content

Conversation

@louis-6wind
Copy link
Contributor

Fix scenario:

from scapy.all import AsyncSniffer
sniffer=AsyncSniffer(
... iface="br100",
... store=False,
... promisc=False,
... )
sniffer.start()
sniffer.stop()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.12/dist-packages/scapy/sendrecv.py", line 1404, in stop
if self.continue_sniff:
^^^^^^^^^^^^^^^^^^^
AttributeError: 'AsyncSniffer' object has no attribute 'continue_sniff'

Related to #4781 (comment)

Checklist:

  • If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • I squashed commits belonging together
  • I added unit tests or explained why they are not relevant
  • I executed the regression tests (using cd test && ./run_tests or tox)
  • If the PR is still not finished, please create a Draft Pull Request

fixes #xxx

@codecov
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.03%. Comparing base (5744d95) to head (19e5e86).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
scapy/sendrecv.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4800      +/-   ##
==========================================
- Coverage   81.03%   81.03%   -0.01%     
==========================================
  Files         365      365              
  Lines       89029    89033       +4     
==========================================
+ Hits        72141    72144       +3     
- Misses      16888    16889       +1     
Files with missing lines Coverage Δ
scapy/sendrecv.py 86.47% <75.00%> (-0.07%) ⬇️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

louis-6wind and others added 2 commits July 30, 2025 03:27
Fix scenario:

> >>> from scapy.all import AsyncSniffer
> >>> sniffer=AsyncSniffer(
> ...     iface="br100",
> ...     store=False,
> ...     promisc=False,
> ... )
> >>> sniffer.start()
> >>> sniffer.stop()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/local/lib/python3.12/dist-packages/scapy/sendrecv.py", line 1404, in stop
>     if self.continue_sniff:
>        ^^^^^^^^^^^^^^^^^^^
> AttributeError: 'AsyncSniffer' object has no attribute 'continue_sniff'

Signed-off-by: Louis Scalbert <[email protected]>
Copy link
Member

@gpotter2 gpotter2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR !

@gpotter2 gpotter2 merged commit 1e7a629 into secdev:master Jul 30, 2025
23 of 24 checks passed
@gpotter2 gpotter2 added this to the 2.7.0 milestone Nov 2, 2025
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

Successfully merging this pull request may close these issues.

2 participants