pwntools
pwntools copied to clipboard
delete and refactor class Buffer ?
-
What the feature does: Delete class Buffer and use a raw buffer in tubes instead.
-
Why the feature should exist I think the usage of this class reinvents the wheel and makes it more difficult to maintain pwntools. I may be wrong. I need your opinions.
-
What tests should be included I plan to keep the same tests. I have just to avoid to make them crash.
Assign me to this issue if you agree with me. I have already started in the PR: https://github.com/Gallopsled/pwntools/pull/1999
With raw buffer I mean b"".
I mentioned the term slighty hack in the comment of pwntools https://github.com/Gallopsled/pwntools/blob/dev/pwnlib/tubes/process.py#L691
I thins this issue could fix the hack.
The Buffer default size is controlled by context.buffer_size
which would have to be reimplemented when switching to a raw bytes object. I don't think removal of the Buffer class increases maintainability.
Please comment with detailed info of what you find problematic. It's possible to implement spawning processes on windows without changing the buffering in tube
.