intrigue_api_client 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/intrigue_api_client.rb +7 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f76b53c88f4271cda1f176a5117a3e7368e2441d
|
4
|
+
data.tar.gz: a100ef2677cc519610ac2e6b323b862bdd7f86f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7ef5b0786e8c6931562ca74b5dd600a4406ea6d5115dbbe7bf08b0aaa2e5e15ee9f21ef500eff9b9edf6b86418a6cdf51255b59babb6a604fe85d8493d21746
|
7
|
+
data.tar.gz: 669d9ba0b1bb52e981e6f36ed5c73103cd4dc54552367ab915725c87799a85c03a2b9b2d75c3fe9e5531b49fab0123109293879bc2351d37e99927e8838c15b6
|
data/lib/intrigue_api_client.rb
CHANGED
@@ -4,10 +4,9 @@ require 'rest_client'
|
|
4
4
|
|
5
5
|
class IntrigueApi
|
6
6
|
|
7
|
-
def initialize(uri
|
7
|
+
def initialize(uri,key="")
|
8
8
|
@intrigue_basedir = File.dirname(__FILE__)
|
9
9
|
@server_uri = ENV.fetch("INTRIGUE_API", uri)
|
10
|
-
@server_key = key
|
11
10
|
end
|
12
11
|
|
13
12
|
# List all tasks
|
@@ -36,9 +35,10 @@ class IntrigueApi
|
|
36
35
|
# options_list = [
|
37
36
|
# {:name => "resolver", :value => "8.8.8.8" }
|
38
37
|
# ]
|
39
|
-
def start_and_background(task_name,entity_hash,options_list=nil,handler_list=nil)
|
38
|
+
def start_and_background(project_name,task_name,entity_hash,options_list=nil,handler_list=nil)
|
40
39
|
|
41
40
|
payload = {
|
41
|
+
"project_name" => project_name,
|
42
42
|
"task" => task_name,
|
43
43
|
"options" => options_list,
|
44
44
|
"handlers" => handler_list,
|
@@ -58,10 +58,10 @@ class IntrigueApi
|
|
58
58
|
end
|
59
59
|
|
60
60
|
# start Start a task and wait for the result
|
61
|
-
def start(task_name,entity_hash,options_list=nil,handler_list=nil)
|
61
|
+
def start(project_name,task_name,entity_hash,options_list=nil,handler_list=nil)
|
62
62
|
|
63
63
|
# Construct the request
|
64
|
-
task_id = start_and_background(task_name,entity_hash,options_list,handler_list)
|
64
|
+
task_id = start_and_background(project_name,task_name,entity_hash,options_list,handler_list)
|
65
65
|
|
66
66
|
if task_id == "" # technically a nil is returned , but becomes an empty string
|
67
67
|
#puts "[-] Task not started. Unknown Error. Exiting"
|
@@ -103,9 +103,10 @@ class IntrigueApi
|
|
103
103
|
# options_list = [
|
104
104
|
# {:name => "resolver", :value => "8.8.8.8" }
|
105
105
|
# ]
|
106
|
-
def start_scan_and_background(scan_type,entity_hash,options_list=nil,handler_list=nil)
|
106
|
+
def start_scan_and_background(project_name,scan_type,entity_hash,options_list=nil,handler_list=nil)
|
107
107
|
|
108
108
|
payload = {
|
109
|
+
"project_name" => project_name,
|
109
110
|
"scan_type" => scan_type,
|
110
111
|
"options" => options_list,
|
111
112
|
"entity" => entity_hash,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intrigue_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jcran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
67
|
rubyforge_project:
|
68
|
-
rubygems_version: 2.
|
68
|
+
rubygems_version: 2.5.1
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: API client for intrigue-core
|