Skip to content
Permalink
Browse files

Dev3 (#1343)

* Updates to requirements.txt.

Removed the < 1.8.0 requirement for sphinx. It appeared no longer
necessary.

Alphabetized the listing for easier searching.

Moved the requirements file under the docker folder. Docker does not
like relative paths to parent directories due to security restrictions.

* Updated Dockerfile to use Python3.

* Fixes to srop test errors.

Moving the imports to the beginning of the file resolved the issue.

The following errors were popping up during testing within Docker:

Document: rop/srop
------------------
**********************************************************************
File "rop/srop.rst", line ?, in default
Failed example:
    p.recvline()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.5/doctest.py", line 1321, in __run
        compileflags, 1), test.globs)
      File "<doctest default[18]>", line 1, in <module>
        p.recvline()
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 467, in recvline
        return self.recvuntil(self.newline, drop = not keepends, timeout = timeout)
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 310, in recvuntil
        res = self.recv(timeout=self.timeout)
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 82, in recv
        return self._recv(numb, timeout) or b''
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 160, in _recv
        if not self.buffer and not self._fillbuffer(timeout):
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 131, in _fillbuffer
        data = self.recv_raw(self.buffer.get_fill_size())
      File "/home/travis/pwntools/pwnlib/tubes/process.py", line 707, in recv_raw
        raise EOFError
    EOFError
**********************************************************************
File "rop/srop.rst", line ?, in default
Failed example:
    p.poll(block=True)
Expected:
    0
Got:
    -11
**********************************************************************
File "rop/srop.rst", line ?, in default
Failed example:
    p.recvline()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.5/doctest.py", line 1321, in __run
        compileflags, 1), test.globs)
      File "<doctest default[18]>", line 1, in <module>
        p.recvline()
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 467, in recvline
        return self.recvuntil(self.newline, drop = not keepends, timeout = timeout)
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 310, in recvuntil
        res = self.recv(timeout=self.timeout)
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 82, in recv
        return self._recv(numb, timeout) or b''
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 160, in _recv
        if not self.buffer and not self._fillbuffer(timeout):
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 131, in _fillbuffer
        data = self.recv_raw(self.buffer.get_fill_size())
      File "/home/travis/pwntools/pwnlib/tubes/process.py", line 707, in recv_raw
        raise EOFError
    EOFError
**********************************************************************
File "rop/srop.rst", line ?, in default
Failed example:
    p.poll(block=True)
Expected:
    0
Got:
    -11
**********************************************************************
File "rop/srop.rst", line ?, in default
Failed example:
    p.recvline()
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.5/doctest.py", line 1321, in __run
        compileflags, 1), test.globs)
      File "<doctest default[18]>", line 1, in <module>
        p.recvline()
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 467, in recvline
        return self.recvuntil(self.newline, drop = not keepends, timeout = timeout)
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 310, in recvuntil
        res = self.recv(timeout=self.timeout)
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 82, in recv
        return self._recv(numb, timeout) or b''
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 160, in _recv
        if not self.buffer and not self._fillbuffer(timeout):
      File "/home/travis/pwntools/pwnlib/tubes/tube.py", line 131, in _fillbuffer
        data = self.recv_raw(self.buffer.get_fill_size())
      File "/home/travis/pwntools/pwnlib/tubes/process.py", line 707, in recv_raw
        raise EOFError
    EOFError
**********************************************************************
File "rop/srop.rst", line ?, in default
Failed example:
    p.poll(block=True)
Expected:
    0
Got:
    -11
**********************************************************************
1 items had failures:
   6 of 159 in default
159 tests in 1 items.
153 passed and 6 failed.
***Test Failed*** 6 failures.

* Fix for docstring warning in dynelf.py.

The following warning is resolved with this fix:

/home/travis/pwntools/pwnlib/dynelf.py:docstring of pwnlib.dynelf.DynELF._resolve_symbol_sysv:11: WARNING: Definition list ends without a blank line; unexpected unindent.

* Fix for docstring warnings in gdb.py.

The following warnings are resolved with this fix:

