secdev / secdev/scapy

sndrcv does not return control to user after KeyboardInterrupt

Open
#4,341 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.6k
Forks
2.2k
Avg merge
1d 4h
Merged PRs (30d)
56

Description

Brief description

sndrcv related functions (sr, sr1, srp...) do not return control to the user after a KeyboardInterrupt.

Scapy version

2.5.0

Python version

3.12.2

Operating system

Windows 10

Additional environment information

No response

How to reproduce

p = IP(dst="X.X.X.X")/ICMP()
sr1(p)
^C does not end process

Actual result

No response

Expected result

KeyboardInterrupt should quit the process.

Related resources

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the sndrcv-related functions, especially sr1, using the reproduction on Windows with Python 3.12.2. Check how KeyboardInterrupt is handled while sr1(p) is waiting, then verify that pressing Ctrl-C returns control and ends the process without breaking normal packet reception.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.