Skip to content

Websocket: add WS_Client - #5320

Merged
gpotter2 merged 3 commits into
secdev:masterfrom
gpotter2:websocket
Nov 29, 2026
Merged

gpotter2 merged 3 commits into
secdev:masterfrom
gpotter2:websocket

Conversation

@gpotter2

Copy link
Copy Markdown
Member
  • add a WS_Client
  • support upgrading a HTTP_Client (h2C / http2)

…ades

WS_Client is an Automaton that performs the WebSocket opening handshake
over HTTP_Client and handles ping/pong/close control frames on its own,
usable directly or through the wslink supersocket. Close frame payloads
are dissected as WebSocketClose (RFC6455 sect 7.4.1). HTTP_Client gains
upgrade() to switch an established connection to WebSocket or h2c after
a 101 response (used automatically by request()); WebSocket/H2Frame
http_upgrade() is renamed http_upgrade_request() and gained a client-side
http_upgrade_response() validator.

AI-Assisted: yes (GitHub Copilot, GLM-5.2)
_CLAIMSClaimSet now logs a warning when encountering compressed claims
(sect 2.2.18.4) instead of silently mis-parsing them. PAC_DEVICE_CLAIMS
_INFO (sect 2.13) is added; it is not yet registered in _PACTYPES. A
misleading 'NDR PACKETS' comment is corrected to 'PAC_DEVICE_INFO'.

AI-Assisted: yes (GitHub Copilot, GLM-5.2)
@codecov

codecov Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 36.50000% with 127 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.10%. Comparing base (0257318) to head (ab8d55c).

Files with missing lines Patch % Lines
scapy/contrib/websocket.py 37.41% 97 Missing ⚠️
scapy/layers/http.py 25.71% 26 Missing ⚠️
scapy/contrib/http2.py 50.00% 3 Missing ⚠️
scapy/layers/msrpce/mspac.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5320      +/-   ##
==========================================
- Coverage   81.19%   81.10%   -0.09%     
==========================================
  Files         376      376              
  Lines       99209    99386     +177     
==========================================
+ Hits        80550    80607      +57     
- Misses      18659    18779     +120     
Files with missing lines Coverage Δ
scapy/layers/msrpce/mspac.py 91.03% <75.00%> (-0.31%) ⬇️
scapy/contrib/http2.py 95.91% <50.00%> (-0.30%) ⬇️
scapy/layers/http.py 80.41% <25.71%> (-2.78%) ⬇️
scapy/contrib/websocket.py 65.79% <37.41%> (-22.36%) ⬇️

... and 8 files with indirect coverage changes

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

AI-Assisted: no
@gpotter2
gpotter2 merged commit 98b81da into secdev:master Nov 29, 2026
23 checks passed
@gpotter2
gpotter2 deleted the websocket branch November 29, 2026 15:55
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.

1 participant