Skip to content

Commit

Permalink
switch to trusty build in travis ci and fix some test cases (#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce30262 authored and zachriggle committed May 25, 2018
1 parent 6747356 commit 5ae13e8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: precise
dist: trusty
language: python
addons:
apt:
Expand All @@ -19,6 +19,7 @@ cache:
- usr
- /home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/
- /home/travis/virtualenv/python2.7.13/bin/
sudo: required
python:
- "2.7"
before_install:
Expand Down
4 changes: 3 additions & 1 deletion pwnlib/shellcraft/registers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
'$31': 31, '$ra': 31,
}

mips_list = list(mips)

arm = map('r{}'.format, range(13))
arm += ["sp", "lr", "pc", "cpsr"]

Expand Down Expand Up @@ -211,7 +213,7 @@ def current():
'arm': arm,
'thumb': arm,
'aarch64': aarch64,
'mips': mips,
'mips': mips_list,
'powerpc': powerpc
}[context.arch]

Expand Down
11 changes: 10 additions & 1 deletion pwnlib/shellcraft/templates/mips/linux/sh.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<% from pwnlib.shellcraft import mips %>
<%docstring>Execute /bin/sh</%docstring>
<%docstring>Execute /bin/sh

Example:

>>> p = run_assembly(shellcraft.mips.linux.sh())
>>> p.sendline('echo Hello')
>>> p.recv()
'Hello\n'

</%docstring>

${mips.execve('//bin/sh', ['sh'], {})}
2 changes: 1 addition & 1 deletion pwnlib/tubes/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ def leak(self, address, count=1):
Example:
>>> e = ELF('/bin/sh')
>>> e = ELF('/bin/bash')
>>> p = process(e.path)
In order to make sure there's not a race condition against
Expand Down
2 changes: 1 addition & 1 deletion travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local_deb_extract()

install_deb()
{
version=${2:-zesty}
version=${2:-artful}
package=$1
echo "Installing $package"
INDEX="http://packages.ubuntu.com/en/$version/amd64/$package/download"
Expand Down

0 comments on commit 5ae13e8

Please sign in to comment.