Compare commits

...
5 Commits
Author SHA1 Message Date
Mathias Svensson 7d5f8ca4b4 Release 3.2.0beta4 2016-10-18 22:22:19 +02:00
Zach Riggle 7695acc798 Fix bash completion regression (#772)
Fixes Gallopsled/pwntools#767
2016-10-18 22:17:31 +02:00
Zach Riggle 3f48a0b803 Remove all Github update checks (#761)
These were nice-to-have, but as long as PyPi is updated and functioning
properly, we don't need to check Github.

Fixes Gallopsled/pwntools#756
2016-10-18 21:58:03 +02:00
Mathias Svensson e5b6aedd3d Release 3.2.0beta3 2016-10-11 03:00:18 +02:00
Zach Riggle 4b405c69b6 Fix incorrect usage of argv in unhex 2016-10-11 02:59:52 +02:00
5 changed files with 7 additions and 51 deletions

No files matched your search

+3 -1
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
# cache list of shellcodes
_shellcraft_shellcodes=$(shellcraft)
_shellcraft_shellcodes=$(pwn shellcraft -l)
_shellcraft()
{
@@ -44,3 +45,4 @@ _shellcraft()
}
complete -F _shellcraft pwn shellcraft
complete -F _shellcraft shellcraft
+1 -1
View File
@@ -20,7 +20,7 @@ def main(args):
s = sys.stdin.read().translate(None, whitespace)
sys.stdout.write(s.decode('hex'))
else:
sys.stdout.write(''.join(sys.argv[1:]).decode('hex'))
sys.stdout.write(''.join(args.hex).decode('hex'))
except TypeError, e:
sys.stderr.write(str(e) + '\n')
+1 -47
View File
@@ -34,34 +34,6 @@ package_name = 'pwntools'
package_repo = 'Gallopsled/pwntools'
update_freq = datetime.timedelta(days=7).total_seconds()
def available_on_github(prerelease=current_version.is_prerelease):
"""Return True if an update is available on Github.
>>> available_on_github() # doctest: +ELLIPSIS
<Version('...')>
>>> available_on_github(prerelease=False).is_prerelease
False
"""
url = 'https://api.github.com/repos/%s/tags' % package_repo
with context.quiet:
tags = json.loads(wget(url, timeout = 60))
# 'pwntools-ancient' is a tag, but not a valid version.
# Handle this here, and for all potential tags which cause
# issues.
versions = []
for tag in [t['name'] for t in tags]:
try:
versions.append(packaging.version.Version(tag))
except Exception:
pass
if not prerelease:
versions = filter(lambda v: not v.is_prerelease, versions)
return max(versions)
def available_on_pypi(prerelease=current_version.is_prerelease):
"""Return True if an update is available on PyPI.
@@ -120,21 +92,12 @@ def perform_check(prerelease=current_version.is_prerelease):
['pip', 'install', '-U', ...]
>>> def bail(*a): raise Exception()
>>> github = pwnlib.update.available_on_github
>>> pypi = pwnlib.update.available_on_pypi
>>> pwnlib.update.available_on_github = bail
>>> perform_check(prerelease=False)
['pip', 'install', '-U', 'pwntools']
>>> perform_check(prerelease=True) # doctest: +ELLIPSIS
['pip', 'install', '-U', 'pwntools...']
>>> pwnlib.update.available_on_github = github
>>> pwnlib.update.available_on_pypi = bail
>>> perform_check(prerelease=False)
['pip', 'install', '-U', 'git+https://github.com/Gallopsled/pwntools.git@...']
>>> perform_check(prerelease=True) # doctest: +ELLIPSIS
['pip', 'install', '-U', 'git+https://github.com/Gallopsled/pwntools.git@...']
"""
pypi = current_version
try:
@@ -142,13 +105,7 @@ def perform_check(prerelease=current_version.is_prerelease):
except Exception:
log.warning("An issue occurred while checking PyPI")
github = current_version
try:
github = available_on_github(prerelease)
except Exception:
log.warning("An issue occurred while checking Github")
best = max(pypi, github, current_version)
best = max(pypi, current_version)
where = None
command = None
@@ -170,9 +127,6 @@ def perform_check(prerelease=current_version.is_prerelease):
if best.is_prerelease:
pypi_package += '==%s' % (best)
command += [pypi_package]
else:
where = 'GitHub'
command += ['git+https://github.com/%s.git@%s' % (package_repo, github)]
command_str = ' '.join(command)
+1 -1
View File
@@ -1 +1 @@
__version__ = '3.2.0beta2'
__version__ = '3.2.0beta4'
+1 -1
View File
@@ -83,7 +83,7 @@ except ImportError:
setup(
name = 'pwntools',
packages = find_packages(),
version = '3.2.0beta2',
version = '3.2.0beta4',
data_files = [('',
glob.glob('*.md') + glob.glob('*.txt')),
],