Skip to content

Commit 55390f1

Browse files
committed
Merge branch 'stable' into beta
2 parents a06d378 + db98e5e commit 55390f1

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The table below shows which release corresponds to each branch, and what date th
1111
| ---------------- | -------- | ---------------------- |
1212
| [4.14.0](#4140-dev) | `dev` |
1313
| [4.13.0](#4130-beta) | `beta` |
14+
| [4.12.1](#4121) | |
1415
| [4.12.0](#4120-stable) | `stable` | Feb 22, 2024
1516
| [4.11.1](#4111) | | Nov 14, 2023
1617
| [4.11.0](#4110) | | Sep 15, 2023
@@ -130,6 +131,14 @@ The table below shows which release corresponds to each branch, and what date th
130131
[2347]: https://github.com/Gallopsled/pwntools/pull/2347
131132
[2233]: https://github.com/Gallopsled/pwntools/pull/2233
132133

134+
## 4.12.1
135+
136+
- [#2373][2373] Fix displaying bright color variation in terminal output
137+
- [#2378][2378] Don't go though a shell in `gdb.debug`
138+
139+
[2373]: https://github.com/Gallopsled/pwntools/pull/2373
140+
[2378]: https://github.com/Gallopsled/pwntools/pull/2378
141+
133142
## 4.12.0 (`stable`)
134143

135144
- [#2202][2202] Fix `remote` and `listen` in sagemath

pwnlib/gdb.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@ def _gdbserver_args(pid=None, path=None, args=None, which=None, env=None, python
323323

324324
orig_args = args
325325

326-
gdbserver_args = [gdbserver, '--multi']
326+
# --no-startup-with-shell is required for forking shells like SHELL=/bin/fish
327+
# https://github.com/Gallopsled/pwntools/issues/2377
328+
gdbserver_args = [gdbserver, '--multi', '--no-startup-with-shell']
327329
if context.aslr:
328330
gdbserver_args += ['--no-disable-randomization']
329331
else:

pwnlib/term/text.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ class Module(types.ModuleType):
2727
def __init__(self):
2828
self.__file__ = __file__
2929
self.__name__ = __name__
30-
self.num_colors = 8
31-
self.has_bright = self.num_colors >= 16
32-
self.has_gray = self.has_bright
30+
self.num_colors = termcap.get('colors', 8) if sys.platform == 'win32' else 8
3331
self.when = 'auto'
3432
self._colors = {
3533
'black': 0,
@@ -61,6 +59,14 @@ def when(self):
6159
def when(self, val):
6260
self._when = eval_when(val)
6361

62+
@property
63+
def has_bright(self):
64+
return self.num_colors >= 16
65+
66+
@property
67+
def has_gray(self):
68+
return self.has_bright
69+
6470
def _fg_color(self, c):
6571
c = termcap.get('setaf', c) or termcap.get('setf', c)
6672
if not hasattr(c, 'encode'):

0 commit comments

Comments
 (0)