Fix errors from empire

main
ganapati 2017-10-25 10:28:55 +02:00
parent ee9b6f53d3
commit 6b6a1b4de5
1 changed files with 7 additions and 1 deletions

View File

@ -47,7 +47,13 @@ class CMEModule:
payload = {'StagerName': 'multi/launcher', 'Listener': module_options['LISTENER']} payload = {'StagerName': 'multi/launcher', 'Listener': module_options['LISTENER']}
r = requests.post(base_url + '/api/stagers?token={}'.format(token), json=payload, headers=headers, verify=False) r = requests.post(base_url + '/api/stagers?token={}'.format(token), json=payload, headers=headers, verify=False)
self.empire_launcher = r.json()['multi/launcher']['Output']
response = r.json()
if "error" in response:
context.log.error("Error from empire : {}".format(response["error"]))
sys.exit(1)
self.empire_launcher = response['multi/launcher']['Output']
context.log.success("Successfully generated launcher for listener '{}'".format(module_options['LISTENER'])) context.log.success("Successfully generated launcher for listener '{}'".format(module_options['LISTENER']))