Skip to content

Commit

Permalink
Merge branch 'stable' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
zachriggle committed Sep 8, 2017
2 parents 1a94aca + 267c6cc commit 3e163e9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
sudo: false
dist: precise
language: python
addons:
apt:
packages:
- gcc-multilib
- gcc-4.6-arm-linux-gnueabihf
- lib32stdc++6
- ash
- bash
Expand All @@ -18,8 +17,8 @@ cache:
- pip
- directories:
- usr
- /home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/
- /home/travis/virtualenv/python2.7.9/bin/
- /home/travis/virtualenv/python2.7.13/lib/python2.7/site-packages/
- /home/travis/virtualenv/python2.7.13/bin/
python:
- "2.7"
before_install:
Expand Down
6 changes: 5 additions & 1 deletion pwnlib/elf/corefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ def __init__(self, *a, **kw):
log.warn('Could not find the stack!')
self.stack = None

with context.local(bytes=self.bytes, log_level='error'):
with context.local(bytes=self.bytes, log_level='warn'):
try:
self._parse_stack()
except ValueError:
Expand Down Expand Up @@ -826,6 +826,10 @@ def _parse_stack(self):
# find a pointer to this address, followed by a NULL.
last_env_addr = address + 1
p_last_env_addr = stack.find(pack(last_env_addr), None, last_env_addr)
if p_last_env_addr < 0:
# Something weird is happening. Just don't touch it.
log.warn_once("Found bad environment at %#x", last_env_addr)
return

# Sanity check that we did correctly find the envp NULL terminator.
envp_nullterm = p_last_env_addr+context.bytes
Expand Down
2 changes: 1 addition & 1 deletion pwnlib/shellcraft/templates/i386/linux/connect.asm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Examples:
'Hello'

>>> l = listen(fam='ipv6', timeout=5)
>>> assembly = shellcraft.i386.linux.connect('ip6-localhost', l.lport, 'ipv6')
>>> assembly = shellcraft.i386.linux.connect('::1', l.lport, 'ipv6')
>>> p = run_assembly(assembly)
>>> assert l.wait_for_connection()

Expand Down
3 changes: 3 additions & 0 deletions travis/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ MAINTAINER Maintainer Gallopsled et al.

USER root

RUN apt-get update

# Use UTF-8
RUN apt-get install -y locales
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
Expand Down
6 changes: 3 additions & 3 deletions travis/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash -e
set -e
set -ex

local_deb_extract()
{
Expand All @@ -15,7 +15,7 @@ install_deb()
package=$1
echo "Installing $package"
INDEX="http://packages.ubuntu.com/en/$version/amd64/$package/download"
URL=$(curl "$INDEX" | grep -Eo "https?://.*$package.*\.deb" | head -1)
URL=$(curl -L "$INDEX" | grep -Eo "https?://.*$package.*\.deb" | head -1)
local_deb_extract "$URL"
}

Expand Down Expand Up @@ -198,4 +198,4 @@ elif [[ "$(uname)" == "Linux" ]]; then
setup_android_emulator
fi

set +e
set +ex
4 changes: 2 additions & 2 deletions travis/ssh_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# All of the "conditional sudo" is to do container-based builds on
# Travis which are much, much faster.
set -e
set -ex

U=travis
H=/home/$U
Expand Down Expand Up @@ -55,4 +55,4 @@ EOF

ssh -o "StrictHostKeyChecking no" -vvvv [email protected] id

set +e
set +ex

0 comments on commit 3e163e9

Please sign in to comment.