mirror of
https://github.com/Gallopsled/pwntools.git
synced 2026-11-08 08:06:05 -10:00
Compare commits
9
Commits
3.2.0beta4
...
3.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad71d9235b | ||
|
|
2e5f8061b2 | ||
|
|
099404277e | ||
|
|
bde40c36ae | ||
|
|
894b17e74a | ||
|
|
33b734cbc6 | ||
|
|
3e8454412e | ||
|
|
09ee73c31d | ||
|
|
0c4d1365e9 |
No files matched your search
+24
-3
@@ -9,9 +9,11 @@ The table below shows which release corresponds to each branch, and what date th
|
||||
|
||||
| Version | Branch | Release Date |
|
||||
| ---------------- | -------- | ---------------------- |
|
||||
| [3.3.0](#330) | `dev` | Dec 24, 2016 (planned)
|
||||
| [3.2.0](#320) | `beta` | Nov 12, 2016 (planned)
|
||||
| [3.1.0](#310) | `stable` | Oct 2, 2016
|
||||
| [3.4.0](#340) | `dev` | Feb 4, 2017 (planned)
|
||||
| [3.3.0](#330) | `beta` | Dec 24, 2016 (planned)
|
||||
| [3.2.0](#320) | `stable` | Nov 12, 2016
|
||||
| [3.1.1](#311) | | Oct 23, 2016
|
||||
| [3.1.0](#310) | | Oct 2, 2016
|
||||
| [3.0.4](#304) | | Sept 19, 2016
|
||||
| [3.0.3](#303) | | Sept 18, 2016
|
||||
| [3.0.2](#302) | | Sept 6, 2016
|
||||
@@ -19,9 +21,20 @@ The table below shows which release corresponds to each branch, and what date th
|
||||
| [3.0.0](#300) | | Aug 20, 2016
|
||||
| [2.2.0](#220) | | Jan 5, 2015
|
||||
|
||||
## 3.4.0
|
||||
|
||||
To be released on Feb 4, 2017.
|
||||
|
||||
## 3.3.0
|
||||
|
||||
To be released on Dec 24, 2016.
|
||||
|
||||
## 3.2.0
|
||||
|
||||
- [#695][695] Fixed a performance regression in `phd`.
|
||||
- [452605e][452605e] Fixed [#629][#629] related to correct removal of temporary files.
|
||||
- [ea94ee4][ea94ee4] Disallows semi-colons in for the `run_in_terminal` function, since it did not work properly in all cases.
|
||||
- [6376d07][6376d07] Added the mips shellcode `pushstr_array`.
|
||||
- [#700][700] Added missing MIPS shellcode documentation to readthedocs, and enabled unit tests
|
||||
- [#701][701] Command line tools refactored to have a common `pwn` entry point.
|
||||
+ Added an option to *not* install the traditional `asm`, `disasm`, `checksec`, etc scripts
|
||||
@@ -51,6 +64,7 @@ The table below shows which release corresponds to each branch, and what date th
|
||||
- [2af55c9][2af55c9] `AdbDevice` objects exposed via e.g. `adb.devices()` now offer scoped access to all `adb` module properties
|
||||
+ It is now possible to e.g. `map(lambda d: d.process(['id']).recvall(), adb.devices())`
|
||||
|
||||
|
||||
[695]: https://github.com/Gallopsled/pwntools/pull/695
|
||||
[700]: https://github.com/Gallopsled/pwntools/pull/700
|
||||
[701]: https://github.com/Gallopsled/pwntools/pull/701
|
||||
@@ -60,11 +74,18 @@ The table below shows which release corresponds to each branch, and what date th
|
||||
[709]: https://github.com/Gallopsled/pwntools/pull/709
|
||||
[705]: https://github.com/Gallopsled/pwntools/pull/705
|
||||
[703]: https://github.com/Gallopsled/pwntools/pull/703
|
||||
[452605e]: https://github.com/Gallopsled/pwntools/commit/452605e854f4870ef5ccfdf7fb110dfd75c50feb
|
||||
[ea94ee4]: https://github.com/Gallopsled/pwntools/commit/ea94ee4ca5a8060567cc9bd0dc33796a89ad0b95
|
||||
[6376d07]: https://github.com/Gallopsled/pwntools/commit/6376d072660fb2250f48bd22629bbd7e3c61c758
|
||||
[1e414af]: https://github.com/Gallopsled/pwntools/commit/1e414afbeb3a01242f4918f111febaa63b640eb7
|
||||
[869ec42]: https://github.com/Gallopsled/pwntools/commit/869ec42082b4b98958dfe85103da9b101dde7daa
|
||||
[4893819]: https://github.com/Gallopsled/pwntools/commit/4893819b4c23182da570e2f4ea4c14d73af2c0df
|
||||
[2af55c9]: https://github.com/Gallopsled/pwntools/commit/2af55c9bc382eca23f89bc0abc7a07c075521f94
|
||||
|
||||
## 3.1.1
|
||||
|
||||
Fixed a bug in `MemLeak.struct` (PR: #768).
|
||||
|
||||
## 3.1.0
|
||||
|
||||
A number of smaller bugfixes and documentation tweaks.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
sphinxcontrib-napoleon
|
||||
sphinxcontrib-autoprogram
|
||||
sphinxcontrib-autoprogram==0.1.2
|
||||
isort
|
||||
paramiko>=1.15.2
|
||||
mako>=1.0.0
|
||||
|
||||
+12
-1
@@ -1,3 +1,4 @@
|
||||
import ctypes
|
||||
import functools
|
||||
import string
|
||||
|
||||
@@ -96,8 +97,18 @@ class MemLeak(object):
|
||||
struct(class): A ctypes structure to be instantiated with leaked data
|
||||
Return Value:
|
||||
An instance of the provided struct class, with the leaked data decoded
|
||||
|
||||
Examples:
|
||||
|
||||
>>> @pwnlib.memleak.MemLeak
|
||||
... def leaker(addr):
|
||||
... return "A"
|
||||
>>> e = leaker.struct(0, pwnlib.elf.Elf32_Phdr)
|
||||
>>> hex(e.p_paddr)
|
||||
'0x41414141'
|
||||
|
||||
"""
|
||||
size = sizeof(struct)
|
||||
size = ctypes.sizeof(struct)
|
||||
data = self.n(address, size)
|
||||
obj = struct.from_buffer_copy(data)
|
||||
return obj
|
||||
|
||||
+29
-7
@@ -291,7 +291,7 @@ class ssh_channel(sock):
|
||||
"""Retrieve the address of an environment variable in the remote process.
|
||||
"""
|
||||
if not hasattr(self, 'argv'):
|
||||
log.error("Can only call getenv() on ssh_channel objects created with ssh.process")
|
||||
self.error("Can only call getenv() on ssh_channel objects created with ssh.process")
|
||||
|
||||
argv0 = self.argv[0]
|
||||
|
||||
@@ -668,8 +668,12 @@ class ssh(Timeout, Logger):
|
||||
See ``stdin``.
|
||||
preexec_fn(callable):
|
||||
Function which is executed on the remote side before execve().
|
||||
This **MUST** be a self-contained function -- it must perform
|
||||
all of its own imports, and cannot refer to variables outside
|
||||
its scope.
|
||||
preexec_args(object):
|
||||
Argument passed to ``preexec_fn``.
|
||||
This **MUST** only consist of native Python objects.
|
||||
raw(bool):
|
||||
If ``True``, disable TTY control code interpretation.
|
||||
aslr(bool):
|
||||
@@ -716,6 +720,23 @@ class ssh(Timeout, Logger):
|
||||
''
|
||||
>>> s.process('/usr/bin/env', env={'A':'B'}).recvall()
|
||||
'A=B\n'
|
||||
|
||||
>>> s.process('false', preexec_fn=1234)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
PwnlibException: preexec_fn must be a function
|
||||
|
||||
>>> s.process('false', preexec_fn=lambda: 1234)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
PwnlibException: preexec_fn cannot be a lambda
|
||||
|
||||
>>> def uses_globals():
|
||||
... foo = bar
|
||||
>>> print s.process('false', preexec_fn=uses_globals).recvall().strip() # doctest: +ELLIPSIS
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
NameError: global name 'bar' is not defined
|
||||
"""
|
||||
if not argv and not executable:
|
||||
self.error("Must specify argv or executable")
|
||||
@@ -767,15 +788,16 @@ class ssh(Timeout, Logger):
|
||||
# Allow the user to provide a self-contained function to run
|
||||
def func(): pass
|
||||
func = preexec_fn or func
|
||||
func_src = inspect.getsource(func).strip()
|
||||
func_name = func.__name__
|
||||
func_args = preexec_args
|
||||
|
||||
if not isinstance(func, types.FunctionType):
|
||||
log.error("preexec_fn must be a function")
|
||||
if func_name == (lambda: 0).__name__:
|
||||
log.error("preexec_fn cannot be a lambda")
|
||||
self.error("preexec_fn must be a function")
|
||||
|
||||
func_name = func.__name__
|
||||
if func_name == (lambda: 0).__name__:
|
||||
self.error("preexec_fn cannot be a lambda")
|
||||
|
||||
func_src = inspect.getsource(func).strip()
|
||||
setuid = setuid if setuid is None else bool(setuid)
|
||||
|
||||
script = r"""
|
||||
@@ -1454,7 +1476,7 @@ from ctypes import *; libc = CDLL('libc.so.6'); print(libc.getenv(%r))
|
||||
if os.path.isdir(file_or_directory):
|
||||
return self.upload_dir(file_or_directory, remote)
|
||||
|
||||
log.error('%r does not exist' % file_or_directory)
|
||||
self.error('%r does not exist' % file_or_directory)
|
||||
|
||||
|
||||
def download(self, file_or_directory, remote=None):
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
__version__ = '3.2.0beta4'
|
||||
__version__ = '3.2.0'
|
||||
Reference in new issue
Block a user