Compare commits

...
3 Commits
Author SHA1 Message Date
Mathias Svensson 4d529cd543 Release 3.4.1 2017-02-17 14:29:51 +01:00
Kristoffer Søholm e021f57806 Fixed bug in generatePadding (issue #891) 2017-02-17 14:15:31 +01:00
Zach Riggle b6cfec6284 Do not fail with gdb.debug() over ssh when given an absolute path (#894)
* Do not fail with gdb.debug() over ssh when given an absolute path

Fixes Gallopsled/pwntools#885

* Prevent failing on stable since this directory doesn't exist
2017-02-17 00:02:53 -05:00
7 changed files with 27 additions and 11 deletions

No files matched your search

+12 -1
View File
@@ -11,7 +11,8 @@ The table below shows which release corresponds to each branch, and what date th
| ---------------- | -------- | ---------------------- |
| [3.6.0](#350) | `dev` | May 6, 2017 (planned)
| [3.5.0](#350) | `beta` | Mar 25, 2017 (planned)
| [3.4.0](#340) | `stable` | Feb 13, 2017
| [3.4.1](#341) | `stable` | Feb 17, 2017
| [3.4.0](#340) | | Feb 13, 2017
| [3.3.4](#334) | | Jan 12, 2016
| [3.3.3](#333) | | Jan 10, 2016
| [3.3.2](#332) | | Jan 10, 2016
@@ -37,6 +38,16 @@ To be released on May 6, 2017.
To be released on Mar 25, 2017.
## 3.4.1
- [#894][894] Fix a bug when using `gdb.debug()` over ssh.
- [e021f57][e021f57] Fix a bug ([#891][891]) in `rop` when needing to insert padding to fix alignment
[e021f57]: https://github.com/Gallopsled/pwntools/commit/e021f57
[894]: https://github.com/Gallopsled/pwntools/pull/894
[891]: https://github.com/Gallopsled/pwntools/issues/891
## 3.4.0
- [#800][800] Add `shell=` option to `ssh.process()`
+1 -1
View File
@@ -2,7 +2,7 @@
![pwntools logo](https://github.com/Gallopsled/pwntools/blob/stable/docs/source/logo.png?raw=true)
[![Docs](https://readthedocs.org/projects/pwntools/badge/?version=stable)](https://docs.pwntools.com/)
[![PyPI](https://img.shields.io/badge/pypi-v3.4.0-green.svg?style=flat)](https://pypi.python.org/pypi/pwntools/)
[![PyPI](https://img.shields.io/badge/pypi-v3.4.1-green.svg?style=flat)](https://pypi.python.org/pypi/pwntools/)
[![Travis](https://travis-ci.org/Gallopsled/pwntools.svg)](https://travis-ci.org/Gallopsled/pwntools)
[![Coveralls](https://img.shields.io/coveralls/Gallopsled/pwntools/dev.svg)](https://coveralls.io/github/Gallopsled/pwntools?branch=dev)
[![Twitter](https://img.shields.io/badge/twitter-pwntools-4099FF.svg?style=flat)](https://twitter.com/pwntools)
+8 -5
View File
@@ -226,7 +226,7 @@ def debug(args, execute=None, exe=None, ssh=None, env=None, **kwargs):
if not ssh and context.os == 'android':
host = context.adb_host
attach((host, port), exe=exe, execute=execute, need_ptrace_scope = False)
attach((host, port), exe=exe, execute=execute, need_ptrace_scope = False, ssh=ssh)
# gdbserver outputs a message when a client connects
garbage = gdbserver.recvline(timeout=1)
@@ -247,8 +247,8 @@ def get_gdb_arch():
@LocalContext
def attach(target, execute = None, exe = None, need_ptrace_scope = True):
"""attach(target, execute = None, exe = None, arch = None) -> None
def attach(target, execute = None, exe = None, need_ptrace_scope = True, ssh = None):
"""attach(target, execute = None, exe = None, arch = None, ssh = None) -> None
Start GDB in a new terminal and attach to `target`.
:func:`pwnlib.util.proc.pidof` is used to find the PID of `target` except
@@ -401,8 +401,11 @@ def attach(target, execute = None, exe = None, need_ptrace_scope = True):
cmd += ' -q '
if exe and context.native:
if ssh:
ssh.download_file(exe)
exe = os.path.basename(exe)
if not os.path.isfile(exe):
log.error('no such file: %s' % exe)
log.error('No such file: %s' % exe)
cmd += ' "%s"' % exe
if pid and not context.os == 'android':
@@ -460,7 +463,7 @@ def ssh_gdb(ssh, process, execute = None, arch = None, **kwargs):
l = tubes.listen.listen(0)
forwardport = l.lport
attach(('127.0.0.1', forwardport), execute, local_exe, arch)
attach(('127.0.0.1', forwardport), execute, local_exe, arch, ssh=ssh)
l.wait_for_connection() <> ssh.connect_remote('127.0.0.1', gdbport)
return c
+3 -1
View File
@@ -478,7 +478,9 @@ class ROP(object):
"""
Generates padding to be inserted into the ROP stack.
"""
return cyclic.cyclic(offset + count)[-count:]
if count:
return cyclic.cyclic(offset + count)[-count:]
return ''
def describe(self, object):
"""
+1 -1
View File
@@ -1 +1 @@
__version__ = '3.4.0'
__version__ = '3.4.1'
+1 -1
View File
@@ -80,7 +80,7 @@ except ImportError:
setup(
name = 'pwntools',
packages = find_packages(),
version = '3.4.0',
version = '3.4.1',
data_files = [('',
glob.glob('*.md') + glob.glob('*.txt')),
],
+1 -1
View File
@@ -96,7 +96,7 @@ setup_android_emulator()
# However, the file needs to be present or else things break.
touch 'docs/source/adb.rst'
touch 'docs/source/protocols/adb.rst'
touch 'docs/source/protocols/adb.rst' || true
echo "Skipping Android emulator install, Android tests disabled."
return