mirror of
https://github.com/Gallopsled/pwntools.git
synced 2026-11-09 10:09:36 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d529cd543 | ||
|
|
e021f57806 | ||
|
|
b6cfec6284 |
No files matched your search
+12
-1
@@ -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()`
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||

|
||||
|
||||
[](https://docs.pwntools.com/)
|
||||
[](https://pypi.python.org/pypi/pwntools/)
|
||||
[](https://pypi.python.org/pypi/pwntools/)
|
||||
[](https://travis-ci.org/Gallopsled/pwntools)
|
||||
[](https://coveralls.io/github/Gallopsled/pwntools?branch=dev)
|
||||
[](https://twitter.com/pwntools)
|
||||
|
||||
+8
-5
@@ -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
@@ -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
@@ -1 +1 @@
|
||||
__version__ = '3.4.0'
|
||||
__version__ = '3.4.1'
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in new issue
Block a user