/home/travis/pwntools/pwnlib/gdb.py:docstring of pwnlib.gdb.debug_assembly:8: WARNING: Inline strong start-string without end-string.
/home/travis/pwntools/pwnlib/gdb.py:docstring of pwnlib.gdb.debug_assembly:21: WARNING: Block quote ends without a blank line; unexpected unindent.
/home/travis/pwntools/pwnlib/gdb.py:docstring of pwnlib.gdb.debug_shellcode:4: WARNING: Inline strong start-string without end-string.
/home/travis/pwntools/pwnlib/gdb.py:docstring of pwnlib.gdb.debug_shellcode:17: WARNING: Block quote ends without a blank line; unexpected unindent.

* Fix for adb/__init__.py.

The following error is resolved with this fix:

Document: protocols/adb
-----------------------
**********************************************************************
File "../../pwnlib/protocols/adb/__init__.py", line ?, in default
Failed example:
    pprint(AdbClient().list('/data/user'))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.5/doctest.py", line 1321, in __run
        compileflags, 1), test.globs)
      File "<doctest default[0]>", line 1, in <module>
        pprint(AdbClient().list('/data/user'))
    TypeError: 'module' object is not callable
**********************************************************************
1 items had failures:
   1 of  10 in default
10 tests in 1 items.
9 passed and 1 failed.
***Test Failed*** 1 failures.

The following warning is resolved with this fix:

/home/travis/pwntools/pwnlib/protocols/adb/__init__.py:docstring of pwnlib.protocols.adb.AdbClient.stat:6: WARNING: Inline literal start-string without end-string.

* Fix for docstring warning in rop.py.

The following warning is resolved with this fix:

/home/travis/pwntools/pwnlib/rop/rop.py:docstring of pwnlib.rop.rop.DescriptiveStack.descriptions:3: WARNING: Inline literal start-string without end-string.

* Fix for docstring warning in ssh.py.

The following warning is resolved with this fix:

/home/travis/pwntools/pwnlib/tubes/ssh.py:docstring of pwnlib.tubes.ssh.ssh._init_remote_platform_info:6: WARNING: Block quote ends without a blank line; unexpected unindent.

* Doctest dictionary ordering problem in misc.py.

There was an ordering problem while running the doctest in misc.py.
Sorting the dictionary with pprint and updating the results fixed the
issue.

Document: util/misc
-------------------
**********************************************************************
File "../../pwnlib/util/misc.py", line ?, in default
Failed example:
    sizes
Expected:
    {'eax': 32, 'ax': 16, 'al': 8, 'ah': 8, 'ebx': 32, 'bx': 16, 'bl': 8, 'bh': 8, 'ecx': 32, 'cx': 16, 'cl': 8, 'ch': 8, 'edx': 32, 'dx': 16, 'dl': 8, 'dh': 8, 'edi': 32, 'di': 16, 'esi': 32, 'si': 16, 'ebp': 32, 'bp': 16, 'esp': 32, 'sp': 16}
Got:
    {'si': 16, 'cx': 16, 'cl': 8, 'dl': 8, 'dh': 8, 'eax': 32, 'bx': 16, 'sp': 16, 'bl': 8, 'bh': 8, 'di': 16, 'esi': 32, 'edx': 32, 'dx': 16, 'ebx': 32, 'ebp': 32, 'ax': 16, 'ch': 8, 'al': 8, 'ah': 8, 'edi': 32, 'esp': 32, 'bp': 16, 'ecx': 32}
**********************************************************************
File "../../pwnlib/util/misc.py", line ?, in default
Failed example:
    bigger
Expected:
    {'eax': ['eax'], 'ax': ['eax', 'ax'], 'al': ['eax', 'ax', 'al'], 'ah': ['eax', 'ax', 'ah'], 'ebx': ['ebx'], 'bx': ['ebx', 'bx'], 'bl': ['ebx', 'bx', 'bl'], 'bh': ['ebx', 'bx', 'bh'], 'ecx': ['ecx'], 'cx': ['ecx', 'cx'], 'cl': ['ecx', 'cx', 'cl'], 'ch': ['ecx', 'cx', 'ch'], 'edx': ['edx'], 'dx': ['edx', 'dx'], 'dl': ['edx', 'dx', 'dl'], 'dh': ['edx', 'dx', 'dh'], 'edi': ['edi'], 'di': ['edi', 'di'], 'esi': ['esi'], 'si': ['esi', 'si'], 'ebp': ['ebp'], 'bp': ['ebp', 'bp'], 'esp': ['esp'], 'sp': ['esp', 'sp']}
