diff options
| author | mo khan <mo@mokhan.ca> | 2015-02-04 22:14:05 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-02-04 22:14:05 -0700 |
| commit | 6c1f2fc7e2253381dd3d7bea3295b4f8f8e51ffb (patch) | |
| tree | 66908a555294804acc9a3933a7b037c9b65d971d /app | |
| parent | 1af4f1858830afb079e912e1be0c46f5c3ce6186 (diff) | |
add agent scan.
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/agents/files/show.json.jbuilder | 3 | ||||
| -rw-r--r-- | app/workers/cloud_queries.rb | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/app/views/agents/files/show.json.jbuilder b/app/views/agents/files/show.json.jbuilder index 88011e6..8394726 100644 --- a/app/views/agents/files/show.json.jbuilder +++ b/app/views/agents/files/show.json.jbuilder @@ -1,3 +1,6 @@ if @file json.extract! @file, :fingerprint, :state +else + json.fingerprint params[:fingerprint] + json.state "unknown" end diff --git a/app/workers/cloud_queries.rb b/app/workers/cloud_queries.rb index 06b3dae..e351152 100644 --- a/app/workers/cloud_queries.rb +++ b/app/workers/cloud_queries.rb @@ -8,12 +8,6 @@ class CloudQueries logger.info "Query for: #{json.inspect}" attributes = JSON.parse(json) - publish(JSON.generate({ - agent_id: attributes["agent_id"], - name: "File #{attributes["name"]}", - data: attributes["data"] - }), to_queue: "worker.events") - fingerprint = attributes["fingerprint"] disposition = Disposition.find_by(fingerprint: fingerprint) |
