Skip to content

Commit

Permalink
Rest fix for Deleting agent results
Browse files Browse the repository at this point in the history
  • Loading branch information
xorrior committed Sep 6, 2017
1 parent 2677363 commit 2973bfe
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions empire
Original file line number Diff line number Diff line change
Expand Up @@ -846,12 +846,10 @@ def start_restful_api(empireMenu, suppress=False, username=None, password=None,
for agentNameID in agentNameIDs:
[agentName, agentSessionID] = agentNameID

agentResults = execute_db_query(conn, 'SELECT id, agent, data FROM results WHERE agent=?', [agentSessionID])
agentResults = execute_db_query(conn, "SELECT results FROM agents WHERE session_id=?", [agentSessionID])

for result in agentResults:
[resultid, agent, data] = result

agentTaskResults.append({"taskID": result[0], "agentname": result[1], "results": result[2]})
if agentResults and agentResults[0] and agentResults[0] != '':
agentTaskResults.append({"AgentName":agentSessionID, "AgentResults":agentResults[0]})

return jsonify({'results': agentTaskResults})

Expand Down

0 comments on commit 2973bfe

Please sign in to comment.