make sure autorun exists for agent language

websockets-multiuser
Carrie Roberts 2017-10-16 14:04:30 -06:00
parent e38662b384
commit 21e56bcc3e
1 changed files with 1 additions and 1 deletions

View File

@ -1343,7 +1343,7 @@ class Agents:
if autorun and autorun[0] != '' and autorun[1] != '':
self.add_agent_task_db(sessionID, autorun[0], autorun[1])
if len(self.mainMenu.autoRuns) > 0:
if self.mainMenu.autoRuns.has_key(language.lower()) and len(self.mainMenu.autoRuns[language.lower()]) > 0:
autorunCmds = ["interact %s" % sessionID]
autorunCmds.extend(self.mainMenu.autoRuns[language.lower()])
autorunCmds.extend(["lastautoruncmd"])