We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
aarch64.linux.pushstr_array is broken
There's also a missing colon after the `if` statement, and it seems this was never never finished since there's no `%endif`.

https://github.com/Gallopsled/pwntools/blob/813749493288fd7330b7b44b81a7f2f7a8a02dac/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm#L76-L79


```
>>> shellcraft.pushstr_array(['hello', 'world'])
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lookup.py in get_template(self, uri)
    248             if self.filesystem_checks:
--> 249                 return self._check(uri, self._collection[uri])
    250             else:

KeyError: 'aarch64/pushstr_array.asm'

During handling of the above exception, another exception occurred:

CompileException                          Traceback (most recent call last)
<ipython-input-2-b064486e8883> in <module>
----> 1 shellcraft.pushstr_array(['hello', 'world'])

~/pwntools/pwnlib/shellcraft/__init__.py in __getattr__(self, key)
     84         for m in self._context_modules():
     85             try:
---> 86                 return getattr(m, key)
     87             except AttributeError:
     88                 pass

~/pwntools/pwnlib/shellcraft/__init__.py in __getattr__(self, key)
     78         # This function lazy-loads the shellcodes
     79         if key in self._shellcodes:
---> 80             real = internal.make_function(key, self._shellcodes[key], self._dir)
     81             setattr(self, key, real)
     82             return real

~/pwntools/pwnlib/shellcraft/internal.py in make_function(funcname, filename, directory)
    112     import inspect
    113     path       = os.path.join(directory, filename)
--> 114     template   = lookup_template(path)
    115
    116     args, varargs, keywords, defaults = inspect.getargspec(template.module.render_body)

~/pwntools/pwnlib/shellcraft/internal.py in lookup_template(filename)
     80
     81     if filename not in loaded:
---> 82         loaded[filename] = lookup.get_template(filename)
     83
     84     return loaded[filename]

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lookup.py in get_template(self, uri)
    258                 srcfile = posixpath.normpath(posixpath.join(dir_, u))
    259                 if os.path.isfile(srcfile):
--> 260                     return self._load(srcfile, uri)
    261             else:
    262                 raise exceptions.TopLevelLookupException(

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lookup.py in _load(self, filename, uri)
    320                 else:
    321                     module_filename = None
--> 322                 self._collection[uri] = template = Template(
    323                     uri=uri,
    324                     filename=posixpath.normpath(filename),

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/template.py in __init__(self, text, filename, uri, format_exceptions, error_handler, lookup, output_encoding, encoding_errors, module_directory, cache_args, cache_impl, cache_enabled, cache_type, cache_dir, cache_url, module_filename, input_encoding, disable_unicode, module_writer, bytestring_passthrough, default_filters, buffer_filters, strict_undefined, imports, future_imports, enable_loop, preprocessor, lexer_cls, include_error_handler)
    346             else:
    347                 path = None
--> 348             module = self._compile_from_file(path, filename)
    349         else:
    350             raise exceptions.RuntimeException(

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/template.py in _compile_from_file(self, path, filename)
    428             # in memory
    429             data = util.read_file(filename)
--> 430             code, module = _compile_text(self, data, filename)
    431             self._source = None
    432             self._code = code

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/template.py in _compile_text(template, text, filename)
    731 def _compile_text(template, text, filename):
    732     identifier = template.module_id
--> 733     source, lexer = _compile(
    734         template,
    735         text,

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/template.py in _compile(template, text, filename, generate_magic_comment)
    710         preprocessor=template.preprocessor,
    711     )
--> 712     node = lexer.parse()
    713     source = codegen.compile(
    714         node,

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lexer.py in parse(self)
    262             if self.match_expression():
    263                 continue
--> 264             if self.match_control_line():
    265                 continue
    266             if self.match_comment():

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lexer.py in match_control_line(self)
    474                             **self.exception_kwargs
    475                         )
--> 476                 self.append_node(parsetree.ControlLine, keyword, isend, text)
    477             else:
    478                 self.append_node(parsetree.Comment, text)

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lexer.py in append_node(self, nodecls, *args, **kwargs)
    150         kwargs.setdefault("pos", self.matched_charpos)
    151         kwargs["filename"] = self.filename
--> 152         node = nodecls(*args, **kwargs)
    153         if len(self.tag):
    154             self.tag[-1].nodes.append(node)

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/parsetree.py in __init__(self, keyword, isend, text, **kwargs)
     91             self._undeclared_identifiers = []
     92         else:
---> 93             code = ast.PythonFragment(text, **self.exception_kwargs)
     94             self._declared_identifiers = code.declared_identifiers
     95             self._undeclared_identifiers = code.undeclared_identifiers

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/ast.py in __init__(self, code, **exception_kwargs)
     87         m = re.match(r"^(\w+)(?:\s+(.*?))?:\s*(#|$)", code.strip(), re.S)
     88         if not m:
---> 89             raise exceptions.CompileException(
     90                 "Fragment '%s' is not a partial control statement" % code,
     91                 **exception_kwargs

CompileException: Fragment 'if len(array[-1] != 'sp')' is not a partial control statement in file '/Users/heapcrash/pwntools/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm' at line: 76 char: 1
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pwnlib/version.py`
Content:
```
1 __version__ = '4.1.5'
2
```

