def __init__(self, mainMenu, moduleName, agent=None):
cmd.Cmd.__init__(self)
self.doc_header = 'Module Commands'
self.mainMenu = mainMenu
# get the current module/name
self.moduleName = moduleName
self.module = self.mainMenu.modules.modules[moduleName]
# set the prompt text
self.prompt = '(EmPyre: '+helpers.color(self.moduleName, color="blue")+') > '
# if this menu is being called from an agent menu
if agent:
# resolve the agent sessionID to a name, if applicable
agent = self.mainMenu.agents.get_agent_name(agent)
self.module.options['Agent']['Value'] = agent
# def preloop(self):
# traceback.print_stack()
评论列表
文章目录