Skip to content

Commit

Permalink
Allow to install on Python 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
peace-maker committed Jan 17, 2025
1 parent dba9d40 commit 1dfb08a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Note: For Mac OS X you will need to have cmake ``brew install cmake`` and pkg-co
Released Version
-----------------

pwntools is available as a ``pip`` package for both Python2 and Python3.
pwntools is available as a ``pip`` package for Python3. Version v5.0.0 requires Python3.10 or later.

Python3
^^^^^^^
Expand Down
3 changes: 2 additions & 1 deletion pwnlib/libcdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import six
import tempfile
import struct
import sys

from pwnlib.context import context
from pwnlib.elf import ELF
Expand Down Expand Up @@ -498,7 +499,7 @@ def _extract_tarfile(cache_dir, data_filename, tarball):

def _extract_debfile(cache_dir, package_filename, package):
# Extract data.tar in the .deb archive.
if six.PY2:
if sys.version_info < (3, 6):
if not which('ar'):
log.error('Missing command line tool "ar" to extract .deb archive. Please install "ar" first.')

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ classifiers = [
]
keywords = ["pwntools", "exploit", "ctf", "capture", "the", "flag", "binary", "wargame", "overflow", "stack", "heap", "defcon"]

requires-python = ">=3.10"
requires-python = ">=3.4"
dependencies = [
"paramiko>=1.15.2",
"mako>=1.0.0",
Expand All @@ -52,7 +52,7 @@ dependencies = [
"six>=1.12.0",
"rpyc",
"colored_traceback",
"unix-ar",
"unix-ar; python_version>='3.6'",
"zstandard",
]

Expand Down

0 comments on commit 1dfb08a

Please sign in to comment.