Commit 4bacabd3 by fwkz

Adding linter to Travis build. Expecting to fail.

parent 350f1212
......@@ -4,6 +4,8 @@ python:
install:
- "pip install -r requirements.txt"
- "pip install pexpect"
- "pip install pexpect pep8 pyflakes"
script: "python -m unittest discover"
\ No newline at end of file
script:
- "python -m unittest discover"
- "./run_linter.sh"
\ No newline at end of file
......@@ -20,7 +20,7 @@ class Exploit(exploits.Exploit):
'description': 'Module exploits path traversal vulnerability in 2Wire 4011G and 5012NV devices. '
'If the target is vulnerable it is possible to read file from the filesystem.',
'authors': [
'adiaz', # vulnerability discovery
'adiaz', # vulnerability discovery
'Marcin Bury <marcin.bury[at]reverse-shell.com>', # routersploit module
],
'references': [
......
#!/usr/bin/env bash
IFS=' '
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
MODULES_PATH=./routersploit/modules
FAILURE=0
PEP=$(pep8 --ignore E501 $MODULES_PATH)
PYFLAKES=$(pyflakes $MODULES_PATH)
if [ "$PEP" ]; then
echo -e "${RED}- PEP8 violations:${NC}"
echo -e $PEP
echo ""
FAILURE=1
else
echo -e "${GREEN}+ PEP8${NC}"
fi
if [ "$PYFLAKES" ]; then
echo -e "\n${RED}- pyflakes violations:${NC}"
echo -e $PYFLAKES
echo "\n"
FAILURE=1
else
echo -e "${GREEN}+ pyflakes${NC}"
fi
exit $FAILURE
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