Agent: Extract const USERNAME_PREFIX to a common file

This commit is contained in:
Shreya Malviya 2022-04-20 17:41:57 +05:30
parent e91087f9fe
commit 2bcdb72555
2 changed files with 2 additions and 2 deletions

View File

@ -0,0 +1 @@
USERNAME_PREFIX = "somenewuser"

View File

@ -6,6 +6,7 @@ import subprocess
from typing import Dict from typing import Dict
from common.common_consts.post_breach_consts import POST_BREACH_COMMUNICATE_AS_BACKDOOR_USER from common.common_consts.post_breach_consts import POST_BREACH_COMMUNICATE_AS_BACKDOOR_USER
from infection_monkey.consts import USERNAME_PREFIX
from infection_monkey.i_puppet.i_puppet import PostBreachData from infection_monkey.i_puppet.i_puppet import PostBreachData
from infection_monkey.post_breach.pba import PBA from infection_monkey.post_breach.pba import PBA
from infection_monkey.telemetry.messengers.i_telemetry_messenger import ITelemetryMessenger from infection_monkey.telemetry.messengers.i_telemetry_messenger import ITelemetryMessenger
@ -23,8 +24,6 @@ CREATED_PROCESS_AS_USER_FAILED_FORMAT = (
"Created process '{}' as user '{}', but the process failed (exit status {}:{})." "Created process '{}' as user '{}', but the process failed (exit status {}:{})."
) )
USERNAME_PREFIX = "somenewuser"
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)