Fix line 302 & 305 in onedrive.py listener class

agent_delay variable cannot be used in place of the REPLACE_POLLING_INTERVAL string. working_hours was not being used.
3.0-Beta
Chris Ross 2018-03-14 01:43:09 -04:00 committed by GitHub
parent 14468216b7
commit c37874a546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -289,7 +289,7 @@ class Listener:
staging_folder = listenerOptions['StagingFolder']['Value'] staging_folder = listenerOptions['StagingFolder']['Value']
working_hours = listenerOptions['WorkingHours']['Value'] working_hours = listenerOptions['WorkingHours']['Value']
profile = listenerOptions['DefaultProfile']['Value'] profile = listenerOptions['DefaultProfile']['Value']
agent_delay = listenerOptions['DefaultDelay']['Value'] poll_interval = listenerOptions['PollInterval']['Value']
if language.lower() == 'powershell': if language.lower() == 'powershell':
f = open("%s/data/agent/stagers/onedrive.ps1" % self.mainMenu.installPath) f = open("%s/data/agent/stagers/onedrive.ps1" % self.mainMenu.installPath)
@ -299,10 +299,10 @@ class Listener:
stager = stager.replace("REPLACE_STAGING_FOLDER", "%s/%s" % (base_folder, staging_folder)) stager = stager.replace("REPLACE_STAGING_FOLDER", "%s/%s" % (base_folder, staging_folder))
stager = stager.replace('REPLACE_STAGING_KEY', staging_key) stager = stager.replace('REPLACE_STAGING_KEY', staging_key)
stager = stager.replace("REPLACE_TOKEN", token) stager = stager.replace("REPLACE_TOKEN", token)
stager = stager.replace("REPLACE_POLLING_INTERVAL", agent_delay) stager = stager.replace("REPLACE_POLLING_INTERVAL", poll_interval)
if working_hours != "": if working_hours != "":
stager = stager.replace("REPLACE_WORKING_HOURS") stager = stager.replace("REPLACE_WORKING_HOURS", working_hours)
randomized_stager = '' randomized_stager = ''