mirror of
https://github.com/Gallopsled/pwntools.git
synced 2026-11-09 17:13:08 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac386877d1 | ||
|
|
4f08b6d79c | ||
|
|
065c79d29c |
No files matched your search
+10
-1
@@ -11,7 +11,8 @@ The table below shows which release corresponds to each branch, and what date th
|
||||
| ---------------- | -------- | ---------------------- |
|
||||
| [3.7.0](#350) | `dev` | Jun 17, 2017 (planned)
|
||||
| [3.6.0](#350) | `beta` | May 6, 2017 (planned)
|
||||
| [3.5.0](#350) | `stable` | Mar 26, 2017
|
||||
| [3.5.1](#351) | `stable` | Apr 15, 2017
|
||||
| [3.5.0](#350) | | Mar 26, 2017
|
||||
| [3.4.1](#341) | | Feb 17, 2017
|
||||
| [3.4.0](#340) | | Feb 13, 2017
|
||||
| [3.3.4](#334) | | Jan 12, 2016
|
||||
@@ -59,6 +60,14 @@ To be released on May 6, 2017.
|
||||
[905]: https://github.com/Gallopsled/pwntools/pull/905
|
||||
[919]: https://github.com/Gallopsled/pwntools/pull/919
|
||||
|
||||
## 3.5.1
|
||||
|
||||
- [#945][945] Speed up ssh via caching checksec results (fixes [#944][944])
|
||||
- [#950][950] Fixes a bug where setting `context.arch` does not have an effect on `adb.compile()` output architecture
|
||||
|
||||
[944]: https://github.com/Gallopsled/pwntools/issues/944
|
||||
[945]: https://github.com/Gallopsled/pwntools/pull/945
|
||||
[950]: https://github.com/Gallopsled/pwntools/pull/950
|
||||
|
||||
## 3.5.0
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
+11
-1
@@ -1197,14 +1197,24 @@ def compile(source):
|
||||
if not project:
|
||||
# Realistically this should inherit from context.arch, but
|
||||
# this works for now.
|
||||
abi = 'armeabi-v7a'
|
||||
sdk = '21'
|
||||
abi = {
|
||||
'aarch64': 'arm64-v8a',
|
||||
'amd64': 'x86_64',
|
||||
'arm': 'armeabi-v7a',
|
||||
'i386': 'x86',
|
||||
'mips': 'mips',
|
||||
'mips64': 'mips64',
|
||||
}.get(context.arch, None)
|
||||
|
||||
# If we have an attached device, use its settings.
|
||||
if context.device:
|
||||
abi = str(properties.ro.product.cpu.abi)
|
||||
sdk = str(properties.ro.build.version.sdk)
|
||||
|
||||
if abi is None:
|
||||
log.error("Unknown CPU ABI")
|
||||
|
||||
project = _generate_ndk_project(source, abi, sdk)
|
||||
|
||||
# Remove any output files
|
||||
|
||||
@@ -1127,7 +1127,7 @@ class ContextType(object):
|
||||
self.os = device.os or self.os
|
||||
elif isinstance(device, str):
|
||||
device = Device(device)
|
||||
else:
|
||||
elif device is not None:
|
||||
raise AttributeError("device must be either a Device object or a serial number as a string")
|
||||
|
||||
return device
|
||||
|
||||
+18
-3
@@ -624,7 +624,7 @@ class ssh(Timeout, Logger):
|
||||
try:
|
||||
self.info_once(self.checksec())
|
||||
except Exception:
|
||||
log.warn_once("Couldn't check security settings on %r" % self.host)
|
||||
self.warn_once("Couldn't check security settings on %r" % self.host)
|
||||
|
||||
@property
|
||||
def sftp(self):
|
||||
@@ -1973,6 +1973,16 @@ from ctypes import *; libc = CDLL('libc.so.6'); print(libc.getenv(%r))
|
||||
|
||||
return self._aslr_ulimit
|
||||
|
||||
def _checksec_cache(self, value=None):
|
||||
path = self._get_cachefile('%s-%s' % (self.host, self.port))
|
||||
|
||||
if value is not None:
|
||||
with open(path, 'w+') as f:
|
||||
f.write(value)
|
||||
else:
|
||||
with open(path, 'r+') as f:
|
||||
return f.read()
|
||||
|
||||
def checksec(self, banner=True):
|
||||
"""checksec()
|
||||
|
||||
@@ -1981,6 +1991,10 @@ from ctypes import *; libc = CDLL('libc.so.6'); print(libc.getenv(%r))
|
||||
Arguments:
|
||||
banner(bool): Whether to print the path to the ELF binary.
|
||||
"""
|
||||
cached = self._checksec_cache()
|
||||
if cached:
|
||||
return cached
|
||||
|
||||
red = text.red
|
||||
green = text.green
|
||||
yellow = text.yellow
|
||||
@@ -2001,5 +2015,6 @@ from ctypes import *; libc = CDLL('libc.so.6'); print(libc.getenv(%r))
|
||||
if self.aslr_ulimit:
|
||||
res += [ "Note:".ljust(10) + red("Susceptible to ASLR ulimit trick (CVE-2016-3672)")]
|
||||
|
||||
return '\n'.join(res)
|
||||
|
||||
cached = '\n'.join(res)
|
||||
self._checksec_cache(cached)
|
||||
return cached
|
||||
+1
-1
@@ -1 +1 @@
|
||||
__version__ = '3.5.0'
|
||||
__version__ = '3.5.1'
|
||||
Reference in new issue
Block a user