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
source ~/.venv/bin/activate
fi
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt
......@@ -3,7 +3,7 @@ requests
paramiko
pysnmp==4.4.6
pycryptodome
pytest==3.6.0
pytest==4.4.0
pytest-forked
pytest-xdist
flake8
......
......@@ -30,7 +30,7 @@ class Device(ScanEntry):
def _update(self, resp):
ScanEntry._update(self, resp)
if self.addrType is "random":
if self.addrType == "random":
self.vendor = "None (Random MAC address)"
else:
self.vendor = lookup_vendor(self.addr)
......
......@@ -38,7 +38,7 @@ def shell(exploit, architecture="", method="", payloads=None, **params):
module = getattr(importlib.import_module("{}{}".format(payload_path, p)), 'Payload')
# if method/arch is cmd then filter out payloads
if method is "cmd":
if method == "cmd":
if getattr(module, "cmd") in payloads:
available_payloads[p] = module
else:
......
......@@ -75,7 +75,7 @@ class Exploit(HTTPClient):
if response is None:
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)
if res:
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