Pass build

This commit is contained in:
Shreya 2020-07-24 23:01:37 +05:30
parent e19c3c20eb
commit 5f53ea995c
4 changed files with 6 additions and 5 deletions

View File

@ -53,7 +53,9 @@ class ModifyShellStartupFiles(PBA):
def run(self): def run(self):
if self.command: if self.command:
try: try:
output = subprocess.check_output(self.command, stderr=subprocess.STDOUT, shell=True).decode() output = subprocess.check_output(self.command, # noqa: DUO116
stderr=subprocess.STDOUT,
shell=True).decode()
return output, True return output, True
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
# Return error output of the command # Return error output of the command

View File

@ -20,8 +20,8 @@ class T1156(AttackTechnique):
'ips': [{'$arrayElemAt': ['$data.ip', 0]}]}, 'ips': [{'$arrayElemAt': ['$data.ip', 0]}]},
'result': '$data.result'}}, 'result': '$data.result'}},
{'$unwind': '$result'}, {'$unwind': '$result'},
{'$match': {'$or': [{'result': {'$regex': '\.bash'}}, {'$match': {'$or': [{'result': {'$regex': '\.bash'}}, # noqa: W605
{'result': {'$regex': '\.profile'}}]}}] {'result': {'$regex': '\.profile'}}]}}] # noqa: W605
@staticmethod @staticmethod
def get_report_data(): def get_report_data():

View File

@ -20,7 +20,7 @@ class T1504(AttackTechnique):
'ips': [{'$arrayElemAt': ['$data.ip', 0]}]}, 'ips': [{'$arrayElemAt': ['$data.ip', 0]}]},
'result': '$data.result'}}, 'result': '$data.result'}},
{'$unwind': '$result'}, {'$unwind': '$result'},
{'$match': {'result': {'$regex': 'profile\.ps1'}}}] {'$match': {'result': {'$regex': 'profile\.ps1'}}}] # noqa: W605
@staticmethod @staticmethod
def get_report_data(): def get_report_data():

View File

@ -1,4 +1,3 @@
from common.utils.attack_utils import ScanStatus
from monkey_island.cc.encryptor import encryptor from monkey_island.cc.encryptor import encryptor