Skip to content

Commit

Permalink
Use const
Browse files Browse the repository at this point in the history
  • Loading branch information
ostorlab committed Nov 20, 2023
1 parent fba90f5 commit 017b16f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions agent/metasploit_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
logger = logging.getLogger(__name__)

MODULE_TIMEOUT = 300
VULNERABLE_STATUSES = ["vulnerable", "appears"]
METASPLOIT_AGENT_KEY = b"agent_metasploit_asset"


Expand Down Expand Up @@ -108,10 +109,10 @@ def process(self, message: m.Message) -> None:

results = self._get_job_results(client, job_uuid)

if isinstance(results, dict) and results.get("code") in [
"vulnerable",
"appears",
]:
if (
isinstance(results, dict)
and results.get("code") in VULNERABLE_STATUSES
):
technical_detail = f"Using `{module_instance.moduletype}` module `{module_instance.modulename}`\n"
technical_detail += f"Target: {rhost}:{rport}\n"
technical_detail += f'Message: \n```{results["message"]}```'
Expand Down

0 comments on commit 017b16f

Please sign in to comment.