Include Docker and non-docker paths in template search, fix #904

php_fix
Dakota Nelson 2018-01-05 14:12:51 -07:00
parent 5dbf668500
commit d7c9d43d22
2 changed files with 8 additions and 4 deletions

View File

@ -431,7 +431,9 @@ class Listener:
elif language.lower() == 'python':
template_path = os.path.join(self.mainMenu.installPath, '/data/agent/stagers')
template_path = [
os.path.join(self.mainMenu.installPath, '/data/agent/stagers'),
os.path.join(self.mainMenu.installPath, './data/agent/stagers')]
eng = templating.TemplateEngine(template_path)
template = eng.get_template('dropbox.py')

View File

@ -591,7 +591,9 @@ class Listener:
return randomizedStager
elif language.lower() == 'python':
template_path = os.path.join(self.mainMenu.installPath, 'data/agent/stagers')
template_path = [
os.path.join(self.mainMenu.installPath, '/data/agent/stagers'),
os.path.join(self.mainMenu.installPath, './data/agent/stagers')]
eng = templating.TemplateEngine(template_path)
template = eng.get_template('http.py')