summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-09 18:54:32 -0700
committermo khan <mo@mokhan.ca>2015-02-09 18:54:32 -0700
commit72a1483c8f546fae6c93dcdf91cfd47c37bc2f90 (patch)
tree942080f10dc317737b454a75a159265925663582 /lib/tasks
parentf004d81d3be9ff40830efb66c200a7a6552d72d0 (diff)
use agent registration to endpoint for registering fake agent.
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/agent.rake12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/tasks/agent.rake b/lib/tasks/agent.rake
index 1857454..482cd77 100644
--- a/lib/tasks/agent.rake
+++ b/lib/tasks/agent.rake
@@ -1,24 +1,24 @@
namespace :agent do
require 'fake_agent'
- ENDPOINT='http://localhost:3000'
desc "watch all files"
task watch: :environment do
- agent = FakeAgent.new(Agent.first.id, ENDPOINT)
+ agent = FakeAgent.new
+ agent.register
agent.watch(Dir.pwd)
end
desc "scan directory"
task scan: :environment do
- agent = FakeAgent.new(Agent.first.id, ENDPOINT)
+ agent = FakeAgent.new
+ agent.register
agent.scan(Dir.pwd)
end
desc "scan network traffic"
task :nfm do
- id = Agent.first.id
- agent = FakeAgent.new(id, ENDPOINT)
-
+ agent = FakeAgent.new
+ agent.register
agent.packet_capture('eth0')
end
end