Unverified Commit f8c68ff3 by Marcin Bury Committed by GitHub

Fixing help typos (#565)

* Fixing help typos

* Removing pinning pip version

* Pinning pytest requirement
parent 82d3e58d
...@@ -15,7 +15,6 @@ if [[ "$(uname -s)" == 'Darwin' ]]; then ...@@ -15,7 +15,6 @@ if [[ "$(uname -s)" == 'Darwin' ]]; then
pyenv global $PYTHON_VERSION pyenv global $PYTHON_VERSION
pyenv rehash pyenv rehash
pip install --user --upgrade pip==9.0.3
pip install --user virtualenv pip install --user virtualenv
python -m virtualenv ~/.venv python -m virtualenv ~/.venv
source ~/.venv/bin/activate source ~/.venv/bin/activate
......
...@@ -3,7 +3,7 @@ requests ...@@ -3,7 +3,7 @@ requests
paramiko paramiko
pysnmp==4.4.6 pysnmp==4.4.6
pycryptodome pycryptodome
pytest pytest==3.6.0
pytest-forked pytest-forked
pytest-xdist pytest-xdist
flake8 flake8
......
...@@ -261,19 +261,20 @@ class RoutersploitInterpreter(BaseInterpreter): ...@@ -261,19 +261,20 @@ class RoutersploitInterpreter(BaseInterpreter):
def __handle_if_noninteractive(self, argv): def __handle_if_noninteractive(self, argv):
noninteractive = False noninteractive = False
module = '' module = ""
set_opts = [] set_opts = []
try: try:
opts, args = getopt.getopt(argv, "hxm:s:", ["module=", "set="]) opts, args = getopt.getopt(argv, "hxm:s:", ["module=", "set="])
except getopt.GetoptError: except getopt.GetoptError:
print('rsf.py -m <module>') print_info("{} -m <module> -s \"<option> <value>\"".format(sys.argv[0]))
sys.exit(2) sys.exit(2)
for opt, arg in opts: for opt, arg in opts:
if opt == '-h': if opt == "-h":
print('msf.py -x -m <module> -s "<option> <value"') print_info("{} -x -m <module> -s \"<option> <value>\"".format(sys.argv[0]))
sys.exit(0) sys.exit(0)
elif opt == '-x': elif opt == "-x":
noninteractive = True noninteractive = True
elif opt in ("-m", "--module"): elif opt in ("-m", "--module"):
module = arg module = arg
......
from unittest import mock from unittest import mock
import ast
import re import re
from flask import request from flask import request
from routersploit.modules.exploits.routers.dlink.dns_320l_327l_rce import Exploit from routersploit.modules.exploits.routers.dlink.dns_320l_327l_rce import Exploit
...@@ -10,7 +9,7 @@ def apply_response(*args, **kwargs): ...@@ -10,7 +9,7 @@ def apply_response(*args, **kwargs):
res = re.findall(r"\$\(\((.*-1)\)\)", inj) res = re.findall(r"\$\(\((.*-1)\)\)", inj)
data = "TEST" data = "TEST"
if res: if res:
solution = ast.literal_eval(res[0]) solution = eval(res[0], {'__builtins__': None})
data += str(solution) data += str(solution)
return data, 200 return data, 200
......
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