Unverified Commit dcbfe68c by Marcin Bury Committed by GitHub

Fixing lint errors (#580)

* Fixing lint errors

* Installing newest pytest

* Upgrading pip on travis

* Force pytest version 4.4.0
parent 50bcbb6b
...@@ -20,4 +20,5 @@ if [[ "$(uname -s)" == 'Darwin' ]]; then ...@@ -20,4 +20,5 @@ if [[ "$(uname -s)" == 'Darwin' ]]; then
source ~/.venv/bin/activate source ~/.venv/bin/activate
fi fi
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt python -m pip install -r requirements-dev.txt
...@@ -3,7 +3,7 @@ requests ...@@ -3,7 +3,7 @@ requests
paramiko paramiko
pysnmp==4.4.6 pysnmp==4.4.6
pycryptodome pycryptodome
pytest==3.6.0 pytest==4.4.0
pytest-forked pytest-forked
pytest-xdist pytest-xdist
flake8 flake8
......
...@@ -30,7 +30,7 @@ class Device(ScanEntry): ...@@ -30,7 +30,7 @@ class Device(ScanEntry):
def _update(self, resp): def _update(self, resp):
ScanEntry._update(self, resp) ScanEntry._update(self, resp)
if self.addrType is "random": if self.addrType == "random":
self.vendor = "None (Random MAC address)" self.vendor = "None (Random MAC address)"
else: else:
self.vendor = lookup_vendor(self.addr) self.vendor = lookup_vendor(self.addr)
......
...@@ -38,7 +38,7 @@ def shell(exploit, architecture="", method="", payloads=None, **params): ...@@ -38,7 +38,7 @@ def shell(exploit, architecture="", method="", payloads=None, **params):
module = getattr(importlib.import_module("{}{}".format(payload_path, p)), 'Payload') module = getattr(importlib.import_module("{}{}".format(payload_path, p)), 'Payload')
# if method/arch is cmd then filter out payloads # if method/arch is cmd then filter out payloads
if method is "cmd": if method == "cmd":
if getattr(module, "cmd") in payloads: if getattr(module, "cmd") in payloads:
available_payloads[p] = module available_payloads[p] = module
else: else:
......
...@@ -75,7 +75,7 @@ class Exploit(HTTPClient): ...@@ -75,7 +75,7 @@ class Exploit(HTTPClient):
if response is None: if response is None:
return False # target is not vulnerable return False # target is not vulnerable
if response.status_code is 200: if response.status_code == 200:
res = re.findall(r"IPFire ([\d.]{4}) \([\w]+\) - Core Update ([\d]+)", response.text) res = re.findall(r"IPFire ([\d.]{4}) \([\w]+\) - Core Update ([\d]+)", response.text)
if res: if res:
version = res[0][0] version = res[0][0]
......
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