Compare commits

...
3 Commits
Author SHA1 Message Date
Arusekk 904872edc8 Release 4.0.1 2020-01-22 21:57:27 +01:00
Zach RiggleandArusekk 7b072dc7f7 Fix gadget caching for ROP objects with multiple ELFs (#1115)
* Fix test breakage caused by Sphinx deprecation

Closes #1112

* Fix gadget caching for ROP objects with multiple ELFs

Fixes Gallopsled/pwntools#1114

* Update requirements, fix travis failing

Co-authored-by: Arusekk <[email protected]>
2020-01-22 21:49:10 +01:00
CptGibbon eee1503252 Correct self.buffer.add() to self.buffer.unget() in recvline_pred() (#1412) 2020-01-18 20:46:22 +01:00
6 changed files with 25 additions and 8 deletions

No files matched your search

+10 -2
View File
@@ -11,7 +11,8 @@ The table below shows which release corresponds to each branch, and what date th
| ---------------- | -------- | ---------------------- |
| [4.2.0](#420) | `dev` | Feb 10, 2020 (planned)
| [4.1.0](#410) | `beta` | Jan 30, 2020 (planned)
| [4.0.0](#400) | `stable` | Jan 09, 2020
| [4.0.1](#401) | `stable` | Jan 22, 2020
| [4.0.0](#400) | | Jan 09, 2020
| [3.13.0](#3130) | | Nov 5, 2019
| [3.12.1](#3121) | | Sept 17, 2018
| [3.12.0](#3120) | | Feb 22, 2018
@@ -63,7 +64,14 @@ To be released on Jan 30, 2020.
[1241]: https://github.com/Gallopsled/pwntools/pulls/1218
[1218]: https://github.com/Gallopsled/pwntools/pulls/1218
## 4.0.0 (`stable`)
## 4.0.1 (`stable`)
- [#1412][1412] `recvline_pred()` and similar do not reorder data
- Bypass unicorn-engine/unicorn#1100 and unicorn-engine/unicorn#1170 requiring unstable package
[1412]: https://github.com/Gallopsled/pwntools/pulls/1412
## 4.0.0
- **Python 3 support! <3**
- [#1402][1402] Fix serialtube in python 3
+1
View File
@@ -7,6 +7,7 @@ paramiko>=1.15.2
pip>=6.0.8
pyelftools>=0.2.3
pygments>=2.0
pypandoc
pyserial>=2.7
requests>=2.5.1
ropgadget>=5.3
+8 -1
View File
@@ -277,6 +277,7 @@ import hashlib
import itertools
import os
import re
import shutil
import six
import string
import sys
@@ -1060,13 +1061,19 @@ class ROP(object):
return os.path.join(cachedir, sha256.hexdigest())
@staticmethod
def clear_cache():
"""Clears the ROP gadget cache"""
cachedir = os.path.join(tempfile.gettempdir(), 'pwntools-rop-cache')
shutil.rmtree(cachedir)
def __cache_load(self, elf):
filename = self.__get_cachefile_name(elf)
if not os.path.exists(filename):
return None
log.info_once('Loaded cached gadgets for %r' % elf.file.name)
gadgets = eval(open(filename).read())
gadgets = {k - elf.load_addr + elf.address:v for k, v in gadgets.items()}
log.info_once('Loaded %s cached gadgets for %r', len(gadgets), elf.file.name)
return gadgets
def __cache_save(self, elf, data):
+2 -2
View File
@@ -498,11 +498,11 @@ class tube(Timeout, Logger):
try:
line = self.recvline(keepends=True)
except Exception:
self.buffer.add(tmpbuf)
self.buffer.unget(tmpbuf)
raise
if not line:
self.buffer.add(tmpbuf)
self.buffer.unget(tmpbuf)
return b''
if pred(line):
+1 -1
View File
@@ -1 +1 @@
__version__ = '4.0.0'
__version__ = '4.0.1'
+3 -2
View File
@@ -61,7 +61,8 @@ install_requires = ['paramiko>=1.15.2',
'psutil>=3.3.0',
'intervaltree>=3.0',
'sortedcontainers',
'unicorn']
'unicorn>=1.0.2rc1', # see unicorn-engine/unicorn#1100, unicorn-engine/unicorn#1170
]
# Check that the user has installed the Python development headers
PythonH = os.path.join(get_python_inc(), 'Python.h')
@@ -82,7 +83,7 @@ setup(
name = 'pwntools',
python_requires = '>=2.7',
packages = find_packages(),
version = '4.0.0',
version = '4.0.1',
data_files = [('',
glob.glob('*.md') + glob.glob('*.txt')),
],