Skip to content

Commit bc453b4

Browse files
committed
Merge branch 'beta' into dev
2 parents d7817a7 + f47e417 commit bc453b4

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ The table below shows which release corresponds to each branch, and what date th
122122
[2435]: https://github.com/Gallopsled/pwntools/pull/2435
123123
[2437]: https://github.com/Gallopsled/pwntools/pull/2437
124124

125+
## 4.13.1
126+
127+
- [#2445][2445] Fix parsing the PLT on Windows
128+
- [#2466][2466] Fix PLT emulation with Unicorn 2.1.0
129+
- [#2466][2466] Switch to PyPi Simple API for update checks
130+
- [#2467][2467] Fix loading at all on Windows
131+
132+
[2445]: https://github.com/Gallopsled/pwntools/pull/2445
133+
[2466]: https://github.com/Gallopsled/pwntools/pull/2466
134+
[2467]: https://github.com/Gallopsled/pwntools/pull/2467
135+
125136
## 4.13.0 (`stable`)
126137

127138
- [#2242][2242] Term module revamp: activating special handling of terminal only when necessary

pwnlib/elf/plt.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ def __ensure_memory_to_run_unicorn():
7070
mm.close()
7171
except OSError:
7272
raise OSError("Cannot allocate 1GB memory to run Unicorn Engine")
73+
except ImportError:
74+
# Can only mmap files on Windows, would need to use VirtualAlloc.
75+
pass
7376

7477

7578
def prepare_unicorn_and_context(elf, got, address, data):
@@ -166,8 +169,8 @@ def hook_mem(uc, access, address, size, value, user_data):
166169
return False
167170

168171
hooks = [
169-
uc.hook_add(U.UC_HOOK_MEM_READ | U.UC_HOOK_MEM_READ_UNMAPPED,
170-
hook_mem, stopped_addr),
172+
uc.hook_add(U.UC_HOOK_MEM_READ, hook_mem, stopped_addr),
173+
uc.hook_add(U.UC_HOOK_MEM_READ_UNMAPPED, hook_mem, stopped_addr),
171174
]
172175

173176
# callback for tracing instructions

pwnlib/tubes/ssh.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2052,7 +2052,7 @@ def user_shstk(self):
20522052
Example:
20532053
20542054
>>> s = ssh("travis", "example.pwnme")
2055-
>>> s.user_shstk
2055+
>>> s.user_shstk # doctest: +SKIP
20562056
False
20572057
"""
20582058
if self._user_shstk is None:

pwnlib/update.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,15 @@ def available_on_pypi(prerelease=current_version.is_prerelease):
7474
False
7575
"""
7676
# Deferred import to save startup time
77-
from six.moves.xmlrpc_client import ServerProxy
77+
import requests
7878

7979
versions = getattr(available_on_pypi, 'cached', None)
8080
if versions is None:
81-
client = ServerProxy('https://pypi.python.org/pypi')
82-
versions = client.package_releases('pwntools', True)
81+
response = requests.get("https://pypi.org/simple/pwntools/",
82+
headers={"Accept": "application/vnd.pypi.simple.v1+json"},
83+
timeout=5)
84+
response.raise_for_status()
85+
versions = response.json()["versions"]
8386
available_on_pypi.cached = versions
8487

8588
versions = map(packaging.version.Version, versions)

0 commit comments

Comments
 (0)