Skip to content

Commit 75903c7

Browse files
authored
Merge branch 'dev' into xor-bugfix
2 parents dce8def + eec3321 commit 75903c7

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ The table below shows which release corresponds to each branch, and what date th
7777
- [#2327][2327] Add basic support to debug processes on Windows
7878
- [#2322][2322] Add basic RISCV64 shellcraft support
7979
- [#2330][2330] Change `context.newline` when setting `context.os` to `"windows"`
80+
- [#2389][2389] Fix passing bytes to `context.log_file` and `crc.BitPolynom`
8081
- [#2391][2391] Fix error message when passing invalid kwargs to `xor`
8182

8283
[2360]: https://github.com/Gallopsled/pwntools/pull/2360
@@ -85,6 +86,7 @@ The table below shows which release corresponds to each branch, and what date th
8586
[2327]: https://github.com/Gallopsled/pwntools/pull/2327
8687
[2322]: https://github.com/Gallopsled/pwntools/pull/2322
8788
[2330]: https://github.com/Gallopsled/pwntools/pull/2330
89+
[2389]: https://github.com/Gallopsled/pwntools/pull/2389
8890
[2391]: https://github.com/Gallopsled/pwntools/pull/2391
8991

9092
## 4.13.0 (`beta`)

docs/source/install.rst

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ following system libraries installed.
1515

1616
install/*
1717

18+
19+
Note: For Mac OS X you will need to have cmake ``brew install cmake`` and pkg-config ``brew install pkg-config`` installed.
20+
1821
Released Version
1922
-----------------
2023

docs/source/install/binutils.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ Mac OS X
3232
^^^^^^^^^^^^^^^^
3333

3434
Mac OS X is just as easy, but requires building binutils from source.
35-
However, we've made ``homebrew`` recipes to make this a single command.
35+
However, we've made ``homebrew`` recipes to make this just two commands.
3636
After installing `brew <https://brew.sh>`__, grab the appropriate
3737
recipe from our `binutils
3838
repo <https://github.com/Gallopsled/pwntools-binutils/>`__.
3939

4040
.. code-block:: bash
4141
42-
$ brew install https://raw.githubusercontent.com/Gallopsled/pwntools-binutils/master/macos/binutils-$ARCH.rb
42+
$ wget https://raw.githubusercontent.com/Gallopsled/pwntools-binutils/master/macos/binutils-$ARCH.rb
43+
$ brew install ./binutils-$ARCH.rb
4344
4445
Alternate OSes
4546
^^^^^^^^^^^^^^^^

pwnlib/context/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,8 @@ def log_file(self, value):
10331033
"""
10341034
if isinstance(value, (bytes, six.text_type)):
10351035
# check if mode was specified as "[value],[mode]"
1036+
from pwnlib.util.packing import _need_text
1037+
value = _need_text(value)
10361038
if ',' not in value:
10371039
value += ',a'
10381040
filename, mode = value.rsplit(',', 1)

pwnlib/tubes/ssh.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -550,10 +550,6 @@ class ssh(Timeout, Logger):
550550
#: Paramiko SSHClient which backs this object
551551
client = None
552552

553-
#: Paramiko SFTPClient object which is used for file transfers.
554-
#: Set to :const:`None` to disable ``sftp``.
555-
sftp = None
556-
557553
#: PID of the remote ``sshd`` process servicing this connection.
558554
pid = None
559555

@@ -719,6 +715,9 @@ def cwd(self, cwd):
719715

720716
@property
721717
def sftp(self):
718+
"""Paramiko SFTPClient object which is used for file transfers.
719+
Set to :const:`None` to disable ``sftp``.
720+
"""
722721
if not self._tried_sftp:
723722
try:
724723
self._sftp = self.transport.open_sftp_client()

pwnlib/util/crc/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ class BitPolynom(object):
7474

7575
def __init__(self, n):
7676
if isinstance(n, (bytes, six.text_type)):
77+
from pwnlib.util.packing import _need_text
78+
n = _need_text(n)
7779
self.n = 0
7880
x = BitPolynom(2)
7981
try:

0 commit comments

Comments
 (0)