pwntools icon indicating copy to clipboard operation
pwntools copied to clipboard

delete and refactor class Buffer ?

Open gogo2464 opened this issue 2 years ago • 1 comments

  • 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

gogo2464 avatar Nov 21 '21 18:11 gogo2464

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.

gogo2464 avatar Nov 21 '21 18:11 gogo2464

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.

peace-maker avatar Jul 27 '23 18:07 peace-maker