secdev / scapy

Scapy: the Python-based interactive packet manipulation program & library.
https://scapy.net
GNU General Public License v2.0
10.81k stars 2.03k forks source link

Add support for websockets #4579

Open lucasdrufva opened 3 weeks ago

lucasdrufva commented 3 weeks ago

Adds support for websockets.

HTTP dissector has been updated to support omitting the reason phrase as this is usually done when upgrading to websocket connection.

fixes #4578

gpotter2 commented 3 weeks ago

Hi ! This looks pretty cool !

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 98.07692% with 3 lines in your changes missing coverage. Please review.

Project coverage is 78.74%. Comparing base (8e08cbf) to head (60a13b7).

Files with missing lines Patch % Lines
scapy/contrib/websocket.py 97.97% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4579 +/- ## ========================================== - Coverage 81.62% 78.74% -2.89% ========================================== Files 358 334 -24 Lines 85652 80602 -5050 ========================================== - Hits 69915 63470 -6445 - Misses 15737 17132 +1395 ``` | [Files with missing lines](https://app.codecov.io/gh/secdev/scapy/pull/4579?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=secdev) | Coverage Δ | | |---|---|---| | [scapy/layers/http.py](https://app.codecov.io/gh/secdev/scapy/pull/4579?src=pr&el=tree&filepath=scapy%2Flayers%2Fhttp.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=secdev#diff-c2NhcHkvbGF5ZXJzL2h0dHAucHk=) | `80.54% <100.00%> (-1.90%)` | :arrow_down: | | [scapy/contrib/websocket.py](https://app.codecov.io/gh/secdev/scapy/pull/4579?src=pr&el=tree&filepath=scapy%2Fcontrib%2Fwebsocket.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=secdev#diff-c2NhcHkvY29udHJpYi93ZWJzb2NrZXQucHk=) | `97.97% <97.97%> (ø)` | | ... and [284 files with indirect coverage changes](https://app.codecov.io/gh/secdev/scapy/pull/4579/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=secdev)