Skip to content

Commit 27366fd

Browse files
committed
Merge branch 'beta' into dev
2 parents f2f55f3 + 5f79e1d commit 27366fd

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
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
@@ -148,6 +149,14 @@ The table below shows which release corresponds to each branch, and what date th
148149
[2347]: https://github.com/Gallopsled/pwntools/pull/2347
149150
[2233]: https://github.com/Gallopsled/pwntools/pull/2233
150151

152+
## 4.12.1
153+
154+
- [#2373][2373] Fix displaying bright color variation in terminal output
155+
- [#2378][2378] Don't go though a shell in `gdb.debug`
156+
157+
[2373]: https://github.com/Gallopsled/pwntools/pull/2373
158+
[2378]: https://github.com/Gallopsled/pwntools/pull/2378
159+
151160
## 4.12.0 (`stable`)
152161

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

pwnlib/gdb.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ def _gdbserver_args(pid=None, path=None, args=None, which=None, env=None, python
346346
gdbserver_args += ['--wrapper', python_wrapper_script, '--']
347347
elif env is not None:
348348
gdbserver_args += ['--wrapper', which('env'), '-i'] + env_args + ['--']
349+
# --no-startup-with-shell is required for forking shells like SHELL=/bin/fish
350+
# https://github.com/Gallopsled/pwntools/issues/2377
351+
else:
352+
gdbserver_args += ['--no-startup-with-shell']
349353

350354
gdbserver_args += ['localhost:0']
351355
gdbserver_args += args

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)