Path: `setup.py`
Content:
```
1 #!/usr/bin/env python
2 from __future__ import print_function
3 
4 import glob
5 import os
6 import platform
7 import subprocess
8 import sys
9 import traceback
10 from distutils.command.install import INSTALL_SCHEMES
11 from distutils.sysconfig import get_python_inc
12 from distutils.util import convert_path
13 
14 from setuptools import find_packages
15 from setuptools import setup
16 
17 # Get all template files
18 templates = []
19 for dirpath, dirnames, filenames in os.walk(convert_path('pwnlib/shellcraft/templates'), followlinks=True):
20     for f in filenames:
21         templates.append(os.path.relpath(os.path.join(dirpath, f), 'pwnlib'))
22 
23 # This makes pwntools-LICENSE.txt appear with the package folders
24 for scheme in INSTALL_SCHEMES.values():
25     scheme['data'] = scheme['purelib']
26 
27 console_scripts = ['pwn=pwnlib.commandline.main:main']
28 
29 # Find all of the ancillary console scripts
30 # We have a magic flag --include-all-scripts
31 flag = '--only-use-pwn-command'
32 if flag in sys.argv:
33     sys.argv.remove(flag)
34 else:
35     flag = False
36 
37 for filename in glob.glob('pwnlib/commandline/*'):
38     filename = os.path.basename(filename)
39     filename, ext = os.path.splitext(filename)
40 
41     if ext != '.py' or '__init__' in filename:
42         continue
43 
44     script = '%s=pwnlib.commandline.common:main' % filename
45     if not flag:
46         console_scripts.append(script)
47 
48 install_requires     = ['paramiko>=1.15.2',
49                         'mako>=1.0.0',
50                         'pyelftools>=0.2.4',
51                         'capstone>=3.0.5rc2', # See Gallopsled/pwntools#971, Gallopsled/pwntools#1160
52                         'ropgadget>=5.3',
53                         'pyserial>=2.7',
54                         'requests>=2.0',
55                         'pip>=6.0.8',
56                         'pygments>=2.0',
57                         'pysocks',
58                         'python-dateutil',
59                         'packaging',
60                         'psutil>=3.3.0',
61                         'intervaltree>=3.0',
62                         'sortedcontainers',
63                         'unicorn>=1.0.2rc1,<1.0.2rc4', # see unicorn-engine/unicorn#1100, unicorn-engine/unicorn#1170, Gallopsled/pwntools#1538
64                         'six>=1.12.0',
65 ]
66 
67 # Check that the user has installed the Python development headers
68 PythonH = os.path.join(get_python_inc(), 'Python.h')
69 if not os.path.exists(PythonH):
70     print("You must install the Python development headers!", file=sys.stderr)
71     print("$ apt-get install python-dev", file=sys.stderr)
72     sys.exit(-1)
73 
74 # Convert README.md to reStructuredText for PyPI
75 long_description = ''
76 try:
77     long_description = subprocess.check_output(['pandoc', 'README.md', '--to=rst'], universal_newlines=True)
78 except Exception as e:
79     print("Failed to convert README.md through pandoc, proceeding anyway", file=sys.stderr)
80     traceback.print_exc()
81 
82 setup(
83     name                 = 'pwntools',
84     python_requires      = '>=2.7',
85     packages             = find_packages(),
86     version              = '4.1.5',
87     data_files           = [('',
88                              glob.glob('*.md') + glob.glob('*.txt')),
89                             ],
90     package_data         = {
91         'pwnlib': [
92             'data/crcsums.txt',
93             'data/useragents/useragents.txt',
94             'data/binutils/*',
95             'data/includes/*.h',
96             'data/includes/*/*.h',
97             'data/templates/*.mako',
98         ] + templates,
99     },
100     entry_points = {'console_scripts': console_scripts},
101     scripts              = glob.glob("bin/*"),
102     description          = "Pwntools CTF framework and exploit development library.",
103     long_description     = long_description,
104     author               = "Gallopsled et al.",
105     author_email         = "pwntools-users@googlegroups.com",
106     url                  = 'https://pwntools.com',
107     download_url         = "https://github.com/Gallopsled/pwntools/releases",
108     install_requires     = install_requires,
109     license              = "Mostly MIT, some GPL/BSD, see LICENSE-pwntools.txt",
110     keywords             = 'pwntools exploit ctf capture the flag binary wargame overflow stack heap defcon',
111     classifiers          = [
112         'Development Status :: 5 - Production/Stable',
113         'Environment :: Console',
114         'Intended Audience :: Developers',
115         'Intended Audience :: Science/Research',
116         'Intended Audience :: System Administrators',
117         'License :: OSI Approved :: MIT License',
118         'Natural Language :: English',
119         'Operating System :: POSIX :: Linux',
120         'Programming Language :: Python :: 2.7',
121         'Topic :: Security',
122         'Topic :: Software Development :: Assemblers',
123         'Topic :: Software Development :: Debuggers',
124         'Topic :: Software Development :: Disassemblers',
125         'Topic :: Software Development :: Embedded Systems',
126         'Topic :: Software Development :: Libraries :: Python Modules',
127         'Topic :: System :: System Shells',
128         'Topic :: Utilities',
129     ]
130 )
131
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pwnlib/version.py b/pwnlib/version.py
--- a/pwnlib/version.py
+++ b/pwnlib/version.py
@@ -1 +1 @@
-__version__ = '4.1.5'
+__version__ = '4.1.6'
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -83,7 +83,7 @@
     name                 = 'pwntools',
     python_requires      = '>=2.7',
     packages             = find_packages(),
-    version              = '4.1.5',
+    version              = '4.1.6',
     data_files           = [('',
                              glob.glob('*.md') + glob.glob('*.txt')),
                             ],

{"golden_diff": "diff --git a/pwnlib/version.py b/pwnlib/version.py\n--- a/pwnlib/version.py\n+++ b/pwnlib/version.py\n@@ -1 +1 @@\n-__version__ = '4.1.5'\n+__version__ = '4.1.6'\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -83,7 +83,7 @@\n     name                 = 'pwntools',\n     python_requires      = '>=2.7',\n     packages             = find_packages(),\n-    version              = '4.1.5',\n+    version              = '4.1.6',\n     data_files           = [('',\n                              glob.glob('*.md') + glob.glob('*.txt')),\n                             ],\n", "issue": "aarch64.linux.pushstr_array is broken\nThere's also a missing colon after the `if` statement, and it seems this was never never finished since there's no `%endif`.\r\n\r\nhttps://github.com/Gallopsled/pwntools/blob/813749493288fd7330b7b44b81a7f2f7a8a02dac/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm#L76-L79\r\n\r\n\r\n```\r\n>>> shellcraft.pushstr_array(['hello', 'world'])\r\n---------------------------------------------------------------------------\r\nKeyError                                  Traceback (most recent call last)\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lookup.py in get_template(self, uri)\r\n    248             if self.filesystem_checks:\r\n--> 249                 return self._check(uri, self._collection[uri])\r\n    250             else:\r\n\r\nKeyError: 'aarch64/pushstr_array.asm'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nCompileException                          Traceback (most recent call last)\r\n<ipython-input-2-b064486e8883> in <module>\r\n----> 1 shellcraft.pushstr_array(['hello', 'world'])\r\n\r\n~/pwntools/pwnlib/shellcraft/__init__.py in __getattr__(self, key)\r\n     84         for m in self._context_modules():\r\n     85             try:\r\n---> 86                 return getattr(m, key)\r\n     87             except AttributeError:\r\n     88                 pass\r\n\r\n~/pwntools/pwnlib/shellcraft/__init__.py in __getattr__(self, key)\r\n     78         # This function lazy-loads the shellcodes\r\n     79         if key in self._shellcodes:\r\n---> 80             real = internal.make_function(key, self._shellcodes[key], self._dir)\r\n     81             setattr(self, key, real)\r\n     82             return real\r\n\r\n~/pwntools/pwnlib/shellcraft/internal.py in make_function(funcname, filename, directory)\r\n    112     import inspect\r\n    113     path       = os.path.join(directory, filename)\r\n--> 114     template   = lookup_template(path)\r\n    115\r\n    116     args, varargs, keywords, defaults = inspect.getargspec(template.module.render_body)\r\n\r\n~/pwntools/pwnlib/shellcraft/internal.py in lookup_template(filename)\r\n     80\r\n     81     if filename not in loaded:\r\n---> 82         loaded[filename] = lookup.get_template(filename)\r\n     83\r\n     84     return loaded[filename]\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lookup.py in get_template(self, uri)\r\n    258                 srcfile = posixpath.normpath(posixpath.join(dir_, u))\r\n    259                 if os.path.isfile(srcfile):\r\n--> 260                     return self._load(srcfile, uri)\r\n    261             else:\r\n    262                 raise exceptions.TopLevelLookupException(\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lookup.py in _load(self, filename, uri)\r\n    320                 else:\r\n    321                     module_filename = None\r\n--> 322                 self._collection[uri] = template = Template(\r\n    323                     uri=uri,\r\n    324                     filename=posixpath.normpath(filename),\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/template.py in __init__(self, text, filename, uri, format_exceptions, error_handler, lookup, output_encoding, encoding_errors, module_directory, cache_args, cache_impl, cache_enabled, cache_type, cache_dir, cache_url, module_filename, input_encoding, disable_unicode, module_writer, bytestring_passthrough, default_filters, buffer_filters, strict_undefined, imports, future_imports, enable_loop, preprocessor, lexer_cls, include_error_handler)\r\n    346             else:\r\n    347                 path = None\r\n--> 348             module = self._compile_from_file(path, filename)\r\n    349         else:\r\n    350             raise exceptions.RuntimeException(\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/template.py in _compile_from_file(self, path, filename)\r\n    428             # in memory\r\n    429             data = util.read_file(filename)\r\n--> 430             code, module = _compile_text(self, data, filename)\r\n    431             self._source = None\r\n    432             self._code = code\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/template.py in _compile_text(template, text, filename)\r\n    731 def _compile_text(template, text, filename):\r\n    732     identifier = template.module_id\r\n--> 733     source, lexer = _compile(\r\n    734         template,\r\n    735         text,\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/template.py in _compile(template, text, filename, generate_magic_comment)\r\n    710         preprocessor=template.preprocessor,\r\n    711     )\r\n--> 712     node = lexer.parse()\r\n    713     source = codegen.compile(\r\n    714         node,\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lexer.py in parse(self)\r\n    262             if self.match_expression():\r\n    263                 continue\r\n--> 264             if self.match_control_line():\r\n    265                 continue\r\n    266             if self.match_comment():\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lexer.py in match_control_line(self)\r\n    474                             **self.exception_kwargs\r\n    475                         )\r\n--> 476                 self.append_node(parsetree.ControlLine, keyword, isend, text)\r\n    477             else:\r\n    478                 self.append_node(parsetree.Comment, text)\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/lexer.py in append_node(self, nodecls, *args, **kwargs)\r\n    150         kwargs.setdefault(\"pos\", self.matched_charpos)\r\n    151         kwargs[\"filename\"] = self.filename\r\n--> 152         node = nodecls(*args, **kwargs)\r\n    153         if len(self.tag):\r\n    154             self.tag[-1].nodes.append(node)\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/parsetree.py in __init__(self, keyword, isend, text, **kwargs)\r\n     91             self._undeclared_identifiers = []\r\n     92         else:\r\n---> 93             code = ast.PythonFragment(text, **self.exception_kwargs)\r\n     94             self._declared_identifiers = code.declared_identifiers\r\n     95             self._undeclared_identifiers = code.undeclared_identifiers\r\n\r\n~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/mako/ast.py in __init__(self, code, **exception_kwargs)\r\n     87         m = re.match(r\"^(\\w+)(?:\\s+(.*?))?:\\s*(#|$)\", code.strip(), re.S)\r\n     88         if not m:\r\n---> 89             raise exceptions.CompileException(\r\n     90                 \"Fragment '%s' is not a partial control statement\" % code,\r\n     91                 **exception_kwargs\r\n\r\nCompileException: Fragment 'if len(array[-1] != 'sp')' is not a partial control statement in file '/Users/heapcrash/pwntools/pwnlib/shellcraft/templates/aarch64/pushstr_array.asm' at line: 76 char: 1\r\n```\n", "before_files": [{"content": "__version__ = '4.1.5'\n", "path": "pwnlib/version.py"}, {"content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport glob\nimport os\nimport platform\nimport subprocess\nimport sys\nimport traceback\nfrom distutils.command.install import INSTALL_SCHEMES\nfrom distutils.sysconfig import get_python_inc\nfrom distutils.util import convert_path\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n# Get all template files\ntemplates = []\nfor dirpath, dirnames, filenames in os.walk(convert_path('pwnlib/shellcraft/templates'), followlinks=True):\n    for f in filenames:\n        templates.append(os.path.relpath(os.path.join(dirpath, f), 'pwnlib'))\n\n# This makes pwntools-LICENSE.txt appear with the package folders\nfor scheme in INSTALL_SCHEMES.values():\n    scheme['data'] = scheme['purelib']\n\nconsole_scripts = ['pwn=pwnlib.commandline.main:main']\n\n# Find all of the ancillary console scripts\n# We have a magic flag --include-all-scripts\nflag = '--only-use-pwn-command'\nif flag in sys.argv:\n    sys.argv.remove(flag)\nelse:\n    flag = False\n\nfor filename in glob.glob('pwnlib/commandline/*'):\n    filename = os.path.basename(filename)\n    filename, ext = os.path.splitext(filename)\n\n    if ext != '.py' or '__init__' in filename:\n        continue\n\n    script = '%s=pwnlib.commandline.common:main' % filename\n    if not flag:\n        console_scripts.append(script)\n\ninstall_requires     = ['paramiko>=1.15.2',\n                        'mako>=1.0.0',\n                        'pyelftools>=0.2.4',\n                        'capstone>=3.0.5rc2', # See Gallopsled/pwntools#971, Gallopsled/pwntools#1160\n                        'ropgadget>=5.3',\n                        'pyserial>=2.7',\n                        'requests>=2.0',\n                        'pip>=6.0.8',\n                        'pygments>=2.0',\n                        'pysocks',\n                        'python-dateutil',\n                        'packaging',\n                        'psutil>=3.3.0',\n                        'intervaltree>=3.0',\n                        'sortedcontainers',\n                        'unicorn>=1.0.2rc1,<1.0.2rc4', # see unicorn-engine/unicorn#1100, unicorn-engine/unicorn#1170, Gallopsled/pwntools#1538\n                        'six>=1.12.0',\n]\n\n# Check that the user has installed the Python development headers\nPythonH = os.path.join(get_python_inc(), 'Python.h')\nif not os.path.exists(PythonH):\n    print(\"You must install the Python development headers!\", file=sys.stderr)\n    print(\"$ apt-get install python-dev\", file=sys.stderr)\n    sys.exit(-1)\n\n# Convert README.md to reStructuredText for PyPI\nlong_description = ''\ntry:\n    long_description = subprocess.check_output(['pandoc', 'README.md', '--to=rst'], universal_newlines=True)\nexcept Exception as e:\n    print(\"Failed to convert README.md through pandoc, proceeding anyway\", file=sys.stderr)\n    traceback.print_exc()\n\nsetup(\n    name                 = 'pwntools',\n    python_requires      = '>=2.7',\n    packages             = find_packages(),\n    version              = '4.1.5',\n    data_files           = [('',\n                             glob.glob('*.md') + glob.glob('*.txt')),\n                            ],\n    package_data         = {\n        'pwnlib': [\n            'data/crcsums.txt',\n            'data/useragents/useragents.txt',\n            'data/binutils/*',\n            'data/includes/*.h',\n            'data/includes/*/*.h',\n            'data/templates/*.mako',\n        ] + templates,\n    },\n    entry_points = {'console_scripts': console_scripts},\n    scripts              = glob.glob(\"bin/*\"),\n    description          = \"Pwntools CTF framework and exploit development library.\",\n    long_description     = long_description,\n    author               = \"Gallopsled et al.\",\n    author_email         = \"pwntools-users@googlegroups.com\",\n    url                  = 'https://pwntools.com',\n    download_url         = \"https://github.com/Gallopsled/pwntools/releases\",\n    install_requires     = install_requires,\n    license              = \"Mostly MIT, some GPL/BSD, see LICENSE-pwntools.txt\",\n    keywords             = 'pwntools exploit ctf capture the flag binary wargame overflow stack heap defcon',\n    classifiers          = [\n        'Development Status :: 5 - Production/Stable',\n        'Environment :: Console',\n        'Intended Audience :: Developers',\n        'Intended Audience :: Science/Research',\n        'Intended Audience :: System Administrators',\n        'License :: OSI Approved :: MIT License',\n        'Natural Language :: English',\n        'Operating System :: POSIX :: Linux',\n        'Programming Language :: Python :: 2.7',\n        'Topic :: Security',\n        'Topic :: Software Development :: Assemblers',\n        'Topic :: Software Development :: Debuggers',\n        'Topic :: Software Development :: Disassemblers',\n        'Topic :: Software Development :: Embedded Systems',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: System :: System Shells',\n        'Topic :: Utilities',\n    ]\n)\n", "path": "setup.py"}], "after_files": [{"content": "__version__ = '4.1.6'\n", "path": "pwnlib/version.py"}, {"content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport glob\nimport os\nimport platform\nimport subprocess\nimport sys\nimport traceback\nfrom distutils.command.install import INSTALL_SCHEMES\nfrom distutils.sysconfig import get_python_inc\nfrom distutils.util import convert_path\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n# Get all template files\ntemplates = []\nfor dirpath, dirnames, filenames in os.walk(convert_path('pwnlib/shellcraft/templates'), followlinks=True):\n    for f in filenames:\n        templates.append(os.path.relpath(os.path.join(dirpath, f), 'pwnlib'))\n\n# This makes pwntools-LICENSE.txt appear with the package folders\nfor scheme in INSTALL_SCHEMES.values():\n    scheme['data'] = scheme['purelib']\n\nconsole_scripts = ['pwn=pwnlib.commandline.main:main']\n\n# Find all of the ancillary console scripts\n# We have a magic flag --include-all-scripts\nflag = '--only-use-pwn-command'\nif flag in sys.argv:\n    sys.argv.remove(flag)\nelse:\n    flag = False\n\nfor filename in glob.glob('pwnlib/commandline/*'):\n    filename = os.path.basename(filename)\n    filename, ext = os.path.splitext(filename)\n\n    if ext != '.py' or '__init__' in filename:\n        continue\n\n    script = '%s=pwnlib.commandline.common:main' % filename\n    if not flag:\n        console_scripts.append(script)\n\ninstall_requires     = ['paramiko>=1.15.2',\n                        'mako>=1.0.0',\n                        'pyelftools>=0.2.4',\n                        'capstone>=3.0.5rc2', # See Gallopsled/pwntools#971, Gallopsled/pwntools#1160\n                        'ropgadget>=5.3',\n                        'pyserial>=2.7',\n                        'requests>=2.0',\n                        'pip>=6.0.8',\n                        'pygments>=2.0',\n                        'pysocks',\n                        'python-dateutil',\n                        'packaging',\n                        'psutil>=3.3.0',\n                        'intervaltree>=3.0',\n                        'sortedcontainers',\n                        'unicorn>=1.0.2rc1,<1.0.2rc4', # see unicorn-engine/unicorn#1100, unicorn-engine/unicorn#1170, Gallopsled/pwntools#1538\n                        'six>=1.12.0',\n]\n\n# Check that the user has installed the Python development headers\nPythonH = os.path.join(get_python_inc(), 'Python.h')\nif not os.path.exists(PythonH):\n    print(\"You must install the Python development headers!\", file=sys.stderr)\n    print(\"$ apt-get install python-dev\", file=sys.stderr)\n    sys.exit(-1)\n\n# Convert README.md to reStructuredText for PyPI\nlong_description = ''\ntry:\n    long_description = subprocess.check_output(['pandoc', 'README.md', '--to=rst'], universal_newlines=True)\nexcept Exception as e:\n    print(\"Failed to convert README.md through pandoc, proceeding anyway\", file=sys.stderr)\n    traceback.print_exc()\n\nsetup(\n    name                 = 'pwntools',\n    python_requires      = '>=2.7',\n    packages             = find_packages(),\n    version              = '4.1.6',\n    data_files           = [('',\n                             glob.glob('*.md') + glob.glob('*.txt')),\n                            ],\n    package_data         = {\n        'pwnlib': [\n            'data/crcsums.txt',\n            'data/useragents/useragents.txt',\n            'data/binutils/*',\n            'data/includes/*.h',\n            'data/includes/*/*.h',\n            'data/templates/*.mako',\n        ] + templates,\n    },\n    entry_points = {'console_scripts': console_scripts},\n    scripts              = glob.glob(\"bin/*\"),\n    description          = \"Pwntools CTF framework and exploit development library.\",\n    long_description     = long_description,\n    author               = \"Gallopsled et al.\",\n    author_email         = \"pwntools-users@googlegroups.com\",\n    url                  = 'https://pwntools.com',\n    download_url         = \"https://github.com/Gallopsled/pwntools/releases\",\n    install_requires     = install_requires,\n    license              = \"Mostly MIT, some GPL/BSD, see LICENSE-pwntools.txt\",\n    keywords             = 'pwntools exploit ctf capture the flag binary wargame overflow stack heap defcon',\n    classifiers          = [\n        'Development Status :: 5 - Production/Stable',\n        'Environment :: Console',\n        'Intended Audience :: Developers',\n        'Intended Audience :: Science/Research',\n        'Intended Audience :: System Administrators',\n        'License :: OSI Approved :: MIT License',\n        'Natural Language :: English',\n        'Operating System :: POSIX :: Linux',\n        'Programming Language :: Python :: 2.7',\n        'Topic :: Security',\n        'Topic :: Software Development :: Assemblers',\n        'Topic :: Software Development :: Debuggers',\n        'Topic :: Software Development :: Disassemblers',\n        'Topic :: Software Development :: Embedded Systems',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: System :: System Shells',\n        'Topic :: Utilities',\n    ]\n)\n", "path": "setup.py"}]}