summaryrefslogtreecommitdiff
path: root/lib/tasks/agent.rake
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/agent.rake')
-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