Skip to content

Commit

Permalink
Merge branch 'stable' into clean_and_log_buffered
Browse files Browse the repository at this point in the history
  • Loading branch information
Arusekk committed Oct 29, 2023
2 parents 91889f8 + 3ff37a8 commit 35d47da
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Expand Up @@ -11,7 +11,8 @@ The table below shows which release corresponds to each branch, and what date th
| ---------------- | -------- | ---------------------- |
| [4.13.0](#4130-dev) | `dev` |
| [4.12.0](#4120-beta) | `beta` |
| [4.11.0](#4110-stable) | `stable` | Sep 15, 2023
| [4.11.1](#4111-stable) | `stable` |
| [4.11.0](#4110) | | Sep 15, 2023
| [4.10.0](#4100) | | May 21, 2023
| [4.9.0](#490) | | Dec 29, 2022
| [4.8.0](#480) | | Apr 21, 2022
Expand Down Expand Up @@ -88,7 +89,13 @@ The table below shows which release corresponds to each branch, and what date th
[2257]: https://github.com/Gallopsled/pwntools/pull/2257
[2225]: https://github.com/Gallopsled/pwntools/pull/2225

## 4.11.0 (`stable`)
## 4.11.1 (`stable`)

- [#2281][2281] FIX: Getting right amount of data for search fix

[2281]: https://github.com/Gallopsled/pwntools/pull/2281

## 4.11.0

- [#2185][2185] make fmtstr module able to create payload without $ notation
- [#2103][2103] Add search for libc binary by leaked function addresses `libcdb.search_by_symbol_offsets()`
Expand Down
5 changes: 3 additions & 2 deletions pwnlib/elf/elf.py
Expand Up @@ -1195,9 +1195,10 @@ def search(self, needle, writable = False, executable = False):
for seg in segments:
addr = seg.header.p_vaddr
memsz = seg.header.p_memsz
zeroed = memsz - seg.header.p_filesz
filesz = seg.header.p_filesz
zeroed = memsz - filesz
offset = seg.header.p_offset
data = self.mmap[offset:offset+memsz]
data = self.mmap[offset:offset+filesz]
data += b'\x00' * zeroed
offset = 0
while True:
Expand Down
4 changes: 3 additions & 1 deletion pwnlib/timeout.py
Expand Up @@ -30,9 +30,11 @@ def __enter__(self):
self.obj._stop = min(self.obj._stop, self.old_stop)

self.obj._timeout = self.timeout
self.obj.timeout_change()
def __exit__(self, *a):
self.obj._timeout = self.old_timeout
self.obj._stop = self.old_stop
self.obj.timeout_change()

class _local_handler(object):
def __init__(self, obj, timeout):
Expand Down Expand Up @@ -157,7 +159,7 @@ def _get_timeout_seconds(self, value):
else:
value = float(value)

if value is value < 0:
if value < 0:
raise AttributeError("timeout: Timeout cannot be negative")

if value > self.maximum:
Expand Down

0 comments on commit 35d47da

Please sign in to comment.