Gallopsled / pwntools

CTF framework and exploit development library
http://pwntools.com
Other
11.69k stars 1.67k forks source link

Fix displaying bright color variation in terminal output #2373

Closed peace-maker closed 2 months ago

peace-maker commented 3 months ago

The number of simultaneous colors in the current terminal are queried later during initialization and the text.num_colors attribute is updated accordingly. The text.has_bright attribute wasn't updated when that happened and always remained set to False. Calculate those properties based on num_colors dynamically.

https://github.com/Gallopsled/pwntools/blob/a2acdf9bd9161d4102454d999182fba3417372fe/pwnlib/term/__init__.py#L89