Fix for #859
parent
4162d54f6f
commit
0cc5ea6a70
6
empire
6
empire
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue