scapy icon indicating copy to clipboard operation
scapy copied to clipboard

CRC tools for computation and research

Open phil777 opened this issue 3 months ago • 4 comments

Checklist:

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

This PR provides a CRC toolbox to compute CRC, create new ones, or search for possible CRC present in a byte string.

phil777 avatar Oct 05 '25 21:10 phil777

Codecov Report

:x: Patch coverage is 46.81648% with 142 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 80.78%. Comparing base (12a3752) to head (f890e16). :warning: Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
scapy/crc.py 46.61% 142 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4855      +/-   ##
==========================================
- Coverage   80.88%   80.78%   -0.11%     
==========================================
  Files         368      369       +1     
  Lines       90340    90607     +267     
==========================================
+ Hits        73069    73194     +125     
- Misses      17271    17413     +142     
Files with missing lines Coverage Δ
scapy/all.py 100.00% <100.00%> (ø)
scapy/crc.py 46.61% <46.61%> (ø)

... and 6 files with indirect coverage changes

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

codecov[bot] avatar Oct 05 '25 22:10 codecov[bot]

Hi ! So this is cool, but I'm a bit unsure if it has a place in Scapy. It looks to me a bit far from networking :/

What do you think?

gpotter2 avatar Oct 22 '25 07:10 gpotter2

I think it’s useful for some applications, but maybe it would fit better in /modules

polydroi avatar Oct 30 '25 21:10 polydroi

We discussed this, it could be fine in modules/, but it needs some documentation. At least docstrings :P

gpotter2 avatar Nov 27 '25 22:11 gpotter2