Got:
    {'si': ['esi', 'si'], 'cx': ['ecx', 'cx'], 'cl': ['ecx', 'cx', 'cl'], 'dl': ['edx', 'dx', 'dl'], 'dh': ['edx', 'dx', 'dh'], 'eax': ['eax'], 'bx': ['ebx', 'bx'], 'sp': ['esp', 'sp'], 'bl': ['ebx', 'bx', 'bl'], 'bh': ['ebx', 'bx', 'bh'], 'di': ['edi', 'di'], 'esi': ['esi'], 'edx': ['edx'], 'dx': ['edx', 'dx'], 'ebx': ['ebx'], 'ebp': ['ebp'], 'ax': ['eax', 'ax'], 'ch': ['ecx', 'cx', 'ch'], 'al': ['eax', 'ax', 'al'], 'ah': ['eax', 'ax', 'ah'], 'edi': ['edi'], 'esp': ['esp'], 'bp': ['ebp', 'bp'], 'ecx': ['ecx']}
**********************************************************************
File "../../pwnlib/util/misc.py", line ?, in default
Failed example:
    smaller
Expected:
    {'eax': ['ax', 'al', 'ah'], 'ax': ['al', 'ah'], 'al': [], 'ah': [], 'ebx': ['bx', 'bl', 'bh'], 'bx': ['bl', 'bh'], 'bl': [], 'bh': [], 'ecx': ['cx', 'cl', 'ch'], 'cx': ['cl', 'ch'], 'cl': [], 'ch': [], 'edx': ['dx', 'dl', 'dh'], 'dx': ['dl', 'dh'], 'dl': [], 'dh': [], 'edi': ['di'], 'di': [], 'esi': ['si'], 'si': [], 'ebp': ['bp'], 'bp': [], 'esp': ['sp'], 'sp': []}
Got:
    {'si': [], 'cx': ['cl', 'ch'], 'cl': [], 'dl': [], 'dh': [], 'eax': ['ax', 'al', 'ah'], 'bx': ['bl', 'bh'], 'sp': [], 'bl': [], 'bh': [], 'di': [], 'esi': ['si'], 'edx': ['dx', 'dl', 'dh'], 'dx': ['dl', 'dh'], 'ebx': ['bx', 'bl', 'bh'], 'ebp': ['bp'], 'ax': ['al', 'ah'], 'ch': [], 'al': [], 'ah': [], 'edi': ['di'], 'esp': ['sp'], 'bp': [], 'ecx': ['cx', 'cl', 'ch']}
**********************************************************************
1 items had failures:
   3 of  20 in default
20 tests in 1 items.
17 passed and 3 failed.
***Test Failed*** 3 failures.

* Fix for docstring warning in packing.py.

The following warning is resolved with this fix:

/home/travis/pwntools/pwnlib/util/packing.py:docstring of pwnlib.util.packing.flat:2: WARNING: Inline emphasis start-string without end-string.

* Removed commented out test in Dockerfile.

* Forgot to update location of requirements.txt.

Forgot to update the location of requirements.txt in .travis.yml.

* Made recommended changes from Arusekk.
  • Loading branch information...
colinmkinsella authored and Arusekk committed Sep 23, 2019
1 parent e6dc71c commit 1566c903ad1971573a3f8f2f6c3b18db2d10573e
@@ -1,17 +1,17 @@
sphinxcontrib-napoleon
sphinxcontrib-autoprogram==0.1.4
capstone
coveralls
doc2dash
isort
paramiko>=1.15.2
mako>=1.0.0
paramiko>=1.15.2
pip>=6.0.8
pyelftools>=0.2.3
capstone
ropgadget>=5.3
pygments>=2.0
pyserial>=2.7
requests>=2.5.1
pip>=6.0.8
tox>=1.8.1
pygments>=2.0
ropgadget>=5.3
sphinx
sphinx_rtd_theme
doc2dash
coveralls
sphinx<1.8.0
sphinxcontrib-napoleon
sphinxcontrib-autoprogram
tox>=1.8.1
@@ -1,5 +1,6 @@
.. testsetup:: *

