Open caprinux opened 3 years ago
FYI it is way better to split such issues, because every encoder we have is (sadly) a separate being.
@Arusekk most of these issues are in the core encoders.enode()
function, not the individual encoders themselves ☹️
See #1923
Was messing around with Pwnlib.encoders and I tried encoding bytes from \x10 through \xff. Found a few bugs along the way
Iterating over the
bytes
object yields integers instead of single-bytebytes
object.There's a separate bug if you encode(..., force=True) that complains about calling bytes(avoid)
Also this should only be done if
context.randomize == True
And this seems to hang forever, even if you do the "right thing"
In summary, there's
• a bunch of bugs that need to be fixed to use bytes objects with encode and friends • e.g. set(b'asdf') == {97, 115, 100, 102} • and the docs need to be updated to say bytes instead of str • and the examples need to be updated to not use a set() apparently • encoders should not be shuffled unless context.randomize is set