Commit 9e13c4c0 by Marcin Bury Committed by GitHub

Merge pull request #216 from reverse-shell/macos-build

Add macOS build
parents 06142180 8ab2a3f3
language: python language: python
python:
- "2.7" matrix:
include:
- os: linux
python: 2.7
- os: osx
language: generic
env: PYTHON_VERSION=2.7.13
install: install:
- "pip install -r requirements.txt" - "./.travis/install.sh"
- "pip install pexpect flake8"
script: script:
- "python -m unittest discover" - "./.travis/run.sh"
- "./run_linter.sh" \ No newline at end of file
#!/bin/bash
set -e
set -x
if [[ "$(uname -s)" == 'Darwin' ]]; then
sw_vers
git clone --depth 1 https://github.com/yyuu/pyenv.git ~/.pyenv
PYENV_ROOT="$HOME/.pyenv"
PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
pyenv install $PYTHON_VERSION
pyenv global $PYTHON_VERSION
pyenv rehash
pip install --user --upgrade pip
pip install --user virtualenv
python -m virtualenv ~/.venv
source ~/.venv/bin/activate
fi
pip install -r requirements-dev.txt
#!/bin/bash
set -e
set -x
if [[ "$(uname -s)" == "Darwin" ]]; then
PYENV_ROOT="$HOME/.pyenv"
PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
source ~/.venv/bin/activate
fi
source run_tests.sh
source run_linter.sh
future>=0.16.0
requests>=2.9.1
paramiko>=1.16.0
beautifulsoup4>=4.4.1
pysnmp>=4.3.2
gnureadline
pexpect
mock
flake8
\ No newline at end of file
...@@ -378,8 +378,8 @@ class RoutersploitInterpreter(BaseInterpreter): ...@@ -378,8 +378,8 @@ class RoutersploitInterpreter(BaseInterpreter):
@utils.module_required @utils.module_required
def _show_options(self, *args, **kwargs): def _show_options(self, *args, **kwargs):
target_opts = {'port', 'target'} target_opts = ['target', 'port']
module_opts = set(self.current_module.options) - target_opts module_opts = [opt for opt in self.current_module.options if opt not in target_opts]
headers = ("Name", "Current settings", "Description") headers = ("Name", "Current settings", "Description")
utils.print_info('\nTarget options:') utils.print_info('\nTarget options:')
......
...@@ -436,8 +436,8 @@ class RoutersploitInterpreterTest(RoutersploitTestCase): ...@@ -436,8 +436,8 @@ class RoutersploitInterpreterTest(RoutersploitTestCase):
mock.call(), mock.call(),
mock.call(' Name Current settings Description '), mock.call(' Name Current settings Description '),
mock.call(' ---- ---------------- ----------- '), mock.call(' ---- ---------------- ----------- '),
mock.call(' bar 2 bar_desc '),
mock.call(' foo 1 foo_desc '), mock.call(' foo 1 foo_desc '),
mock.call(' bar 2 bar_desc '),
mock.call(' baz 3 baz_desc '), mock.call(' baz 3 baz_desc '),
mock.call(), mock.call(),
mock.call(), mock.call(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment