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

Fix various critical bugs on Windows #4467

Merged
merged 11 commits into from
Jul 25, 2024

Conversation

gpotter2
Copy link
Member

@gpotter2 gpotter2 commented Jul 15, 2024

This PR:

  • tests were silently failing on Windows :( fix that
  • restore support for Npcap<0.9983 loopback interface
  • cleanup 'Windows native' mode: tests actually work now
  • improve select_objects for the SMB server to properly work on windows
  • remove garbage I made a long time ago (ICMP ping and whatnot)
  • disable the native TLS 1.3 tests on AppVeyor (the Windows build used by AppVeyor is ancient, and doesn't support TLS 1.3)

Copy link

codecov bot commented Jul 15, 2024

Codecov Report

Attention: Patch coverage is 49.29577% with 36 lines in your changes missing coverage. Please review.

Project coverage is 81.68%. Comparing base (9e461cd) to head (2e6316c).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4467      +/-   ##
==========================================
+ Coverage   81.14%   81.68%   +0.53%     
==========================================
  Files         355      355              
  Lines       84643    84706      +63     
==========================================
+ Hits        68687    69190     +503     
+ Misses      15956    15516     -440     
Files Coverage Δ
scapy/arch/windows/__init__.py 66.66% <100.00%> (+3.72%) ⬆️
scapy/layers/smb2.py 87.44% <100.00%> (+0.01%) ⬆️
scapy/arch/windows/structures.py 81.30% <0.00%> (+4.25%) ⬆️
scapy/as_resolvers.py 84.76% <75.00%> (-0.54%) ⬇️
scapy/layers/tls/session.py 87.14% <50.00%> (+0.44%) ⬆️
scapy/layers/smbserver.py 70.96% <50.00%> (-0.16%) ⬇️
scapy/supersocket.py 73.50% <70.00%> (+0.98%) ⬆️
scapy/layers/http.py 83.39% <14.28%> (-0.15%) ⬇️
scapy/arch/windows/native.py 68.46% <46.15%> (+41.19%) ⬆️
scapy/automaton.py 75.02% <6.25%> (-0.27%) ⬇️

... and 39 files with indirect coverage changes

@gpotter2 gpotter2 force-pushed the windows-native-cleanup branch 2 times, most recently from 647c7e9 to 4753339 Compare July 16, 2024 00:38
@gpotter2 gpotter2 changed the title Cleanup windows native mode Fix various critical bugs on Windows Jul 16, 2024
@gpotter2 gpotter2 added the bug label Jul 16, 2024
@gpotter2 gpotter2 added this to the 2.6.0 milestone Jul 16, 2024
p-l-
p-l- previously approved these changes Jul 16, 2024
@gpotter2
Copy link
Member Author

gpotter2 commented Jul 16, 2024

So apparently TOX_PARALLEL_NO_SPINNER=1 now breaks the logs being live (used to work). I commented it.
tox is very often broken, but also looks mostly unmaintained. I sometimes wonder if we shouldn't stick to a bash script calling UTscapy....

@gpotter2
Copy link
Member Author

@polybassa DoIP tests don't pass on Windows, even on my machine. Do you mind having a look into that?
Thanks

@gpotter2 gpotter2 force-pushed the windows-native-cleanup branch 2 times, most recently from 0858f16 to 86fcb43 Compare July 17, 2024 01:26
@gpotter2
Copy link
Member Author

Note: I've ended up disabling the DoIP tests that fail on Windows. I had a partially working fix in 86fcb43, but It still slightly failed (only on Python 3.7) and I'm unsure of why. Feel free to get inspiration from that commit if necessary

scapy/layers/http.py Dismissed Show dismissed Hide dismissed
@gpotter2 gpotter2 merged commit 420173c into secdev:master Jul 25, 2024
24 checks passed
@gpotter2 gpotter2 deleted the windows-native-cleanup branch July 25, 2024 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants