readme-wiki
xorrior 2017-12-29 13:02:24 -05:00
parent 4162d54f6f
commit 0cc5ea6a70
1 changed files with 3 additions and 3 deletions

6
empire
View File

@ -438,10 +438,10 @@ def start_restful_api(empireMenu, suppress=False, username=None, password=None,
if not main.agents.is_agent_present(sessionID):
return make_response(jsonify({'error': 'invalid agent name'}), 400)
modulePSVersion = int(module.info['MinLanguageVersion'])
agentPSVersion = int(main.agents.get_language_version_db(sessionID))
moduleVersion = float(module.info['MinLanguageVersion'])
agentVersion = float(main.agents.get_language_version_db(sessionID))
# check if the agent/module PowerShell versions are compatible
if modulePSVersion > agentPSVersion:
if moduleVersion > agentVersion:
return make_response(jsonify({'error': "module requires PS version "+str(modulePSVersion)+" but agent running PS version "+str(agentPSVersion)}), 400)
except Exception as e: