Skip to content

Commit

Permalink
Merge branch 'dev' into xor-bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
peace-maker authored Apr 21, 2024
2 parents dce8def + eec3321 commit 75903c7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ The table below shows which release corresponds to each branch, and what date th
- [#2327][2327] Add basic support to debug processes on Windows
- [#2322][2322] Add basic RISCV64 shellcraft support
- [#2330][2330] Change `context.newline` when setting `context.os` to `"windows"`
- [#2389][2389] Fix passing bytes to `context.log_file` and `crc.BitPolynom`
- [#2391][2391] Fix error message when passing invalid kwargs to `xor`

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

## 4.13.0 (`beta`)
Expand Down
3 changes: 3 additions & 0 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ following system libraries installed.

install/*


Note: For Mac OS X you will need to have cmake ``brew install cmake`` and pkg-config ``brew install pkg-config`` installed.

Released Version
-----------------

Expand Down
5 changes: 3 additions & 2 deletions docs/source/install/binutils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ Mac OS X
^^^^^^^^^^^^^^^^

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

.. code-block:: bash
$ brew install https://raw.githubusercontent.com/Gallopsled/pwntools-binutils/master/macos/binutils-$ARCH.rb
$ wget https://raw.githubusercontent.com/Gallopsled/pwntools-binutils/master/macos/binutils-$ARCH.rb
$ brew install ./binutils-$ARCH.rb
Alternate OSes
^^^^^^^^^^^^^^^^
Expand Down
2 changes: 2 additions & 0 deletions pwnlib/context/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,8 @@ def log_file(self, value):
"""
if isinstance(value, (bytes, six.text_type)):
# check if mode was specified as "[value],[mode]"
from pwnlib.util.packing import _need_text
value = _need_text(value)
if ',' not in value:
value += ',a'
filename, mode = value.rsplit(',', 1)
Expand Down
7 changes: 3 additions & 4 deletions pwnlib/tubes/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,6 @@ class ssh(Timeout, Logger):
#: Paramiko SSHClient which backs this object
client = None

#: Paramiko SFTPClient object which is used for file transfers.
#: Set to :const:`None` to disable ``sftp``.
sftp = None

#: PID of the remote ``sshd`` process servicing this connection.
pid = None

Expand Down Expand Up @@ -719,6 +715,9 @@ def cwd(self, cwd):

@property
def sftp(self):
"""Paramiko SFTPClient object which is used for file transfers.
Set to :const:`None` to disable ``sftp``.
"""
if not self._tried_sftp:
try:
self._sftp = self.transport.open_sftp_client()
Expand Down
2 changes: 2 additions & 0 deletions pwnlib/util/crc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class BitPolynom(object):

def __init__(self, n):
if isinstance(n, (bytes, six.text_type)):
from pwnlib.util.packing import _need_text
n = _need_text(n)
self.n = 0
x = BitPolynom(2)
try:
Expand Down

0 comments on commit 75903c7

Please sign in to comment.