from pprint import pprint
from pwn import *
adb = pwnlib.adb

@@ -1,5 +1,6 @@
.. testsetup:: *

from pprint import pprint
from pwnlib.util.misc import *
import os, subprocess
os.chdir("..")
@@ -704,12 +704,14 @@ def _resolve_symbol_sysv(self, libbase, symb, hshtab, strtab, symtab):
"A hash table of Elf32_Word objects supports symbol table access", or see:
https://docs.oracle.com/cd/E19504-01/802-6319/6ia12qkfo/index.html#chapter6-48031
struct Elf_Hash {
uint32_t nbucket;
uint32_t nchain;
uint32_t bucket[nbucket];
uint32_t chain[nchain];
}
.. code-block:: c
struct Elf_Hash {
uint32_t nbucket;
uint32_t nchain;
uint32_t bucket[nbucket];
uint32_t chain[nchain];
}
You can force an ELF to use this type of symbol table by compiling
with 'gcc -Wl,--hash-style=sysv'
@@ -117,7 +117,7 @@

@LocalContext
def debug_assembly(asm, gdbscript=None, vma=None):
"""debug_assembly(asm, gdbscript=None, vma=None) -> tube
r"""debug_assembly(asm, gdbscript=None, vma=None) -> tube
Creates an ELF file, and launches it under a debugger.
@@ -129,7 +129,7 @@ def debug_assembly(asm, gdbscript=None, vma=None):
asm(str): Assembly code to debug
gdbscript(str): Script to run in GDB
vma(int): Base address to load the shellcode at
**kwargs: Override any :obj:`pwnlib.context.context` values.
\**kwargs: Override any :obj:`pwnlib.context.context` values.
Returns:
:class:`.process`
@@ -157,14 +157,14 @@ def debug_assembly(asm, gdbscript=None, vma=None):

@LocalContext
def debug_shellcode(data, gdbscript=None, vma=None):
"""
r"""
Creates an ELF file, and launches it under a debugger.
Arguments:
data(str): Assembled shellcode bytes
gdbscript(str): Script to run in GDB
vma(int): Base address to load the shellcode at
**kwargs: Override any :obj:`pwnlib.context.context` values.
\**kwargs: Override any :obj:`pwnlib.context.context` values.
Returns:
:class:`.process`
@@ -435,14 +435,14 @@ def _list(self, path):
@_with_transport
@_sync
def stat(self, path):
"""Execute the ``STAT`` command of the ``SYNC`` API.
"""Execute the STAT command of the SYNC API.
Arguments:
path(str): Path to the file to stat.
Return:
On success, a dictionary mapping the values returned.
If the file cannot be ``stat()``ed, None is returned.
If the file cannot be stat() ed, None is returned.
Example:
@@ -293,13 +293,13 @@ def __init__(self, name='<pad>'):
class DescriptiveStack(list):
"""
List of resolved ROP gadgets that correspond to the ROP calls that
the user has specified. Also includes
the user has specified.
"""

#: Base address
address = 0

#: Dictionary of ``{address: [list of descriptions]}``
#: Dictionary of \`{address: [list of descriptions]}`
descriptions = {}

def __init__(self, address):
@@ -1842,7 +1842,7 @@ def read(self, path):
return self.download_data(path)

