Gallopsled / Gallopsled/pwntools

Native websocket support in pwntools

Open
#2,299 1 comment 3 reactions 0 assignees View on GitHub
feature
Dominant language
Python
Stars
13.7k
Forks
1.9k
Avg merge
6d 23h
Merged PRs (30d)
3

Description

In 2023 websockets are fairly popular in CTFs, but it seems there's currently no way to make pwntools socket library work with websockets.

* What the feature does
* Allow me to connect to a websocket server
* Allow me to send and receive messages
* Possibly similar to https://docs.pwntools.com/en/stable/tubes.html, but I'm not sure how well it maps, considering websockets are more like a channel for individual messages instead of an input/output stream
* Why the feature should exist
* Many CTFs use it in some way or another
* There's currently no good way to use pwntools with websockets
* What tests should be included
* 🤷

When searching for this feature I found these:

- https://gist.github.com/frankli0324/795162a14be988a01e0efa0531f7ac5a
- https://pypi.org/project/pwntools-tube-websocket/#description

Unfortunately I don't have the time/skills to implement this myself.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the pwntools tubes documentation and the linked websocket tube implementation, then inspect closed pull request #2350 for prior design context. Define how message-oriented websocket connections should fit the existing tube API, including connection, send, receive, and test expectations; done means a documented, tested native websocket interface.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.