def _init_remote_platform_info(self):
"""Fills _platform_info, e.g.:
r"""Fills _platform_info, e.g.:
::
@@ -347,12 +347,81 @@ def register_sizes(regs, in_sizes):
>>> all_regs, sizes, bigger, smaller = register_sizes(regs, [32, 16, 8, 8])
>>> all_regs
['eax', 'ax', 'al', 'ah', 'ebx', 'bx', 'bl', 'bh', 'ecx', 'cx', 'cl', 'ch', 'edx', 'dx', 'dl', 'dh', 'edi', 'di', 'esi', 'si', 'ebp', 'bp', 'esp', 'sp']
>>> sizes
{'eax': 32, 'ax': 16, 'al': 8, 'ah': 8, 'ebx': 32, 'bx': 16, 'bl': 8, 'bh': 8, 'ecx': 32, 'cx': 16, 'cl': 8, 'ch': 8, 'edx': 32, 'dx': 16, 'dl': 8, 'dh': 8, 'edi': 32, 'di': 16, 'esi': 32, 'si': 16, 'ebp': 32, 'bp': 16, 'esp': 32, 'sp': 16}
>>> bigger
{'eax': ['eax'], 'ax': ['eax', 'ax'], 'al': ['eax', 'ax', 'al'], 'ah': ['eax', 'ax', 'ah'], 'ebx': ['ebx'], 'bx': ['ebx', 'bx'], 'bl': ['ebx', 'bx', 'bl'], 'bh': ['ebx', 'bx', 'bh'], 'ecx': ['ecx'], 'cx': ['ecx', 'cx'], 'cl': ['ecx', 'cx', 'cl'], 'ch': ['ecx', 'cx', 'ch'], 'edx': ['edx'], 'dx': ['edx', 'dx'], 'dl': ['edx', 'dx', 'dl'], 'dh': ['edx', 'dx', 'dh'], 'edi': ['edi'], 'di': ['edi', 'di'], 'esi': ['esi'], 'si': ['esi', 'si'], 'ebp': ['ebp'], 'bp': ['ebp', 'bp'], 'esp': ['esp'], 'sp': ['esp', 'sp']}
>>> smaller
{'eax': ['ax', 'al', 'ah'], 'ax': ['al', 'ah'], 'al': [], 'ah': [], 'ebx': ['bx', 'bl', 'bh'], 'bx': ['bl', 'bh'], 'bl': [], 'bh': [], 'ecx': ['cx', 'cl', 'ch'], 'cx': ['cl', 'ch'], 'cl': [], 'ch': [], 'edx': ['dx', 'dl', 'dh'], 'dx': ['dl', 'dh'], 'dl': [], 'dh': [], 'edi': ['di'], 'di': [], 'esi': ['si'], 'si': [], 'ebp': ['bp'], 'bp': [], 'esp': ['sp'], 'sp': []}
>>> pprint(sizes)
{'ah': 8,
'al': 8,
'ax': 16,
'bh': 8,
'bl': 8,
'bp': 16,
'bx': 16,
'ch': 8,
'cl': 8,
'cx': 16,
'dh': 8,
'di': 16,
'dl': 8,
'dx': 16,
'eax': 32,
'ebp': 32,
'ebx': 32,
'ecx': 32,
'edi': 32,
'edx': 32,
'esi': 32,
'esp': 32,
'si': 16,
'sp': 16}
>>> pprint(bigger)
{'ah': ['eax', 'ax', 'ah'],
'al': ['eax', 'ax', 'al'],
'ax': ['eax', 'ax'],
'bh': ['ebx', 'bx', 'bh'],
'bl': ['ebx', 'bx', 'bl'],
'bp': ['ebp', 'bp'],
'bx': ['ebx', 'bx'],
'ch': ['ecx', 'cx', 'ch'],
'cl': ['ecx', 'cx', 'cl'],
'cx': ['ecx', 'cx'],
'dh': ['edx', 'dx', 'dh'],
'di': ['edi', 'di'],
'dl': ['edx', 'dx', 'dl'],
'dx': ['edx', 'dx'],
'eax': ['eax'],
'ebp': ['ebp'],
'ebx': ['ebx'],
'ecx': ['ecx'],
'edi': ['edi'],
'edx': ['edx'],
'esi': ['esi'],
'esp': ['esp'],
'si': ['esi', 'si'],
'sp': ['esp', 'sp']}
>>> pprint(smaller)
{'ah': [],
'al': [],
'ax': ['al', 'ah'],
'bh': [],
'bl': [],
'bp': [],
'bx': ['bl', 'bh'],
'ch': [],
'cl': [],
'cx': ['cl', 'ch'],
'dh': [],
'di': [],
'dl': [],
'dx': ['dl', 'dh'],
'eax': ['ax', 'al', 'ah'],
'ebp': ['bp'],
'ebx': ['bx', 'bl', 'bh'],
'ecx': ['cx', 'cl', 'ch'],
'edi': ['di'],
'edx': ['dx', 'dl', 'dh'],
'esi': ['si'],
'esp': ['sp'],
'si': [],
'sp': []}
"""
sizes = {}
bigger = {}
@@ -571,7 +571,7 @@ def _flat(args, preprocessor, packer, filler):

@LocalContext
def flat(*args, **kwargs):
"""flat(*args, preprocessor = None, length = None, filler = de_bruijn(),
r"""flat(\*args, preprocessor = None, length = None, filler = de_bruijn(),
word_size = None, endianness = None, sign = None) -> str
Flattens the arguments into a string.
@@ -585,7 +585,7 @@ def flat(*args, **kwargs):
(which are recursively flattened). Offsets are relative to where the
flattened dictionary occurs in the output (i.e. `{0: 'foo'}` is equivalent
to `'foo'`). Offsets can be integers, unicode strings or regular strings.
Integer offsets >= `2**(word_size-8)` are converted to a string using
Integer offsets >= ``2**(word_size-8)`` are converted to a string using
`:func:pack`. Unicode strings are UTF-8 encoded. After these conversions
offsets are either integers or strings. In the latter case, the offset will
be the lowest index at which the string occurs in `filler`. See examples
@@ -615,7 +615,7 @@ def flat(*args, **kwargs):
Examples:
>>> flat(1, "test", [[["AB"]*2]*3], endianness = 'little', word_size = 16, sign = False)
b'\\x01\\x00testABABABABABAB'
b'\x01\x00testABABABABABAB'
>>> flat([1, [2, 3]], preprocessor = lambda x: str(x+1))
b'234'
>>> flat({12: 0x41414141,
@@ -51,6 +51,15 @@ RUN apt-get install -y libxslt1-dev
RUN apt-get install -y ssh
RUN apt-get install -y lsb-release

# Installing Python3 and setting it to the default
WORKDIR /root
RUN apt-get install -y python3
RUN apt-get install -y python3
RUN apt-get install -y python3-dev
RUN apt-get install -y python3-pip
RUN pip3 install --upgrade pip
RUN echo 'alias python=python3' >> ~/.bashrc

#==============================================================================
# ANDROID EMULATOR
#==============================================================================
@@ -78,22 +87,20 @@ RUN echo y | android update sdk --no-ui --all --filter platform-tools,extra-andr
RUN echo y | android update sdk --no-ui --all --filter android-21
RUN echo y | android update sdk --no-ui --all --filter sys-img-armeabi-v7a-android-21

# Upgrade pip
RUN pip install --upgrade pip

#==============================================================================
# PWNTOOLS TEST REQUIREMENTS
#==============================================================================

# Install pwntools from 'dev', to get all of the latest dependencies
# Install pwntools from 'dev3', to get all of the latest dependencies
# Then uninstall pwntools so we have a clean slate, but still have
# all of its dependencies installed.
WORKDIR /root
RUN git clone https://github.com/Gallopsled/pwntools
WORKDIR /root/pwntools
RUN pip install --upgrade --editable .
RUN pip install --upgrade --requirement docs/requirements.txt
RUN pip uninstall --yes pwntools
RUN git checkout dev3
RUN pip3 install --upgrade --editable .
RUN pip3 install --upgrade --requirement docs/requirements.txt
RUN pip3 uninstall --yes pwntools
WORKDIR /root
RUN rm -rf pwntools

@@ -128,16 +135,19 @@ RUN emulator64-arm -avd android-armeabi-v7a -no-window -no-boot-anim -no-skin -n

# Final touchup
USER root
# Setting Python3 as the default
RUN echo 'alias python=python3' >> ~/.bashrc

RUN apt-get install -y strace nano vim tmux

# Entry point
USER travis
# Setting Python3 as the default
RUN echo 'alias python=python3' >> ~/.bashrc
RUN mkdir /home/travis/pwntools
WORKDIR /home/travis/pwntools
ADD run.sh .
COPY pwntools.tar.gz .
RUN tar xf pwntools.tar.gz
RUN sudo rm -f pwntools.tar.gz
RUN sudo pip install -U -e .
ENTRYPOINT bash run.sh

0 comments on commit 1566c90

Please sign in to comment.
You can’t perform that action at this time.